|
1 | 1 | Developer Notes
|
2 | 2 | ===============
|
3 | 3 |
|
4 |
| -Last updated: 10 August 2020 |
| 4 | +Last updated: 3 November 2021 |
5 | 5 |
|
6 |
| -Reproducibility Files |
7 |
| ---------------------- |
| 6 | +Creating a new release of pyCSEP |
| 7 | +-------------------------------- |
8 | 8 |
|
9 |
| -Store information for reproducibility. This should include the following: |
10 |
| - 1. version information (git hash of commit) |
11 |
| - 2. forecast filename |
12 |
| - 3. evaluation catalog (including necessary information to recreate the filtering properties); maybe just md5 |
13 |
| - 4. do we need calculation dates? |
| 9 | +These are the steps required to create a new release of pyCSEP. This requires a combination of updates to the repository |
| 10 | +and Github. You will need to build the wheels for distribution on PyPI and upload them to GitHub to issue a release. |
| 11 | +The final step involves uploading the tar-ball of the release to PyPI. CI tools provided by `conda-forge` will automatically |
| 12 | +bump the version on `conda-forge`. Note: permissions are required to push new versions to PyPI. |
14 | 13 |
|
15 |
| -Evaluation Results |
16 |
| ------------------- |
| 14 | +1. Code changes |
| 15 | +*************** |
| 16 | +1. Bump the version number in `_version.py <https://github.com/SCECcode/pycsep/tree/master/csep/_version.py>`_ |
| 17 | +2. Update `codemeta.json <https://github.com/SCECcode/pycsep/blob/master/codemeta.json>`_ |
| 18 | +3. Update `CHANGELOG.md <https://github.com/SCECcode/pycsep/blob/master/CHANGELOG.md>`_. Include links to Github pull requests if possible. |
| 19 | +4. Update `CREDITS.md <https://github.com/SCECcode/pycsep/blob/master/CREDITS.md>`_ if required. |
| 20 | +5. Update the version in `conf.py <https://github.com/SCECcode/pycsep/blob/master/docs/conf.py>`_. |
| 21 | +6. Issue a pull request that contains these changes. |
| 22 | +7. Merge pull request when all changes are merged into `master` and versions are correct. |
17 | 23 |
|
18 |
| -* Each evaluation should return an evaluation result class that has an associated .plot() method. |
19 |
| -* We should be able to .plot() most everything that makes sense including forecasts and evaluation results. |
| 24 | +2. Creating source distribution |
| 25 | +******************************* |
20 | 26 |
|
21 |
| - * How do we .plot() a catalog? |
22 |
| - * Should we .plot() a region? |
23 |
| - * For serialization, we can identify the appropriate class as a string in the class state and use that to create the correct object on load. |
| 27 | +Issue these commands from the top-level directory of the project:: |
24 | 28 |
|
25 |
| -Forecast metadata information |
26 |
| ------------------------------ |
| 29 | + python setup.py check |
27 | 30 |
|
28 |
| -1. Forecast should contain metadata information to identify properties of the forecast |
| 31 | +If that executes with no warnings or failures build the source distribution using the command:: |
29 | 32 |
|
30 |
| - * Start and end date |
31 |
| - * Spatial region |
32 |
| - * Magnitude bins |
| 33 | + python setup.py sdist |
33 | 34 |
|
34 |
| -Working with GriddedForecasts |
35 |
| ------------------------------ |
| 35 | +This creates a folder called `dist` that contains a file called `pycsep-X.Y.Z.tar.gz`. This is the distribution |
| 36 | +that will be uploaded to `PyPI`, `conda-forge`, and Github. |
36 | 37 |
|
37 |
| -* Right now, we can only spatial counts over the entire magnitude range. What if we wanted to have some control over this? |
38 |
| -* Might want to plot above some magnitude threshold or within some incremental threshold. |
39 |
| -* Should be able to have a method that returns a new GriddedForecast with specified parameters such as min/max magnitude. |
40 |
| - |
41 |
| -Region information |
42 |
| ------------------- |
43 |
| -* The region information will need to accommodate more complex spaces including 3D areas and those with non-regular grids (e.g., |
44 |
| - quadtrees or meshes) |
| 38 | +Upload to PyPI using `twine`. This requires permissions to push to the PyPI account. |
45 | 39 |
|
| 40 | +3. Create release on Github |
| 41 | +*************************** |
| 42 | +1. Create a new `release <https://github.com/SCECcode/pycsep/releases>`_ on GitHub. This can be saved as a draft until it's ready. |
| 43 | +2. Copy new updates information from `CHANGELOG.md <https://github.com/SCECcode/pycsep/blob/master/CHANGELOG.md>`_. |
| 44 | +3. Upload tar-ball created from `setup.py`. |
| 45 | +4. Publish release. |
0 commit comments