Changes Submission Guide¶
-
Prior to making any changes, please inform our team to discuss your proposed updates using a github issue. This ensures everyone is informed about ongoing work and allows for constructive feedback. You can submit feature requests, bug reports, and other issues on our Issues page. For general ideas and queries, please use our Discussions page.
-
Ensure your fork is up-to-date with our main code at
jacksund/simmate
. This is essential if it's been a while since your last update. -
Open the file you wish to edit in Spyder and make your changes.
-
Don't forget to save all file changes in Spyder.
-
Simmate enforces clean, readable code. We utilize the
black
formatter and isort for managing imports. Execute these commands in the~/Documents/github/simmate
directory once you are done making changes:isort . black .
-
Simmate uses pytest to ensure new changes don't interfere with existing features. Run these tests to validate your changes. Execute this command in the
~/Documents/github/simmate
directory:# you can optionally run tests in parallel # with a command such as "pytest -n 4" pytest
-
If all tests are successful, your changes are ready for submission to Simmate!
-
Use GitKraken to review your changes. If the changes are satisfactory,
stage
andcommit
them to the new branch of your repo (yourname/simmate
). -
Open a pull-request to merge your changes into our main code (
jacksund/simmate
). We'll review your changes and merge them if they meet our standards. You can add an emoji to your pull request title to show you've read the tutorial.
Tip
You can also format files while coding with Spyder. Go to Tools
-> Preferences
-> Completion and Linting
-> Code Style and Formatting
> select black
from the code formatting dropdown. To format an open file in Spyder, use the Ctrl+Shift+I
shortcut.
Note
Currently, Spyder does not have a plugin for pytest. For now they only support a Unittest plugin.