|
86 | 86 | "cell_type": "markdown", |
87 | 87 | "metadata": {}, |
88 | 88 | "source": [ |
89 | | - "## Make your Changes\n", |
90 | | - "\n", |
91 | | - "When working on a new project, there are often going to be dependencies. In order to isolate dependencies between different projects, it's a good practice to use a virtual environment. STUMPY supports both [venv](https://docs.python.org/3/library/venv.html) and [conda](https://docs.conda.io/en/latest/). After creating and activating either of these virtual environments, any dependencies you install will be isolated (so they don't break anything else on your system).\n", |
92 | | - "\n", |
93 | | - "First, install the dependencies using the [From Source Section](https://stumpy.readthedocs.io/en/latest/install.html#from-source) of the installation instructions. If you are building STUMPY within a conda environment, then you may consider using the `conda.sh` shell script which will automatically assist you in installing all of the required dependencies required for testing. \n", |
| 89 | + "## Adhere to CONTRIBUTING.md Guidance\n", |
94 | 90 | "\n", |
95 | | - "A good check to make sure everything is working 100% is to run the unit tests. For STUMPY, we have scripts to help you do that. You'll run `./setup.sh && ./test.sh`. In some cases, you may notice an uninstallation message for STUMPY but don't worry. This happens if you have had previously installed STUMPY as the `./setup.sh` command first uninstalls any existing version of STUMPY and then it will re-installs it from source (the local, cloned, development version). So, everything should be all set.\n", |
| 91 | + "One of the great benefits of open source is the ability to collaborate with developers from around the world. However, you can imagine that combining their contributions into one coherent codebase while maintaining consistency can be challenging. Luckily, recent gains in automated tooling have made this a lot easier. Remember [CONTRIBUTING.md](https://github.com/TDAmeritrade/stumpy/blob/master/CONTRIBUTING.md)? There are a couple of things we want to make sure we do before we submit a `pull request`.\n", |
96 | 92 | "\n", |
97 | | - "Ideally, you'll see the excellent STUMPY test coverage passing. If things start failing or breaking, then you may have a missing dependency problem. There's nothing worse than finding this out *after* you've made changes.\n", |
| 93 | + "First, if you implemented a new feature or changed an existing feature, then you are also responsible for providing the unit test. This can often be just as much work as the feature, so make sure you account for it.\n", |
98 | 94 | "\n", |
99 | | - "If all of the tests pass, then you know that you have a working copy of STUMPY to start your development on. Go ahead and implement your feature or change!\n", |
| 95 | + "Next, run `flake8` and `black`. [flake8](https://flake8.pycqa.org/en/latest/) is a linter that checks the style and quality of the code. [black](https://pypi.org/project/black/) makes any necessary changes to ensure consistent code format.\n", |
100 | 96 | "\n", |
101 | 97 | "Checklist: \n", |
102 | | - "- [ ] Create a virtual environment \n", |
103 | | - "- [ ] Install dependencies \n", |
104 | | - "- [ ] Run the unit tests" |
| 98 | + "- [ ] Write/update any unit tests \n", |
| 99 | + "- [ ] Run `black --exclude=\".*\\.ipynb\" --extend-exclude=\".venv\" --diff ./` to reformat any python files you changed \n", |
| 100 | + "- [ ] Run `flake8 --extend-exclude=.venv ./` to identify any formatting errors before you submit your `pull request` \n", |
| 101 | + "- [ ] Run the unit tests. In STUMPY, you'll run `./setup.sh dev && ./test.sh`" |
105 | 102 | ] |
106 | 103 | }, |
107 | 104 | { |
108 | 105 | "cell_type": "markdown", |
109 | 106 | "metadata": {}, |
110 | 107 | "source": [ |
111 | | - "## Adhere to CONTRIBUTING.md Guidance\n", |
| 108 | + "## Make your Changes\n", |
112 | 109 | "\n", |
113 | | - "One of the great benefits of open source is the ability to collaborate with developers from around the world. However, you can imagine that combining their contributions into one coherent codebase while maintaining consistency can be challenging. Luckily, recent gains in automated tooling have made this a lot easier. Remember [CONTRIBUTING.md](https://github.com/TDAmeritrade/stumpy/blob/master/CONTRIBUTING.md)? There are a couple of things we want to make sure we do before we submit a `pull request`.\n", |
| 110 | + "When working on a new project, there are often going to be dependencies. In order to isolate dependencies between different projects, it's a good practice to use a virtual environment. STUMPY supports both [venv](https://docs.python.org/3/library/venv.html) and [conda](https://docs.conda.io/en/latest/). After creating and activating either of these virtual environments, any dependencies you install will be isolated (so they don't break anything else on your system).\n", |
114 | 111 | "\n", |
115 | | - "First, if you implemented a new feature or changed an existing feature, then you are also responsible for providing the unit test. This can often be just as much work as the feature, so make sure you account for it.\n", |
| 112 | + "First, install the dependencies using the [From Source Section](https://stumpy.readthedocs.io/en/latest/install.html#from-source) of the installation instructions. If you are building STUMPY within a conda environment, then you may consider using the `conda.sh` shell script which will automatically assist you in installing all of the required dependencies required for testing. \n", |
116 | 113 | "\n", |
117 | | - "Next, run `flake8` and `black`. [flake8](https://flake8.pycqa.org/en/latest/) is a linter that checks the style and quality of the code. [black](https://pypi.org/project/black/) makes any necessary changes to ensure consistent code format.\n", |
| 114 | + "A good check to make sure everything is working 100% is to run the unit tests. For STUMPY, we have scripts to help you do that. You'll run `./setup.sh dev && ./test.sh`. In some cases, you may notice an uninstallation message for STUMPY but don't worry. This happens if you have had previously installed STUMPY as the `./setup.sh dev` command first uninstalls any existing version of STUMPY and then it will re-installs it from source (the local, cloned, development version). So, everything should be all set.\n", |
| 115 | + "\n", |
| 116 | + "Ideally, you'll see the excellent STUMPY test coverage passing. If things start failing or breaking, then you may have a missing dependency problem. There's nothing worse than finding this out *after* you've made changes.\n", |
| 117 | + "\n", |
| 118 | + "If all of the tests pass, then you know that you have a working copy of STUMPY to start your development on. Go ahead and implement your feature or change!\n", |
118 | 119 | "\n", |
119 | 120 | "Checklist: \n", |
120 | | - "- [ ] Write/update any unit tests \n", |
121 | | - "- [ ] Run `black` to reformat any python files you changed \n", |
122 | | - "- [ ] Run `flake8` to identify any formatting errors before you submit your `pull request` \n", |
123 | | - "- [ ] Run the unit tests. In STUMPY, you'll run `./setup.sh && ./test.sh`" |
| 121 | + "- [ ] Create a virtual environment \n", |
| 122 | + "- [ ] Install dependencies \n", |
| 123 | + "- [ ] Run the unit tests" |
124 | 124 | ] |
125 | 125 | }, |
126 | 126 | { |
|
157 | 157 | "- [ ] `git pull` \n", |
158 | 158 | "- [ ] `git checkout branch_name` \n", |
159 | 159 | "- [ ] `git merge main` \n", |
160 | | - "- [ ] Run the unit tests: `./setup.sh && ./test.sh` \n", |
| 160 | + "- [ ] Run the unit tests: `./setup.sh dev && ./test.sh` \n", |
161 | 161 | "\n", |
162 | 162 | "Checklist (fetching upstream locally): \n", |
163 | 163 | "- [ ] `git fetch upstream`\n", |
164 | 164 | "- [ ] `git checkout main` \n", |
165 | 165 | "- [ ] `git merge upstream/main` \n", |
166 | 166 | "- [ ] `git checkout branch_name` \n", |
167 | 167 | "- [ ] `git merge main` \n", |
168 | | - "- [ ] Run the unit tests: `./setup.sh && ./test.sh` \n", |
| 168 | + "- [ ] Run the unit tests: `./setup.sh dev && ./test.sh` \n", |
169 | 169 | "\n", |
170 | 170 | " " |
171 | 171 | ] |
|
180 | 180 | "\n", |
181 | 181 | "Here's your next chance to communicate with the maintainers. Let them know what changes you made and if you need any help. This pull request will now be the running dialogue between you and the maintainers as you work on the issue.\n", |
182 | 182 | "\n", |
183 | | - "Continuous integration systems automatically determine the suitability of merging pull requests. They check the formatting, test coverage, and test success of your code. After you submit a pull request, you'll see these running (as comments in your pull request). If they fail, your code will not be merged until the failure is fixed. In STUMPY, locally passing `flake8`, `black`, and `./setup.sh && ./test.sh` should ensure your continuous integration tests pass.\n", |
| 183 | + "Continuous integration systems automatically determine the suitability of merging pull requests. They check the formatting, test coverage, and test success of your code. After you submit a pull request, you'll see these running (as comments in your pull request). If they fail, your code will not be merged until the failure is fixed. In STUMPY, locally passing `flake8`, `black`, and `./setup.sh dev && ./test.sh` should ensure your continuous integration tests pass.\n", |
184 | 184 | "\n", |
185 | 185 | "Checklist: \n", |
186 | 186 | "- [ ] Create a Pull Request \n", |
|
249 | 249 | "- [ ] Install dependencies \n", |
250 | 250 | "- [ ] Run the unit tests \n", |
251 | 251 | "- [ ] Write/update any unit tests \n", |
252 | | - "- [ ] Run `black` to reformat any python files you changed \n", |
253 | | - "- [ ] Run `flake8` to identify any formatting errors before you submit your `pull request` \n", |
254 | | - "- [ ] Run the unit tests. In STUMPY, you'll run `./setup.sh && ./test.sh` \n", |
| 252 | + "- [ ] Run `black --exclude=\".*\\.ipynb\" --extend-exclude=\".venv\" --diff ./` to reformat any python files you changed \n", |
| 253 | + "- [ ] Run `flake8 --extend-exclude=.venv ./` to identify any formatting errors before you submit your `pull request` \n", |
| 254 | + "- [ ] Run the unit tests. In STUMPY, you'll run `./setup.sh dev && ./test.sh` \n", |
255 | 255 | "- [ ] `git add your_file` \n", |
256 | 256 | "- [ ] `git commit -m 'Great Commit Message'` \n", |
257 | 257 | "- [ ] `git push` \n", |
|
266 | 266 | ], |
267 | 267 | "metadata": { |
268 | 268 | "kernelspec": { |
269 | | - "display_name": "Python 3", |
| 269 | + "display_name": "Python 3 (ipykernel)", |
270 | 270 | "language": "python", |
271 | 271 | "name": "python3" |
272 | 272 | }, |
|
280 | 280 | "name": "python", |
281 | 281 | "nbconvert_exporter": "python", |
282 | 282 | "pygments_lexer": "ipython3", |
283 | | - "version": "3.9.5" |
| 283 | + "version": "3.12.4" |
284 | 284 | } |
285 | 285 | }, |
286 | 286 | "nbformat": 4, |
|
0 commit comments