Skip to content

Update dev#89

Merged
ddundo merged 9 commits intodevfrom
update_dev
Mar 18, 2025
Merged

Update dev#89
ddundo merged 9 commits intodevfrom
update_dev

Conversation

@ddundo
Copy link
Contributor

@ddundo ddundo commented Mar 18, 2025

Synchronises dev branch with master branch.

ddundo and others added 9 commits March 13, 2025 09:04
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.
@ddundo ddundo requested a review from btobers March 18, 2025 19:38
@ddundo ddundo merged commit e29ce3e into dev Mar 18, 2025
1 check passed
@ddundo ddundo deleted the update_dev branch March 18, 2025 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants