Skip to content

Commit

Permalink
docs: use root repo markdown file (#22)
Browse files Browse the repository at this point in the history
* docs: use root repo markdown file

* docs: fix generation using markdown
  • Loading branch information
Lewiscowles1986 authored Mar 31, 2024
1 parent ab1f0ac commit 1dbde69
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 73 deletions.
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include Makefile
include LICENSE
include README.rst
include requirements
include test
recursive-include docs *
Expand Down
9 changes: 6 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'myst_parser']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix of source filenames.
source_suffix = '.rst'
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}

# The encoding of source files.
#source_encoding = 'utf-8-sig'
Expand All @@ -44,7 +47,7 @@

# General information about the project.
project = u'Python Call Graph'
copyright = u'2007-2013 Gerald Kaszuba, et al.'
copyright = u'2007-2024 Gerald Kaszuba, et al.'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
71 changes: 3 additions & 68 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,74 +1,9 @@
Python Call Graph
#################

Welcome! Python Call Graph is a `Python <http://www.python.org>`_ module that creates `call graph <http://en.wikipedia.org/wiki/Call_graph>`_ visualizations for Python applications.

.. image:: https://travis-ci.org/gak/pycallgraph.png
:target: https://travis-ci.org/gak/pycallgraph
.. image:: https://coveralls.io/repos/gak/pycallgraph/badge.png?branch=develop
:target: https://coveralls.io/r/gak/pycallgraph?branch=develop
.. image:: https://pypip.in/v/pycallgraph/badge.png
:target: https://crate.io/packages/pycallgraph/
.. image:: https://pypip.in/d/pycallgraph/badge.png
:target: https://crate.io/packages/pycallgraph/

Screenshots
===========

Click on the images below to see a larger version and the source code that generated them.

.. image:: examples/basic_thumb.png
:target: examples/basic.html
.. image:: examples/regexp_grouped_thumb.png
:target: examples/regexp_grouped.html
.. image:: examples/regexp_ungrouped_thumb.png
:target: examples/regexp_ungrouped.html

Project Status
==============

The latest version is **1.0.1** which was released on 2013-09-17, and is a backwards incompatbile from the previous release.

The `project lives on GitHub <https://github.com/gak/pycallgraph/#python-call-graph>`_, where you can `report issues <https://github.com/gak/pycallgraph/issues>`_, contribute to the project by `forking the project <https://help.github.com/articles/fork-a-repo>`_ then creating a `pull request <https://help.github.com/articles/using-pull-requests>`_, or just `browse the source code <https://github.com/gak/pycallgraph/>`_.

The documentation needs some work stiil. Feel free to contribute :)

Features
========

* Support for Python 2.7+ and Python 3.3+.
* Static visualizations of the call graph using various tools such as Graphviz and Gephi.
* Execute pycallgraph from the command line or import it in your code.
* Customisable colors. You can programatically set the colors based on number of calls, time taken, memory usage, etc.
* Modules can be visually grouped together.
* Easily extendable to create your own output formats.

Quick Start
===========

Installation is easy as::

pip install pycallgraph

You can either use the :ref:`command-line interface <command_line_usage>` for a quick visualization of your Python script, or the :ref:`pycallgraph module <pycallgraph>` for more fine-grained settings.

The following examples specify graphviz as the outputter, so it's required to be installed. They will generate a file called **pycallgraph.png**.

The command-line method of running pycallgraph is::

$ pycallgraph graphviz -- ./mypythonscript.py

A simple use of the API is::

from pycallgraph import PyCallGraph
from pycallgraph.output import GraphvizOutput

with PyCallGraph(output=GraphvizOutput()):
code_to_profile()

Documentation Index
===================

.. include:: ../README.md
:parser: markdown

.. toctree::
:maxdepth: 3

Expand Down
2 changes: 1 addition & 1 deletion man/pycallgraph.1
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,6 @@ pycallgraph was written by Gerald Kaszuba <[email protected]>.
This manual page was originally written by Jan Alonzo <[email protected]>, for the Debian GNU/Linux system.

.SH COPYRIGHT
2007-2013 Gerald Kaszuba, et al.
2007-2024 Gerald Kaszuba, et al.
.\" Generated by docutils manpage writer.
.
1 change: 1 addition & 0 deletions requirements/documentation.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sphinx==7.2.6
myst-parser==2.0.0

0 comments on commit 1dbde69

Please sign in to comment.