Contribute to SNAFU¶
Development of SNAFU happens on GitHub.
Development Guide¶
Optional Dependencies¶
- NSIS 3.x if you want to build shims and the installer.
makensis
needs to be available in your shell.
Project Setup¶
Download and enter the project:
git clone https://github.com/uranusjr/snafu.git
cd snafu
Set up environment:
pipenv install --dev
Build the shims:
pipenv run invoke shims.build
Run Tests¶
Run Python tests:
pipenv run pytest tests
Run Rust tests:
pipenv run invoke shims.test
Unfortunately there are only very limited tests right now.
Run In-Development SNAFU¶
pipenv run python -m snafu [COMMAND] ...
This should have the same behaviour as an installed SNAFU command, but run inside the Pipenv-managed virtual environment.
Build Installer¶
pipenv run invoke installers.build
You can only build installers of your host’s architecture. Cross compilation is certainly possible, but I haven’t found the need to set it up.
After the command finishes you should get an EXE in the installers
directory.
Build Documentation¶
pipenv run invoke docs.build
Documentation is managed with Sphinx, and hosted on Read the Docs with a custom domain.
Source Code Guideline¶
Try to follow the code style. For Python code, run the linter to check for issues before submitting:
pipenv run flake8 .
Format of text files are managed with EditorConfig. I recommend using one of the editor plugins to automatically format files. If you can’t/don’t want to do so, please at least make sure you’re using the correct format before sending in pull requests.