Creating and submitting changes¶
Make sure you have contacted our team on the changes you wish to make. This lets everyone know what is being working on and allows other contributors to give feedback/advice. You can request features, report bugs, etc. in our Issues page. General ideas and questions are better suited for our Discussions page.
Make sure your fork is up to date with our main code at
jacksund/simmate. This is only important if it's been more than a couple days since your last update. So if you just completed the previous section, you should be good to go here.
Have the Simmate directory open in Spyder. This was done in steo 8 of the previous section.
In Spyder, open the file you want and make your edits!
Make sure you saved all file changes in Spyder.
Simmate requires code to be nicely formatted and readable. To do this, we use the
blackformatter and isort for organzing imports. Make sure you are in the
~/Documents/github/simmatedirectory when you run these two commands:
isort . black .
Simmate has test cases to make sure new changes don't break any of Simmate's existing features. These are written using pytest. Run these to check your changes. Make sure you are in the
~/Documents/github/simmatedirectory when you run this command:
# you can optionally run tests in parallel # with a command such as "pytest -n 4" pytest
If everything passes, your changes can be accepted into Simmate!
Open GitKraken, and you should then see your changes listed. For changes that you are happy with,
committhem to the
mainbranch of your repo (
yourname/simmate). Feel free to add an emoji to the start of your commit message. These icons simply tell us that you read the tutorial (and also emojis are a fun distraction).
Now open a pull-request to merge your changes into our main code (currently at
jacksund/simmate). We will review your changes and merge them if they pass all of our checks.
you can optionally format files as you code with Spyder too.
Completion and Linting ->
Code Style and Formatting > Under code formatting dropdown, select
black. To format a file you have open in Spyder, use the the
Spyder does not yet have a plugin for pytest. We are still waiting on this feature to be built alongside their Unittest plugin.