Skip to content

Release 1.0.2#85

Merged
btobers merged 6 commits intomasterfrom
dev
Mar 13, 2025
Merged

Release 1.0.2#85
btobers merged 6 commits intomasterfrom
dev

Conversation

@btobers
Copy link
Collaborator

@btobers btobers commented Mar 12, 2025

pygem.setup.config.ConfigManager class created, automated tests set up for PRs to dev and master branches.

ddundo and others added 6 commits February 27, 2025 15:43
Closes #52.

This PR adds a workflow to automatically build and push the PyGEM image to the GitHub Container Registry (ghcr.io), that will then be visible at https://github.com/orgs/PyGEM-Community/packages. It builds it from the Dockerfile that I add as well.

It's pushed to ghcr only when the workflow is triggered on the master or dev branches: that is, if it's triggered by schedule or when we merge relevant commits to the branches. But it's always built in PRs so we can check that it builds successfully.

Currently the image is quite large (9.1 GB) but can be reduced to about 2.5GB, as described in #60.
Closes #53.

This PR adds a workflow that runs the test suite every Saturday and every time commits are pushed to open PRs or to the master and dev branches. In the interest of green computing, it is only triggered if these commits change at least one of these files:
- any `.py` file
- the workflow itself, i.e., `.github/workflows/test_suite.yml`
- `pyproject.toml` so that we can test the installation

Deleted `test_oggm_compat.py` since all tests fail anyway.
Partially addresses #50.

With this PR, `simple_test.ipynb` and `advanced_test.ipynb` will now be automatically tested in CI. Other notebooks can be added later.
* config.py now object oriented and contains update_config() function

* all prior calls to config updated for compatability with new config.ConfigManager class

* raise errors, and ensure that dictionary keys are not overwritten

* create_config() function created and _prompt_overwrite() function removed to clean up the class and remove redundancy

* config test created

* update source_config_path

Co-authored-by: Davor Dundovic <33790330+ddundo@users.noreply.github.com>

* remove self.package_dir definition

* update source path

Co-authored-by: Davor Dundovic <33790330+ddundo@users.noreply.github.com>

* rename ruamel.yaml.YAML() as ryaml

* call ensure_config() upon __init__

* user config validation, make sure necessary keys exist

* ConfigManager.ensure_config() calls removed, now handled on __init__

* bug fix with commit:4fd5493

* more tests added to test_config

* more tests and TypeError checks in update_config

* test ensure config, no overwrite

* remove CLI update_config funcitonality

* Handle datatypes in `config.yaml` and expand tests (#79)

* clean up imports

Co-authored-by: Davor Dundovic <33790330+ddundo@users.noreply.github.com>

* add `advanced_test_tw.ipynb` test

* typo fix

* add __all__ variable

Co-authored-by: Davor Dundovic <33790330+ddundo@users.noreply.github.com>

* cleanup commenting

Co-authored-by: Davor Dundovic <33790330+ddundo@users.noreply.github.com>

* cleanup commenting

Co-authored-by: Davor Dundovic <33790330+ddundo@users.noreply.github.com>

* more descriptive variable in validate_config

* private methods and expanded docstrings

* swap PyGEM-Notebooks clone repo back to main branch

* clone appropriate PyGEM-notebook brach

* comment added

---------

Co-authored-by: Davor Dundovic <33790330+ddundo@users.noreply.github.com>
Closes [#80](#80).

This PR adds a `outputfn_sfix` argument to the argument parser of `pygem.bin.run.run_simulation.py`, such that a simulation file name suffix can be customized. Docstrings also added throughout `pygem.output.py`.
Closes #51.

Contribution guided added to documentation.  PyGEM installation instructions expanded upon. `pygem_environment.yml` file created for simple install.
@btobers btobers requested a review from a team March 12, 2025 23:37
@btobers btobers self-assigned this Mar 12, 2025
@btobers btobers marked this pull request as ready for review March 12, 2025 23:39
@btobers btobers marked this pull request as draft March 12, 2025 23:39
@btobers btobers marked this pull request as ready for review March 12, 2025 23:48
@ddundo
Copy link
Contributor

ddundo commented Mar 13, 2025

If I can push my nose in... I think it would be good to not squash commits when merging from dev to master. That way we retain a more complete commit history on the master branch, so it's easier to track changes/new features/etc.

@btobers
Copy link
Collaborator Author

btobers commented Mar 13, 2025

If I can push my nose in... I think it would be good to not squash commits when merging from dev to master. That way we retain a more complete commit history on the master branch, so it's easier to track changes/new features/etc.

I completely agree. I was just looking into why the only option that shows up is "Squash and merge"

@btobers
Copy link
Collaborator Author

btobers commented Mar 13, 2025

Got it, we just had the "Allow merge commits" option disabled in Settings->General.

@btobers btobers closed this Mar 13, 2025
@btobers btobers reopened this Mar 13, 2025
@btobers btobers merged commit f15c3a6 into master Mar 13, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants