Contributing
SPy Source¶
For guidelines on setting up your machine to build and contribute to SPy, see CONTRIBUTING.md
Documentation¶
Cloning the Repo
The first two steps below (forking and cloning the repo) are the same as for the steps for contributing to SPy's source code. You do not need a separate fork and clone for documentation.
First, fork the SPy repo, go to the project repo page and use the Fork button. This will create a copy of the repo, under your username (e.,g. https://github.com/yourghname/spy). (For more details on how to fork a repository see this guide.
Next, clone the repo to your machine:
Create a virtual environment for your project, and install both the SPy dependencies and the docs-specific dependencies. Any package installer and virtual environment will work; here are a couple of options:
Build a copy of the docs locally, and start a live server to view the current state of the docs:
Updating Docs
Some changes - like adding or moving files, or changes to configuration in mkdocs.yml, will not be visible immediately in the server preview. To see them, stop the server (ctl/cmd + c) and restart the live server using the commands above.
Create a new git branch to make changes on:
At this point, you're ready to start writing and editing your contributions!
Documentation Tools
SPy uses mkdocs as its documentation builder with the material for mkdocs theme, and mike to manage docs versioning. See their pages for additional information on formatting and options.
mkdocs' liveserver is more fully-featured than mike's, and is recommended for document previews. To view the versioned documents as they will be deployed, run mike deploy testdocs && mike serve, then load localhost:8000/testdocs.
Once you're happy with your changes, add them to your git branch and push them to GitHub.
Finally, open a Pull Request on the SPy GitHub page.