Skip to content

Initial release of mepo 2

Compare
Choose a tag to compare
@mathomp4 mathomp4 released this 12 Aug 13:59
· 11 commits to main since this release
1b379a0

DOI

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/[email protected]/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

Full Changelog: v1.52.0...v2.0.0