Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename repo/package mom6_regional -> regional_mom6 #47

Merged
merged 12 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
src: "./mom6_regional ./tests"
src: "./regional_mom6 ./tests"

testing:
needs: formatting
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Test with pytest
run: |
if [[ "${{ matrix.python-version }}" == "3.10" ]]; then
python -m pytest --cov=mom6_regional --cov-report=xml tests/
python -m pytest --cov=regional_mom6 --cov-report=xml tests/
else
python -m pytest tests/
fi
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ __pycache__
.ipynb_checkpoints
build
_build
mom6_regional/_version.py
mom6_regional.egg-info
regional_mom6/_version.py
regional_mom6.egg-info
.pytest_cache
env
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Angus Gibson
Copyright (c) 2023 COSIMA

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# A regional domain generator for Modular Ocean Model 6
# regional_mom6: Python package for automatic generation of regional configurations for the Modular Ocean Model 6

[![codecov](https://codecov.io/gh/COSIMA/mom6-regional/branch/master/graph/badge.svg?token=7OEZ1UZRY4)](https://codecov.io/gh/COSIMA/mom6-regional) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Documentation Status](https://readthedocs.org/projects/mom6-regional/badge/?version=latest)](https://mom6-regional.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/COSIMA/regional-mom6/branch/master/graph/badge.svg?token=7OEZ1UZRY4)](https://codecov.io/gh/COSIMA/regional-mom6) [![Documentation Status](https://readthedocs.org/projects/regional-mom6/badge/?version=latest)](https://regional-mom6.readthedocs.io/en/latest/?badge=latest) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

`mom6_regional` contains functions and classes that do most of the legwork in setting up a regional domain in MOM6.
Just provide it with some information about where, when and how big, and point it in the direction of your raw input files, and it'll sort out the boring details to create MOM6-friendly input files. Check out the [demo notebook](https://nbviewer.org/github/COSIMA/mom6-regional-scripts/blob/master/demo.ipynb)!
Just provide some information about where, when and how big, and also where raw input forcing files live. The package will sort out all the boring details to create MOM6-friendly input files.

### Python package
This repository is being converted into a python package that will be distributed via `pip` and `conda`. At the moment, there are still som legacy stuff -- hold on to your chairs as we clean up the repo and the pipelines for generating regional MOM6 configurations.
Check out the [demo notebook](https://nbviewer.org/github/COSIMA/regional-mom6/blob/m/demo.ipynb) and also the [documentation](https://readthedocs.org/projects/regional-mom6/badge/?version=latest)!
navidcy marked this conversation as resolved.
Show resolved Hide resolved
10 changes: 5 additions & 5 deletions demos/model-forced.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,10 @@
"import subprocess\n",
"from scipy.ndimage import binary_fill_holes\n",
"from importlib import reload\n",
"# os.chdir(\"/path/to/where/you/cloned/the/mom6-regional/repository\")\n",
"os.chdir(\"/home/149/ab8992/cosima_regional/mom6-regional-scripts/mom6_regional/\")\n",
"# os.chdir(\"/path/to/where/you/cloned/the/regional-mom6/repository\")\n",
"os.chdir(\"/home/149/ab8992/cosima_regional/regional-mom6/regional_mom6/\")\n",
"\n",
"import mom6_regional as ml\n",
"import regional_mom6 as ml\n",
navidcy marked this conversation as resolved.
Show resolved Hide resolved
"from dask.distributed import Client\n",
"client = Client()\n",
"client"
Expand Down Expand Up @@ -537,10 +537,10 @@
"yextent = [-48,-38.95] ## latitude\n",
"xextent = [143,150] ## longitude\n",
"\n",
"daterange = [\"1990-01-01 00:00:00\", \"1990-01-05 00:00:00\"] ## 2003 is a good compimise for GLORYs and JRA forcing as they overlap. JRA ends in 2012, GLORYS starts in 1993\n",
"daterange = [\"1990-01-01 00:00:00\", \"1990-01-05 00:00:00\"] ## 2003 is a good compromise for GLORYs and JRA forcing as they overlap. JRA ends in 2012, GLORYS starts in 1993\n",
"\n",
"## Place where all your input files go\n",
"inputdir = f\"{scratch}/mom6_regional_configs/{expt_name}/\"\n",
"inputdir = f\"{scratch}/regional_mom6_configs/{expt_name}/\"\n",
"\n",
"## Directory where you'll run the experiment from\n",
"rundir = f\"{home}/mom6_rundirs/{expt_name}/\"\n",
Expand Down
8 changes: 4 additions & 4 deletions demos/reanalysis-forced.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,10 @@
"import subprocess\n",
"from scipy.ndimage import binary_fill_holes\n",
"from importlib import reload\n",
"# os.chdir(\"/path/to/where/you/cloned/the/mom6-regional/repository\")\n",
"os.chdir(\"/home/149/ab8992/cosima_regional/mom6-regional-scripts/mom6_regional/\")\n",
"# os.chdir(\"/path/to/where/you/cloned/the/regional-mom6/repository\")\n",
"os.chdir(\"/home/149/ab8992/cosima_regional/regional-mom6/regional_mom6/\")\n",
"\n",
"import mom6_regional as ml\n",
"import regional_mom6 as ml\n",
navidcy marked this conversation as resolved.
Show resolved Hide resolved
"from dask.distributed import Client\n",
"client = Client()\n",
"client"
Expand Down Expand Up @@ -417,7 +417,7 @@
"daterange = [\"2003-01-01 00:00:00\", \"2003-01-05 00:00:00\"] ## 2003 is a good compimise for GLORYs and JRA forcing as they overlap. JRA ends in 2012, GLORYS starts in 1993\n",
"\n",
"## Place where all your input files go\n",
"inputdir = f\"{scratch}/mom6_regional_configs/{expt_name}/\"\n",
"inputdir = f\"{scratch}/regional_mom6_configs/{expt_name}/\"\n",
"\n",
"## Directory where you'll run the experiment from\n",
"rundir = f\"{home}/mom6_rundirs/{expt_name}/\"\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
API reference
===============

.. automodule:: mom6_regional.mom6_regional
.. automodule:: regional_mom6.regional_mom6
:members:
:undoc-members:
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
html_theme = "sphinx_book_theme"
html_static_path = ["_static"]
html_theme_options = {
"repository_url": "https://github.com/COSIMA/mom6-regional",
"repository_url": "https://github.com/COSIMA/regional-mom6",
"use_repository_button": True,
}
2 changes: 1 addition & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Instructions for Contributors
=============================

Before you submit a [pull request](https://github.com/COSIMA/mom6-regional/pulls) it's always a
Before you submit a [pull request](https://github.com/COSIMA/regional-mom6/pulls) it's always a
good idea to run the tests locally and catch any potential bugs/errors that might have been
introduced. Also, sometimes it's also a good idea to build the documentation locally to see
how new docstrings or any new bits of documentation that you may have added look like.
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "mom6_regional"
name = "regional_mom6"
description = "Automatic generation of regional configurations for Modular Ocean Model 6"
keywords = ["mom6", "regional", "ocean modeling"]
authors = [
Expand All @@ -21,7 +21,7 @@ requires = ["setuptools", "setuptools_scm[toml]"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["mom6_regional"]
packages = ["regional_mom6"]

[tool.setuptools_scm]
write_to = "mom6_regional/_version.py"
write_to = "regional_mom6/_version.py"
2 changes: 1 addition & 1 deletion mom6_regional/__init__.py → regional_mom6/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
except ImportError:
__version__ = "unknown"

from .mom6_regional import * # noqa
from .regional_mom6 import * # noqa
File renamed without changes.