When interacting with other users and maintainers, please be sure to abide by the Code of Conduct.
If you are submitting a bug report, please answer the following questions:
- What version of Automata were you using?
- What were you doing?
- What did you expect to happen?
- What happened instead?
Please provide any code to reproduce the issue, if possible.
If you are requesting a new feature or change or behavior, please describe what you are looking for, and what value it will add to your use case.
Automata is an open-source project under the MIT License, so you are welcome and encouraged to modify the codebase with new fixes and enhancements. Please observe the following guidelines when submitting pull requests for new fixes or features:
- All new code must comply with PEP 8, and be formatted with black and isort.
If you install Automata with
virtualenv
, theblack
,isort
, andflake8
packages should be available to you for this purpose with the config inpyproject.toml
. The included VSCode configuration is set to run this formatting on save.
In addition, new code must include type annotations and pass typechecking run with mypy.
-
Whether you are introducing a bug fix or a new feature, you must add tests to verify that your code additions function correctly and break nothing else.
-
Please run
coverage run -m nose2 && coverage report
and ensure that your changes are covered. -
If you are adding a new feature or changing behavior, please update the documentation appropriately with the relevant information. This includes updating docstrings for all functions in the public interface, using the NumPy style. To run the documentation site locally, install the documentation dependencies with:
pip install -r requirements.dev.txt
Then, start the local server with the following command:
mkdocs serve
The dependencies for the project and best run inside a virtualenv
. For
instructions on how to configure virtual environments in Python, please see the
Virtual Environments
section of the Hitchhiker's Guide to Python.
You can install all project dependencies via pip
(assuming your project
virtualenv is active):
pip install -r requirements.txt
If you run into any trouble building the wheel for pygraphviz
on macOS when
installing dependencies, try running:
brew install graphviz
python3 -m pip install -U --no-cache-dir \
--config-settings="--global-option=build_ext" \
--config-settings="--global-option=-I$(brew --prefix graphviz)/include/" \
--config-settings="--global-option=-L$(brew --prefix graphviz)/lib/" \
pygraphviz==1.10
# Proceed to install other dependencies
pip install -r requirements.txt
The project's unit tests are written using unittest and run using
the nose2 Python package. You can run all unit tests via the nose2
command.
nose2
The project currently boasts high code coverage across all source files. New
contributions are expected to maintain this high standard. You can view the
current coverage report via the coverage
command:
coverage run -m nose2
coverage report
If the coverage ever decreases, you can generate and open a detailed HTML view of the coverage report like so:
coverage html
open htmlcov/index.html