Skip to content

Strumenta/pylasu

Repository files navigation

Pylasu – Python Language Support

Build Status PyPI Documentation

Pylasu is an AST Library in the StarLasu family, targeting the Python language. Documentation is on Read the Docs.

Testing

python -m unittest discover tests 

Linting

flake8 . && flake8 tests

Packaging and Distribution

Update version in setup.cfg and pylasu/__version__.py (TODO do we need both?), commit and check that CI completes normally.

Ensure that you have build and twine installed:

pip install build twine

Then run:

rm dist/*
python -m build
python -m twine upload dist/*

Note: if we have two-factor authentication (2FA) enabled on PyPI, we have to use an API token.

If all goes well, tag the release:

git tag 

Extracting Documentation

Here's how to extract the documentation into HTML using Sphinx, the most popular documentation generator for Python.

First, ensure you have Sphinx and the chosen theme installed:

pip install sphinx sphinx_rtd_theme

Then, extract the documentation from the source code:

sphinx-apidoc -o docs pylasu

Finally, change into the docs directory and launch the build process:

cd docs
make html

If everything goes as it should, in docs/_build/html you'll find the generated documentation.

We also host the documentation on ReadTheDocs. The project is pylasu. Documentation needs to be built manually for each release for it to appear online on https://pylasu.readthedocs.io.