From cb60907e4f1d1e4cd83e6f16502616881beac9b6 Mon Sep 17 00:00:00 2001 From: Matthew Davis Date: Fri, 12 Jun 2026 11:19:55 +0200 Subject: [PATCH 1/2] Add conda meta.yaml --- conda/README.md | 7 +++++++ conda/meta.yaml | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ pyproject.toml | 1 + 3 files changed, 59 insertions(+) create mode 100644 conda/README.md create mode 100644 conda/meta.yaml diff --git a/conda/README.md b/conda/README.md new file mode 100644 index 0000000..0a0d677 --- /dev/null +++ b/conda/README.md @@ -0,0 +1,7 @@ +# Conda Recipe + +`meta.yaml` is used to package up Nemosis to publish on Conda forge. + +It was generated with [grayskull](https://github.com/conda/grayskull). + +When the dependencies of nemosis change, unfortunately we need to update them in `meta.yaml` as well as `../pyproject.yaml`. \ No newline at end of file diff --git a/conda/meta.yaml b/conda/meta.yaml new file mode 100644 index 0000000..ec8f57d --- /dev/null +++ b/conda/meta.yaml @@ -0,0 +1,51 @@ +{% set version = "3.8.1" %} + +package: + name: nemosis + version: {{ version }} + +source: + url: https://pypi.org/packages/source/n/nemosis/nemosis-{{ version }}.tar.gz + sha256: 97eeeb46be38f82d4e2bc9375c60fc86e0d708a3fb7e26d9d3aa7517d9c0a397 + +build: + noarch: python + script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation + number: 0 + +requirements: + host: + - python >=3.10 + - hatchling + - pip + run: + - python >=3.10 + - requests >=2.32.3 + - pyarrow >=22.0.0 + - feather-format >=0.4.1 + - pandas >=2.2.3 + - xlrd >=2.0.1 + - beautifulsoup4 >=4.12.3 + - openpyxl >=5.5.0 + +test: + imports: + - nemosis + commands: + - pip check + requires: + - pip + - python + +about: + home: https://github.com/UNSW-CEEM/NEMOSIS/ + summary: A tool for accessing AEMO data. + description: > + A Python package for downloading historical data + published by the Australian Energy Market Operator (AEMO) + license: GPL-3.0-only + license_file: LICENSE + +extra: + recipe-maintainers: + - mdavis-xyz diff --git a/pyproject.toml b/pyproject.toml index 3b7ffa1..ded9f97 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,7 @@ authors = [ { name = "prakaa", email = "abiprakash007@gmail.com" } ] dependencies = [ + # If updating these, also apply the same update to ./conda/meta.yaml "requests>=2.32.3", "pyarrow>=22.0.0", "feather-format>=0.4.1", From 5aba431a0dd2c4fb49342d1e570b9de842e7872f Mon Sep 17 00:00:00 2001 From: Matthew Davis Date: Fri, 12 Jun 2026 16:48:56 +0200 Subject: [PATCH 2/2] Change Conda meta.yaml to recipe.yaml (new format) --- conda/README.md | 7 +++--- conda/meta.yaml | 51 ------------------------------------------ conda/recipe.yaml | 56 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 54 deletions(-) delete mode 100644 conda/meta.yaml create mode 100644 conda/recipe.yaml diff --git a/conda/README.md b/conda/README.md index 0a0d677..e212304 100644 --- a/conda/README.md +++ b/conda/README.md @@ -1,7 +1,8 @@ # Conda Recipe -`meta.yaml` is used to package up Nemosis to publish on Conda forge. +`recipe.yaml` is used to package up Nemosis to publish on Conda forge. -It was generated with [grayskull](https://github.com/conda/grayskull). +More info on this file structure is available [here](https://conda-forge.org/docs/maintainer/example_recipes/pure-python/). -When the dependencies of nemosis change, unfortunately we need to update them in `meta.yaml` as well as `../pyproject.yaml`. \ No newline at end of file +When the dependencies of Nemosis change in `../pyproject.toml`, we don't _need_ to update this file too. +Conda has scripts to check new releases on Pypi and adjust them accordingly. diff --git a/conda/meta.yaml b/conda/meta.yaml deleted file mode 100644 index ec8f57d..0000000 --- a/conda/meta.yaml +++ /dev/null @@ -1,51 +0,0 @@ -{% set version = "3.8.1" %} - -package: - name: nemosis - version: {{ version }} - -source: - url: https://pypi.org/packages/source/n/nemosis/nemosis-{{ version }}.tar.gz - sha256: 97eeeb46be38f82d4e2bc9375c60fc86e0d708a3fb7e26d9d3aa7517d9c0a397 - -build: - noarch: python - script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation - number: 0 - -requirements: - host: - - python >=3.10 - - hatchling - - pip - run: - - python >=3.10 - - requests >=2.32.3 - - pyarrow >=22.0.0 - - feather-format >=0.4.1 - - pandas >=2.2.3 - - xlrd >=2.0.1 - - beautifulsoup4 >=4.12.3 - - openpyxl >=5.5.0 - -test: - imports: - - nemosis - commands: - - pip check - requires: - - pip - - python - -about: - home: https://github.com/UNSW-CEEM/NEMOSIS/ - summary: A tool for accessing AEMO data. - description: > - A Python package for downloading historical data - published by the Australian Energy Market Operator (AEMO) - license: GPL-3.0-only - license_file: LICENSE - -extra: - recipe-maintainers: - - mdavis-xyz diff --git a/conda/recipe.yaml b/conda/recipe.yaml new file mode 100644 index 0000000..4a90d01 --- /dev/null +++ b/conda/recipe.yaml @@ -0,0 +1,56 @@ +context: + version: 3.8.1 + +package: + name: nemosis + version: ${{ version }} + +source: +- url: https://pypi.org/packages/source/n/nemosis/nemosis-${{ version }}.tar.gz + sha256: 97eeeb46be38f82d4e2bc9375c60fc86e0d708a3fb7e26d9d3aa7517d9c0a397 + +build: + number: 0 + script: + - ${{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation + noarch: python + +requirements: + host: + - python ${{ python_min }}.* + - hatchling + - pip + run: + - python >=${{ python_min }} + - requests >=2.32.3 + - pyarrow >=22.0.0 + - feather-format >=0.4.1 + - pandas >=2.2.3 + - xlrd >=2.0.1 + - beautifulsoup4 >=4.12.3 + - openpyxl >=3.1.5 + - cachetools >=5.5.0 + +tests: +- python: + imports: + - nemosis + python_version: + - ${{ python_min }}.* + - "*" + pip_check: true + + +about: + homepage: https://github.com/UNSW-CEEM/NEMOSIS/ + license: GPL-3.0-only + license_file: LICENSE + summary: A tool for accessing AEMO data. + description: | + A Python package for downloading historical data + published by the Australian Energy Market Operator (AEMO) + repository: https://github.com/UNSW-CEEM/NEMOSIS/ + +extra: + recipe-maintainers: + - mdavis-xyz \ No newline at end of file