From 19b668d5dbb5c8553589e91fd61a402576acd127 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 10 Sep 2024 17:30:40 -0700 Subject: [PATCH 01/10] switch to pyproject.toml --- pyproject.toml | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 3 -- setup.py | 83 ------------------------------------------- 3 files changed, 96 insertions(+), 86 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..beabdf50 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,96 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "tell" +description = "An open-source Python package to model future hourly total electricity loads." +readme = "README.md" +version = "1.2.1" +requires-python = ">=3.9,<3.11" +license = {file = "LICENSE"} +authors = [ + {name = "Casey McGrath", email = "casey.mcgrath@pnnl.gov"}, + {name = "Casey Burleyson", email = "casey.burleyson@pnnl.gov"}, + {name = "Chris Vernon", email = "chris.vernon@pnnl.gov"}, + {name = "Aowabin Rahman", email = "aowabin.rahman@pnnl.gov"}, +] +maintainers = [ + {name = "Casey McGrath", email = "casey.mcgrath@pnnl.gov"}, + {name = "Casey Burleyson", email = "casey.burleyson@pnnl.gov"}, + {name = "Chris Vernon", email = "chris.vernon@pnnl.gov"}, +] +dependencies = [ + "setuptools>=49.2.1", + "attrs>=21.4.0", + "certifi>=2021.10.8", + "charset-normalizer>=2.0.12", + "click>=8.0.3", + "click-plugins>=1.1.1", + "cligj>=0.7.2", + "convertdate>=2.4.0", + "cycler>=0.11.0", + "Fiona>=1.8.21", + "fonttools>=4.29.1", + "geopandas>=0.10.2", + "hijri-converter>=2.2.3", + "holidays>=0.13", + "idna>=3.3", + "joblib>=1.1.0", + "kiwisolver>=1.3.2", + "korean-lunar-calendar>=0.2.1", + "matplotlib>=3.5.1", + "munch>=2.5.0", + "numpy>=1.21.5,<2", + "openpyxl>=3.0.9", + "packaging>=21.3", + "pandas>=1.3.5", + "Pillow>=9.0.1", + "PyMeeus>=0.5.11", + "pyparsing>=3.0.7", + "pyproj>=3.2.1", + "python-dateutil>=2.8.2", + "pytz>=2021.3", + "PyYAML>=6.0", + "requests>=2.27.1", + "Rtree>=0.9.7", + "scikit-learn==1.0.2", + "scipy>=1.7.3", + "Shapely>=1.8.0", + "six>=1.16.0", + "threadpoolctl>=3.1.0", + "urllib3>=1.26.8", + "fastparquet>=0.8.3" +] + +classifiers = [ + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", +] + +[project.optional-dependencies] +test = [ + "pytest>=6.2.4", + "pytest-cov>=2.12.1" +] +docs = [ + "build>=0.5.1", + "nbsphinx>=0.8.6", + "recommonmark>=0.7.1", + "setuptools>=57.0.0", + "sphinx>=4.0.2", + "sphinx-panels>=0.6.0", + "sphinx-rtd-theme>=1.0.0", +] +deploy = [ + "twine>=3.4.1", +] + +[project.urls] +Repository = "/~https://github.com/IMMM-SFA/tell" +Documentation = "https://immm-sfa.github.io/tell" + +[tool.hatch.build] +packages = ["tell"] # set importable package name to "tell" +include = ["tell"] \ No newline at end of file diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 7d0748ba..00000000 --- a/setup.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[metadata] -description_file = README.md - diff --git a/setup.py b/setup.py deleted file mode 100644 index c4ef8395..00000000 --- a/setup.py +++ /dev/null @@ -1,83 +0,0 @@ -import re -from setuptools import setup, find_packages - - -def readme(): - """Return the contents of the project README file.""" - with open('README.md') as f: - return f.read() - - -version = re.search(r"__version__ = ['\"]([^'\"]*)['\"]", open('tell/__init__.py').read(), re.M).group(1) - - -setup( - name='tell', - version=version, - packages=find_packages(), - url='/~https://github.com/IMMM-SFA/tell.git', - license='BSD2-Clause', - author='Casey McGrath; Casey Burleyson; Chris R. Vernon; Aowabin Rahman', - author_email='casey.mcgrath@pnnl.gov', - description='A model to predict total electricity loads', - long_description=readme(), - long_description_content_type="text/markdown", - python_requires='>=3.9, <3.11', - include_package_data=True, - install_requires=[ - 'setuptools>=49.2.1', - 'attrs>=21.4.0', - 'certifi>=2021.10.8', - 'charset-normalizer>=2.0.12', - 'click>=8.0.3', - 'click-plugins>=1.1.1', - 'cligj>=0.7.2', - 'convertdate>=2.4.0', - 'cycler>=0.11.0', - 'Fiona>=1.8.21', - 'fonttools>=4.29.1', - 'geopandas>=0.10.2', - 'hijri-converter>=2.2.3', - 'holidays>=0.13', - 'idna>=3.3', - 'joblib>=1.1.0', - 'kiwisolver>=1.3.2', - 'korean-lunar-calendar>=0.2.1', - 'matplotlib>=3.5.1', - 'munch>=2.5.0', - 'numpy>=1.21.5,<2', - 'openpyxl>=3.0.9', - 'packaging>=21.3', - 'pandas>=1.3.5', - 'Pillow>=9.0.1', - 'PyMeeus>=0.5.11', - 'pyparsing>=3.0.7', - 'pyproj>=3.2.1', - 'python-dateutil>=2.8.2', - 'pytz>=2021.3', - 'PyYAML>=6.0', - 'requests>=2.27.1', - 'Rtree>=0.9.7', - 'scikit-learn==1.0.2', - 'scipy>=1.7.3', - 'Shapely>=1.8.0', - 'six>=1.16.0', - 'threadpoolctl>=3.1.0', - 'urllib3>=1.26.8', - 'fastparquet>=0.8.3' - ], - extras_require={ - 'dev': [ - 'build>=0.5.1', - 'nbsphinx>=0.8.6', - 'recommonmark>=0.7.1', - 'setuptools>=57.0.0', - 'sphinx>=4.0.2', - 'sphinx-panels>=0.6.0', - 'sphinx-rtd-theme>=1.0.0', - 'twine>=3.4.1', - 'pytest>=6.2.4', - 'pytest-cov>=2.12.1' - ] - } -) From 9266b5d95035066b19029bc0172d5a7fa86c67f3 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Wed, 11 Sep 2024 10:10:17 -0700 Subject: [PATCH 02/10] update github actions versions --- .github/workflows/draft-pdf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml index d6f0015c..37857f5d 100644 --- a/.github/workflows/draft-pdf.yml +++ b/.github/workflows/draft-pdf.yml @@ -6,7 +6,7 @@ jobs: name: Paper Draft steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Build draft PDF uses: openjournals/openjournals-draft-action@master with: @@ -14,7 +14,7 @@ jobs: # This should be the path to the paper within your repo. paper-path: paper/paper.md - name: Upload - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: paper # This is the output path where Pandoc will write the compiled From e4094d849b2e62c4f56ed5fab3f4deaedf3759c6 Mon Sep 17 00:00:00 2001 From: crvernon Date: Thu, 12 Sep 2024 12:11:18 -0400 Subject: [PATCH 03/10] remove unneeded paper compile action --- .github/workflows/draft-pdf.yml | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 .github/workflows/draft-pdf.yml diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml deleted file mode 100644 index d6f0015c..00000000 --- a/.github/workflows/draft-pdf.yml +++ /dev/null @@ -1,24 +0,0 @@ -on: [push] - -jobs: - paper: - runs-on: ubuntu-latest - name: Paper Draft - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Build draft PDF - uses: openjournals/openjournals-draft-action@master - with: - journal: joss - # This should be the path to the paper within your repo. - paper-path: paper/paper.md - - name: Upload - uses: actions/upload-artifact@v1 - with: - name: paper - # This is the output path where Pandoc will write the compiled - # PDF. Note, this should be the same directory as the input - # paper.md - path: paper/paper.pdf - From 0f43f10ffa53e6177c4d9d8e2da462ba58d21068 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Thu, 12 Sep 2024 09:27:31 -0700 Subject: [PATCH 04/10] update to 1.3.0 --- docs/source/conf.py | 2 +- pyproject.toml | 3 +-- tell/__init__.py | 2 +- tell/install_forcing_data.py | 1 + tell/install_quickstarter_data.py | 1 + tell/install_raw_data.py | 1 + 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index ac4769fb..eba49574 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -20,7 +20,7 @@ project = 'TELL' copyright = '2022, Batelle Memorial Institute' author = 'Casey Burleyson, Casey McGrath' -version = '1.2.1' +version = '1.3.0' diff --git a/pyproject.toml b/pyproject.toml index beabdf50..a8eb1017 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" name = "tell" description = "An open-source Python package to model future hourly total electricity loads." readme = "README.md" -version = "1.2.1" +version = "1.3.0" requires-python = ">=3.9,<3.11" license = {file = "LICENSE"} authors = [ @@ -66,7 +66,6 @@ dependencies = [ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", ] [project.optional-dependencies] diff --git a/tell/__init__.py b/tell/__init__.py index 98ccdbc8..41be4129 100644 --- a/tell/__init__.py +++ b/tell/__init__.py @@ -25,4 +25,4 @@ from .visualization import * # Set the current version of TELL: -__version__ = '1.2.1' +__version__ = '1.3.0' diff --git a/tell/install_forcing_data.py b/tell/install_forcing_data.py index e38ce310..181f1b86 100644 --- a/tell/install_forcing_data.py +++ b/tell/install_forcing_data.py @@ -31,6 +31,7 @@ class InstallForcingSample: '1.1.0': 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1', '1.2.0': 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1', '1.2.1': 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1', + `1.3.0`: 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1', } DEFAULT_VERSION = 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1' diff --git a/tell/install_quickstarter_data.py b/tell/install_quickstarter_data.py index 62421167..ced3a371 100644 --- a/tell/install_quickstarter_data.py +++ b/tell/install_quickstarter_data.py @@ -30,6 +30,7 @@ class InstallQuickstarterData: '1.1.0': 'https://zenodo.org/records/13344957/files/tell_quickstarter_data.zip?download=1', '1.2.0': 'https://zenodo.org/records/13344957/files/tell_quickstarter_data.zip?download=1', '1.2.1': 'https://zenodo.org/records/13344957/files/tell_quickstarter_data.zip?download=1', + '1.3.0': 'https://zenodo.org/records/13344957/files/tell_quickstarter_data.zip?download=1', } DEFAULT_VERSION = 'https://zenodo.org/records/13344957/files/tell_quickstarter_data.zip?download=1' diff --git a/tell/install_raw_data.py b/tell/install_raw_data.py index 98c07392..47cc14de 100644 --- a/tell/install_raw_data.py +++ b/tell/install_raw_data.py @@ -31,6 +31,7 @@ class InstallRawData: '1.1.1': 'https://zenodo.org/record/6378036/files/tell_raw_data.zip?download=1', '1.2.0': 'https://zenodo.org/record/6378036/files/tell_raw_data.zip?download=1', '1.2.1': 'https://zenodo.org/record/6378036/files/tell_raw_data.zip?download=1', + '1.3.0': 'https://zenodo.org/record/6378036/files/tell_raw_data.zip?download=1', } DEFAULT_VERSION = 'https://zenodo.org/record/6378036/files/tell_raw_data.zip?download=1' From 47c9452d053dbcaa883037fe1b0de059d0ef1992 Mon Sep 17 00:00:00 2001 From: crvernon Date: Tue, 17 Sep 2024 15:53:04 -0400 Subject: [PATCH 05/10] remove outdated workflow --- .github/workflows/draft-pdf.yml | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 .github/workflows/draft-pdf.yml diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml deleted file mode 100644 index 37857f5d..00000000 --- a/.github/workflows/draft-pdf.yml +++ /dev/null @@ -1,24 +0,0 @@ -on: [push] - -jobs: - paper: - runs-on: ubuntu-latest - name: Paper Draft - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build draft PDF - uses: openjournals/openjournals-draft-action@master - with: - journal: joss - # This should be the path to the paper within your repo. - paper-path: paper/paper.md - - name: Upload - uses: actions/upload-artifact@v4 - with: - name: paper - # This is the output path where Pandoc will write the compiled - # PDF. Note, this should be the same directory as the input - # paper.md - path: paper/paper.pdf - From 82e14f9b186016064b9deae90ffbc57913eca173 Mon Sep 17 00:00:00 2001 From: crvernon Date: Tue, 17 Sep 2024 15:54:27 -0400 Subject: [PATCH 06/10] remove unneeded reqs file --- requirements.txt | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 941ab36c..00000000 --- a/requirements.txt +++ /dev/null @@ -1,41 +0,0 @@ -setuptools>=49.2.1 -attrs>=21.4.0 -certifi>=2021.10.8 -charset-normalizer>=2.0.12 -click>=8.0.3 -click-plugins>=1.1.1 -cligj>=0.7.2 -convertdate>=2.4.0 -cycler>=0.11.0 -Fiona>=1.8.21 -fonttools>=4.29.1 -geopandas>=0.10.2 -hijri-converter>=2.2.3 -holidays>=0.13 -idna>=3.3 -joblib>=1.1.0 -kiwisolver>=1.3.2 -korean-lunar-calendar>=0.2.1 -matplotlib>=3.5.1 -munch>=2.5.0 -numpy>=1.21.5,<2 -openpyxl>=3.0.9 -packaging>=21.3 -pandas>=1.3.5 -Pillow>=9.0.1 -PyMeeus>=0.5.11 -pyparsing>=3.0.7 -pyproj>=3.2.1 -python-dateutil>=2.8.2 -pytz>=2021.3 -PyYAML>=6.0 -requests>=2.27.1 -Rtree>=0.9.7 -scikit-learn==1.0.2 -scipy>=1.7.3 -Shapely>=1.8.0 -six>=1.16.0 -threadpoolctl>=3.1.0 -urllib3>=1.26.8 -tqdm>=4.63.0 -fastparquet>=0.8.3 From 486b7314c4710aba368df949877c22b3bef42083 Mon Sep 17 00:00:00 2001 From: crvernon Date: Tue, 17 Sep 2024 15:55:39 -0400 Subject: [PATCH 07/10] add contributor --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index a8eb1017..85aad733 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,12 +13,14 @@ authors = [ {name = "Casey McGrath", email = "casey.mcgrath@pnnl.gov"}, {name = "Casey Burleyson", email = "casey.burleyson@pnnl.gov"}, {name = "Chris Vernon", email = "chris.vernon@pnnl.gov"}, + {name = "Em Rexer", email = "emily.rexer@pnnl.gov"}, {name = "Aowabin Rahman", email = "aowabin.rahman@pnnl.gov"}, ] maintainers = [ {name = "Casey McGrath", email = "casey.mcgrath@pnnl.gov"}, {name = "Casey Burleyson", email = "casey.burleyson@pnnl.gov"}, {name = "Chris Vernon", email = "chris.vernon@pnnl.gov"}, + {name = "Em Rexer", email = "emily.rexer@pnnl.gov"}, ] dependencies = [ "setuptools>=49.2.1", From 367703042ce7d9cd65f9d31695df4f9a385d4c16 Mon Sep 17 00:00:00 2001 From: erexer <13180883+erexer@users.noreply.github.com> Date: Tue, 17 Sep 2024 12:56:20 -0700 Subject: [PATCH 08/10] fix backticks --- tell/install_forcing_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tell/install_forcing_data.py b/tell/install_forcing_data.py index 181f1b86..872a1251 100644 --- a/tell/install_forcing_data.py +++ b/tell/install_forcing_data.py @@ -31,7 +31,7 @@ class InstallForcingSample: '1.1.0': 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1', '1.2.0': 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1', '1.2.1': 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1', - `1.3.0`: 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1', + '1.3.0': 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1', } DEFAULT_VERSION = 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1' From 6d5926359afaff1f7fe1a1ee8df5e4004ea7837a Mon Sep 17 00:00:00 2001 From: crvernon Date: Tue, 17 Sep 2024 15:59:15 -0400 Subject: [PATCH 09/10] formatting --- tell/install_forcing_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tell/install_forcing_data.py b/tell/install_forcing_data.py index 181f1b86..872a1251 100644 --- a/tell/install_forcing_data.py +++ b/tell/install_forcing_data.py @@ -31,7 +31,7 @@ class InstallForcingSample: '1.1.0': 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1', '1.2.0': 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1', '1.2.1': 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1', - `1.3.0`: 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1', + '1.3.0': 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1', } DEFAULT_VERSION = 'https://zenodo.org/records/13344803/files/sample_forcing_data.zip?download=1' From 87ffb2d575a9facde58b23eadc873364d3badcb0 Mon Sep 17 00:00:00 2001 From: crvernon Date: Tue, 17 Sep 2024 16:04:35 -0400 Subject: [PATCH 10/10] remove need to install from reqs --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ae93737..ebe4fc32 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt + pip install . - name: Test and generate coverage report run: |