Thank you for your interest in contributing to CPSM!
- Make sure you have a GitHub account.
- Fork this repository on GitHub.
- On your local machine, clone your fork of the repository.
- Once you have cloned the repo, create a virtual environment (e.g. with
virtualenv
or python'svenv
module) and run:to install cpsm in development mode.pip install -e .
.
├── bin // executables
├── cpsm // main project directory
│ └── templates // Jinja templates
└── docs // project website
- Add some really awesome code to your local fork. It's usually a good idea to make changes on a branch with the branch name relating to the feature you are going to add.
- When you commit your code, husky will automatically run various formatters on the code.
- When you are ready for others to examine and comment on your new feature, navigate to your fork of cpsm on GitHub and open a pull request (PR). Note that after you launch a PR from one of your fork's branches, all subsequent commits to that branch will be added to the open pull request automatically.
- Once you mark the "Ready to go" box in your Pull Request message, your code will be reviewed and commented on, and (hopefully) eventually merged!
- Add the variable to
cpsm/templates/cpsm_config_template.j2
- Add the variable to
get_init_options
incpsm.py
- Add logic, in a mode such as
save
orstart
, that makes use of the config variable. - Add the variable to the
cpsm_config.py
example underCustomization
in README, and add info about it elsewhere if applicable.
- Decide what command line arguments are needed for the mode.
- Add the mode, its command line arguments, and help message to
MODES
incpsm.py
- Document the mode in README, particularly under the
Examples
andUsage
section. - Decide what config variables (if any) are needed for the mode, and add them using the instructions above
- Add a function to
cpsm.py
that takes inargs
and then figures out what to do for the new mode. - Add the mode name and the function to the
mode_functions
dictionary inmain
incpsm.py
.
Below are some useful resources related to the creation of CPSM: