There is a newer version of the record available.

Published August 12, 2024 | Version v2.0.0
Software Open

GEOS-ESM/mepo: Initial release of mepo 2

  • 1. GMAO SSAI
  • 2. SSAI
  • 3. Space Telescope Science Institute
  • 4. NASA
  • 5. NASA SSAI

Contributors

Contact person:

Project leader:

  • 1. GMAO SSAI
  • 2. NASA

Description

This is a major release of mepo that includes a number of changes to the codebase and the way mepo is used.

The most significant change is the conversion of mepo to a Python project. This change was made to improve the maintainability of the codebase and to make it easier to add new features in the future. The conversion to a Python project also allows for better integration with other Python tools and libraries. See this commit message for more information.

Internal State Change

This major version also introduces internal changes to mepo that end users might encounter. The main change is moving from a pickle format to a json format for the internal state of mepo. This change was made to improve the readability and extensibility of the state file.

For example, if a user has an existing clone of a mepo repository that was created with mepo version 1, when they run with mepo version 2, they will see a message like:

> mepo status
Checking status...
Detected mepo1 style state
Run <mepo update-state> to permanently convert to mepo2 style
GEOSfvdycore           | (b) main
env                    | (t) v4.29.0 (DH)
cmake                  | (t) v3.45.1 (DH)
...

As the message says, the user can run mepo update-state to convert the state to mepo2 style (i.e., from pickle to json). Note that this is a one-way change!

macOS multiprocessing issue

If you have a mepo1 style state and you are on macOS, you may encounter an issue when running mepo status or mepo restore-state. For example:

> mepo status
Checking status...
Detected mepo1 style state
Run <mepo update-state> to permanently convert to mepo2 style
Process SpawnPoolWorker-2:
Traceback (most recent call last):
Process SpawnPoolWorker-5:
Process SpawnPoolWorker-1:
Traceback (most recent call last):
Process SpawnPoolWorker-3:
Traceback (most recent call last):
  File "/Users/mathomp4/.homebrew/brew/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
...

This seems to be a macOS issue with Python multiprocessing. The solution is to run mepo update-state to convert the state to mepo2 style. Then all works as expected:

> mepo update-state
Detected mepo1 style state
Run <mepo update-state> to permanently convert to mepo2 style

Converted mepo1 state to mepo2

> mepo status
Checking status...
GEOSfvdycore           | (b) main
env                    | (t) v4.29.0 (DH)
cmake                  | (t) v3.45.1 (DH)
ecbuild                | (t) geos/v1.3.0 (DH)
GMAO_Shared            | (t) v1.9.7 (DH)
GEOS_Util              | (t) v2.0.8 (DH)
...

Missing features

Note that at the moment the mepo completion scripts and mepo-cd scripts are not installed by default. This will be addressed in a future release.

From CHANGELOG.md

  • Added pyproject.toml to aid with pip installation.

  • Engineering -- Formatting with Black -- Linting with Pylint -- Dependency management and packaging with Rye

  • Added tests to cover more mepo commands

  • Add new command update-state to permanently convert mepo1 style state to mepo2

Changed

  • Converted mepo to a Python project via the following renaming -- Added src/mepo/__init__.py -- Renamed mepo.d -> src/mepo -- Renamed mepo.d/utest -> tests -- Renamed doc --> docs -- A mepo config file is now called a mepo registry -- More code reorganization

  • Helper script mepo, used for development, moved to the bin directory.

  • Added README for docs/make_md_docs.py script

  • State: pickle format (mepo1 style) to json format (mepo2 style) -- If mepo1 style state is detected, print warning and suggest running mepo update-state

What's Changed

  • Make mepo a pip-installable Python project by @pchakraborty in https://github.com/GEOS-ESM/mepo/pull/269
  • Fix small typo by @mathomp4 in https://github.com/GEOS-ESM/mepo/pull/271
  • Patch for reading mepo1 state by @pchakraborty in https://github.com/GEOS-ESM/mepo/pull/279
  • Python package with expanded testing by @pchakraborty in https://github.com/GEOS-ESM/mepo/pull/278
  • Make doc generation work again by @pchakraborty in https://github.com/GEOS-ESM/mepo/pull/286
  • Switch from Poetry to Rye for dependency management and packaging by @pchakraborty in https://github.com/GEOS-ESM/mepo/pull/290
  • Some engineering by @pchakraborty in https://github.com/GEOS-ESM/mepo/pull/292
  • Fixed a bug in mepo state creation during 'mepo update-state' by @pchakraborty in https://github.com/GEOS-ESM/mepo/pull/295
  • Make mdutils a dev-dependency instead of a dependency by @pchakraborty in https://github.com/GEOS-ESM/mepo/pull/294
  • A bug fix and '--serial' option for status and restore-state commands by @pchakraborty in https://github.com/GEOS-ESM/mepo/pull/296
  • Version 2.0.0rc4 by @pchakraborty in https://github.com/GEOS-ESM/mepo/pull/297
  • Add docs README, update main README by @mathomp4 in https://github.com/GEOS-ESM/mepo/pull/272
  • Ready to release 2.0.0 by @pchakraborty in https://github.com/GEOS-ESM/mepo/pull/298
  • Merge develop into main, for release (2.0.0) by @pchakraborty in https://github.com/GEOS-ESM/mepo/pull/300
  • Add brew tap installation instructions by @mathomp4 in https://github.com/GEOS-ESM/mepo/pull/302

Full Changelog: https://github.com/GEOS-ESM/mepo/compare/v1.52.0...v2.0.0

Files

GEOS-ESM/mepo-v2.0.0.zip

Files (86.8 kB)

Name Size Download all
md5:f6d82fe6bae865af3b838c06f15a87e4
86.8 kB Preview Download

Additional details

Related works

Is supplement to
Software: https://github.com/GEOS-ESM/mepo/tree/v2.0.0 (URL)