Skip to content

Commit

Permalink
Merge PR #283 (Implement several minor bug fixes)
Browse files Browse the repository at this point in the history
This merge brings PR #283 (Implement several minor bug fixes
(matplotlib 3.8+, GitHub actions, remove obsolete features),
by @yantosca) into the GCPy development stream.

This PR fixes a bug in compare_diags.py, removes the Pylint GitHub
action, among other updates.

Signed-off-by: Bob Yantosca <[email protected]>
  • Loading branch information
yantosca committed Feb 6, 2024
2 parents a55badc + 0353730 commit fb076e2
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 117 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/pylint.yml

This file was deleted.

17 changes: 11 additions & 6 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ name: Mark stale issues and pull requests

on:
schedule:
- cron: '32 22 * * *'
# Job will run at midnight on the 1st of each month (POSIX time syntax)
- cron: '0 0 1 * *'

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
Expand All @@ -21,7 +21,12 @@ jobs:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
# Stale issue settings
days-before-issue-stale: 30
days-before-issue-close: 30
stale-issue-label: 'stale'
stale-issue-message: 'This issue is stale because it has been open for 30 days with no activity.'
close-issue-message: "This issue was closed because it has been inactive for 30 days since being marked as stale."
# Never mark PRs as stale
days-before-pr-stale: -1
days-before-pr-close: -1
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Bump pip from 23.2.1 to 23.3 (dependabot suggested this)
- Bump pypdf from 3.16.1 to 3.17.0 (dependabot suggested this)
- YAML tag `operations_budget` is now `ops_budget_table` in `gcpy/benchmark/config/1yr_tt_benchmark.yml`
- Now require `matplotlib=3.8.0` in `docs/environment_files/environment.yml` (with other pegged versions)
- Now run the `stale` GitHub action at 00:00 UTC on the 1st of each month

### Fixed
- CS inquiry functions in `gcpy/cstools.py` now work properly for `xr.Dataset` and `xr.DataArray` objects
- Prevent an import error by using `seaborn-v0_8-darkgrid` in`gcpy/benchmark/modules/benchmark_models_vs_obs.py`
- `gcpy/file_regrid.py` now creates GCHP files with `DELP_DRY` instead of `DELPDRY`
- Fixed bugs in GCHP vs GCHP sections of 1-yr benchmark run scripts to allow comparison of GCHP runs with different grid resolutions
- Fixed silent bug in transport tracer benchmark GCC vs GCHP mass tables preventing them from being generated
- Import error in `gcpy/examples/diagnostics/compare_diags.py`
- Added missing `n_cores` to `gcpy/examples/diagnostics/compare_diags.yml`

### Removed
- Example script `gcpy/examples/plotting/mda8_o3_timeseries.py`
- Removed `Pylint` GitHub action

## [1.4.2] - 2024-01-26
### Added
Expand Down
6 changes: 3 additions & 3 deletions gcpy/examples/diagnostics/compare_diags.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import warnings
import numpy as np
from gcpy.util import add_missing_variables, compare_varnames, \
dataset_reader, read_config_file
dataset_reader, read_config_file, rename_and_flip_gchp_rst_vars
from gcpy.constants import skip_these_vars
from gcpy.plot.compare_single_level import compare_single_level
from gcpy.plot.compare_zonal_mean import compare_zonal_mean
Expand Down Expand Up @@ -109,8 +109,8 @@ def read_data(config):
# If the data is from a GCHP restart file, rename variables and
# flip levels to match the GEOS-Chem Classic naming and level
# conventions. Otherwise no changes will be made.
refdata = util.rename_and_flip_gchp_rst_vars(refdata)
devdata = util.rename_and_flip_gchp_rst_vars(devdata)
refdata = rename_and_flip_gchp_rst_vars(refdata)
devdata = rename_and_flip_gchp_rst_vars(devdata)

# Define dictionary for return
data = {
Expand Down
1 change: 1 addition & 0 deletions gcpy/examples/diagnostics/compare_diags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ options:
filename: ''
skip_small_diffs: True
small_diff_threshold: 0.0000
n_cores: -1
1 change: 0 additions & 1 deletion gcpy/examples/timeseries/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""
GCPy import script
"""
from .mda8_o3_timeseries import *
from .plot_timeseries import *

84 changes: 0 additions & 84 deletions gcpy/examples/timeseries/mda8_o3_timeseries.py

This file was deleted.

0 comments on commit fb076e2

Please sign in to comment.