CROCODILE-CESM / regional-mom6

Automatic generation of regional configurations of the Modular Ocean Model 6 (MOM6) in Python
https://regional-mom6.readthedocs.io/en/latest
MIT License
0 stars 0 forks source link

Creating a dev environment? #18

Open alperaltuntas opened 1 week ago

alperaltuntas commented 1 week ago

Sorry if this is already in the docs, but what is the proper way to create a development environment?

I attempted create an env with below commands but ended up with missing libraries like dask, xarray:

git clone https://github.com/CROCODILE-CESM/regional-mom6 cd regional-mom6 conda env create -f environment-ci.yml

ashjbarnes commented 1 week ago

mamba install esmf git clone regional_mom6 && cd PATH pip install -e .

This gives an editable install. I find editable install more robust with pip than with mamba, but you can't install esmf via pip

ashjbarnes commented 1 week ago

@alperaltuntas if this works we should put this explicitly in the README!

alperaltuntas commented 1 week ago

I got:

      ModuleNotFoundError: No module named 'mpi4py'
      [end of output]

commit hash: f562b1

alperaltuntas commented 1 week ago

Got the same error again when I attempted a fresh installation.

ashjbarnes commented 1 week ago

What about with the conda install, same as the CI uses? Might be somehow tied to pip

alperaltuntas commented 1 week ago

I manually conda-installed netCDF4, which apperaently requires mpi4py, and it seems to have passed that step and continuing with the install just fine so far.

alperaltuntas commented 1 week ago

I got another error later in numba installation:

      RuntimeError: Cannot install on Python version 3.13.0; only versions >=3.9,<3.13 are supported.
      [end of output]
manishvenu commented 1 week ago

I got another error later in numba installation:

      RuntimeError: Cannot install on Python version 3.13.0; only versions >=3.9,<3.13 are supported.
      [end of output]

Huh, that's interesting, are you installing it on Python 3.13? Other than dropping the version trying this yml file might work as well. It has everything except regional-mom6 itself, so adding a sys.path.insert(0,...) than importing regional_mom6 should work

manishvenu commented 3 days ago

Main Project issue for this is https://github.com/CROCODILE-CESM/crocodile-regional-ruckus/issues/5