Skip to content

Commit

Permalink
Merge pull request #133 from nsidc/version-changelog
Browse files Browse the repository at this point in the history
Add versioning for ECDR and update dev docs
  • Loading branch information
trey-stafford authored Mar 1, 2024
2 parents c1abf0b + e80e208 commit 995d210
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# v0.1.0

* Initial version of the ECDR.
38 changes: 37 additions & 1 deletion doc/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,43 @@ To create the surface/geo mask netcdf files (containing e.g., `surface_type` and
[scripts/surface_geo_masks/README.md](scripts/surface_geo_masks/README.md)


## Making a data release
## Making a release and updating versions

### Making a code release

Note that, depending on the changes made, a new version of G02202 may also be
appropriate. Please review the secion on "Making a data release" if a new data
release is also needed.

#### Versioning the code

First, appropriately version the code with `bumpversion` (see
[bump-my-version](https://github.com/callowayproject/bump-my-version)).

To bump the specified part of the version:

```
$ bumpversion bump {major|minor|patch}
```

`bumpversion` configuration can be found in the `pyproject.toml`.

#### Updating the CHANGELOG

Each PR should update the CHANGELOG to reflect the version of the ECDR that's
being released/prepared.

#### Releasing a new version

To release a new version of the software, create a tag for the version you wish
to release and push that tag to the GitHub repo.

TODO: on tags, build and push a tagged Docker image and/or conda library. This
code is still in development and a formal release artifact is not currently
being created.


### Making a data release

When making a new release of G02202 based on this code:

Expand Down
2 changes: 2 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ dependencies:
- nco ~=5.1.9
- pandas ~=1.4.4
- opencv ~=4.8.0
- pm_tb_data ~=0.4.0
- pm_icecon ~=0.3.1

#############################
# Non-imported dependencies #
Expand Down
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
name = "seaice_ecdr"
version = "0.1.0"

[tool.bumpversion]
current_version = "0.1.0"
commit = false
tag = false

[[tool.bumpversion.files]]
filename = "seaice_ecdr/__init__.py"
search = '__version__ = "v{current_version}"'
replace = '__version__ = "v{new_version}"'

[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

[tool.black]
target-version = ["py310"]

Expand Down
2 changes: 2 additions & 0 deletions seaice_ecdr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

from seaice_ecdr.constants import LOGS_DIR

__version__ = "v0.1.0"

DEFAULT_LOG_LEVEL = "INFO"

# If we're in dev, DEBUG level logs are appropriate, otherwise use INFO.
Expand Down

0 comments on commit 995d210

Please sign in to comment.