Welcome to the GitHub repository of Pyfactor - a refactoring tool that visualises Python source files, modules and importable packages as a graph of dependencies between Python constructs like variables, functions and classes.
$ pyfactor --help
$ pyfactor script.py
$ pyfactor script.py --skip-external --view
See our PyPI page for installation instructions and package information. Visit our online documentation on Read The Docs for reference documentation, examples and release notes.
New contributors are always welcome! If you've found a bug or would like to propose a feature, please submit an issue. If you'd like to get more involved, you can start by cloning the most recent version from GitHub and installing it as an editable package with development dependencies.
$ git clone https://github.com/felix-hilden/pyfactor
$ cd pyfactor
$ pip install -e .[dev]
For specialised uses, sets of extras can be installed separately.
tests
installs dependencies related to executing tests,
docs
is for building documentation locally,
and checks
contains tox
and tools for static checking.
The install can be verified by running all essential tasks with tox.
$ tox
Now tests have been run and documentation has been built. A list of all individual tasks can be viewed with their descriptions.
$ tox -a -v
Please have a look at the following sections for additional information regarding specific tasks and configuration.
Documentation can be built locally with Sphinx.
$ cd docs
$ make html
The main page index.html
can be found in build/html
.
If tox is installed, this is equivalent to running tox -e docs
.
A set of code style rules is followed.
To check for violations, run flake8
.
$ flake8 pyfactor
Style checks for docstrings and documentation files are also available.
To run all style checks use tox -e lint
.
The repository contains a suite of test cases which can be studied and run to ensure the package works as intended.
$ pytest
For tox, this is the default command when running e.g. tox -e py
.
To measure test coverage and view uncovered lines or branches run coverage
.
$ coverage run
$ coverage report
This can be achieved with tox by running tox -e coverage
.