From 74b9afdc8d6bf996d4c5740cf740682236ef530b Mon Sep 17 00:00:00 2001 From: mdtanker Date: Thu, 12 Dec 2024 15:38:17 -0500 Subject: [PATCH] chore: dev install with environment.yml --- Makefile | 6 ++-- docs/contributing.md | 1 + environment.yml | 65 ++++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 12 ++++---- 4 files changed, 75 insertions(+), 9 deletions(-) create mode 100644 environment.yml diff --git a/Makefile b/Makefile index a55b5316..61e1b6af 100644 --- a/Makefile +++ b/Makefile @@ -10,13 +10,13 @@ print-% : ; @echo $* = $($*) #### create: - mamba create --name $(PROJECT) --yes --force --channel conda-forge pygmt geopandas python=3.11 + mamba env create --file environment.yml install: - pip install -e .[all] + pip install --no-deps -e . remove: - mamba remove --name $(PROJECT) --all + mamba env remove --name $(PROJECT) --yes pip_install: pip install $(PROJECT)[all]==$(VERSION) diff --git a/docs/contributing.md b/docs/contributing.md index 79b7e535..2e50b006 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -396,6 +396,7 @@ Now, when submitting a PR, RTD will automatically build the docs and update the * wait for a PR to be opened in the [feedstock](https://github.com/conda-forge/polartoolkit-feedstock) * update any changed dependencies in the feedstock PR and merge * wait for `conda` to publish the new version [here](https://anaconda.org/conda-forge/polartoolkit) +* manually add dependency changes to `environment.yml` * update backup `env/environment.yml` * update polartoolkit version in `environment.yml` in [PolarToolkit-Binder repo](https://github.com/mdtanker/polartoolkit-binder/blob/main/environment.yml) * test `PyPI` version with: diff --git a/environment.yml b/environment.yml new file mode 100644 index 00000000..c5f736d8 --- /dev/null +++ b/environment.yml @@ -0,0 +1,65 @@ +name: polartoolkit +channels: + - conda-forge + - nodefaults +dependencies: + - python=3.12 + # Required dependencies + - pandas + - openpyxl + - pooch + - tqdm + - verde>=1.8.0 + - xarray + - harmonica>=0.6.0 + - pyproj + - rioxarray + - scipy + - numpy + - pygmt>=0.10.0 + - geopandas<1.0 + - zarr + - python-dotenv + - requests + - deprecation + - earthaccess + # Optional dependencies + # interactive + - geoviews + - cartopy + - ipyleaflet + - ipython + # test + - pytest>=6 + - pytest-cov>=3 + - deepdiff + # docs + - sphinx>=4.0 + - sphinx-book-theme>=0.3 + - nbsphinx + - nbconvert + - sphinxcontrib-bibtex + # - ipython # repeat + # included with pip below + # - myst_parser + # - sphinx_copybutton + # - sphinx_autoapi + # - sphinx_autodoc_typehints + # - sphinx_design + # dev + - nox + - pre-commit + - pylint>=3.2 + - python-semantic-release>=8 + - ipykernel + - jupyterlab + - mypy + - pathspec + # below packages need to be installed with pip + - pip + - pip: + - sphinx_design + - sphinx_copybutton + - sphinx_autodoc_typehints + - sphinx_autoapi + - myst_parser \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d768a8c5..14726367 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ keywords = ["cryosphere", "antarctica", "arctic", "greenland", "maps", "plotting dependencies = [ "pandas", - "openpyxl", + "openpyxl", # needed for fetch.ghf to read an excel file into pandas "pooch", "tqdm", "verde>=1.8.0", @@ -68,16 +68,16 @@ test = [ ] docs = [ "sphinx>=4.0", - "myst_parser", - "sphinx_copybutton", - "sphinx_autoapi", - "sphinx_autodoc_typehints", "sphinx-book-theme>=0.3", - "sphinx_design", "nbsphinx", "nbconvert", "sphinxcontrib-bibtex", "ipython", + "myst_parser", + "sphinx_copybutton", + "sphinx_autoapi", + "sphinx_autodoc_typehints", + "sphinx_design", ] dev = [ "polartoolkit[interactive,test,docs]",