From 998b4a0c8ab6cef636aa7388e8ae9f2377e24da1 Mon Sep 17 00:00:00 2001 From: Xander Date: Mon, 14 Apr 2025 17:24:27 -0400 Subject: [PATCH 1/8] Create requirements.txt --- requirements.txt | 89 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..29f70a2 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,89 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile pyproject.toml -o requirements.txt +contourpy==1.3.1 + # via matplotlib +coverage==7.8.0 + # via pytest-cov +cycler==0.12.1 + # via matplotlib +flexcache==0.3 + # via pint +flexparser==0.4 + # via pint +fonttools==4.57.0 + # via matplotlib +iniconfig==2.1.0 + # via pytest +kiwisolver==1.4.8 + # via matplotlib +matplotlib==3.10.1 + # via pycalphad +numpy==1.26.4 + # via + # ammber (pyproject.toml) + # contourpy + # matplotlib + # pandas + # pycalphad + # scipy + # xarray +packaging==24.2 + # via + # matplotlib + # pytest + # setuptools-scm + # xarray +pandas==2.2.3 + # via xarray +pillow==11.2.1 + # via matplotlib +pint==0.24.4 + # via pycalphad +platformdirs==4.3.7 + # via pint +pluggy==1.5.0 + # via pytest +pycalphad==0.11.0 + # via ammber (pyproject.toml) +pyparsing==3.2.3 + # via + # matplotlib + # pycalphad +pytest==8.3.5 + # via + # pycalphad + # pytest-cov +pytest-cov==6.1.1 + # via pycalphad +python-dateutil==2.9.0.post0 + # via + # matplotlib + # pandas +pytz==2025.2 + # via pandas +runtype==0.5.3 + # via pycalphad +scipy==1.15.2 + # via + # ammber (pyproject.toml) + # pycalphad +setuptools==78.1.0 + # via setuptools-scm +setuptools-scm==8.2.0 + # via pycalphad +six==1.17.0 + # via python-dateutil +symengine==0.14.0 + # via pycalphad +tinydb==4.8.2 + # via pycalphad +typing-extensions==4.13.2 + # via + # flexcache + # flexparser + # pint + # pycalphad +tzdata==2025.2 + # via pandas +xarray==2025.3.1 + # via pycalphad From 3750dfe079e6a79bca696e5ca5766ecd6db601d6 Mon Sep 17 00:00:00 2001 From: Xander <102053371+fractalsbyx@users.noreply.github.com> Date: Fri, 11 Apr 2025 13:18:13 -0400 Subject: [PATCH 2/8] Create python-package.yml --- .github/workflows/python-package.yml | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/python-package.yml diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..e56abb6 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,40 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python package + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + run: | + pytest From 78ec4844bc2341dac57a297b61e210fd6e78767d Mon Sep 17 00:00:00 2001 From: Xander Date: Mon, 14 Apr 2025 17:52:08 -0400 Subject: [PATCH 3/8] Update python-package.yml --- .github/workflows/python-package.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index e56abb6..b832550 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -35,6 +35,8 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Install package + run: pip install -e . - name: Test with pytest run: | pytest From d4652f4c9ea38b79f1f3925fe12dcb00eeed1949 Mon Sep 17 00:00:00 2001 From: Xander Date: Mon, 14 Apr 2025 18:15:46 -0400 Subject: [PATCH 4/8] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 29f70a2..e177e12 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ # This file was autogenerated by uv via the following command: # uv pip compile pyproject.toml -o requirements.txt -contourpy==1.3.1 +contourpy==1.3.0 # via matplotlib coverage==7.8.0 # via pytest-cov From 2f3b4d93bc195b13b40d56b77925483001c90379 Mon Sep 17 00:00:00 2001 From: Xander Date: Mon, 14 Apr 2025 18:22:28 -0400 Subject: [PATCH 5/8] Update pyproject.toml --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 99fb886..5a7fb1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,5 +58,8 @@ classifiers=[ 'Programming Language :: Python :: 3.5', ] +[tool.setuptools.packages.find] +include = ["ammber"] + [project.urls] Homepage = "https://github.com/UMThorntongroup/" From 7f55d9d779ed50f4683353b0c182dd324e7cc487 Mon Sep 17 00:00:00 2001 From: Xander Date: Mon, 14 Apr 2025 18:28:25 -0400 Subject: [PATCH 6/8] Update pyproject.toml --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5a7fb1e..5e134fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,8 @@ authors = [ { name = "Xander Mensah", email = "xmen@umich.edu" }, { name = "Katsuyo Thornton", email = "kthorn@umich.edu" } ] -license = { file = "LICENSE.md" } +license = "MIT" +license-files = ["LICENSE.md"] readme = "README.md" requires-python = ">=2.7, <4" @@ -50,7 +51,6 @@ dependencies = [ classifiers=[ 'Development Status :: 1 - Planning', 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', From ad6287f10f634289c8956891adb60d495271cf41 Mon Sep 17 00:00:00 2001 From: Xander <102053371+fractalsbyx@users.noreply.github.com> Date: Tue, 15 Apr 2025 12:38:08 -0400 Subject: [PATCH 7/8] Package with 3.13 (#10) * Update python-package.yml * Update python-package.yml * Update python-package.yml * Change some names in the workflow --- .github/workflows/python-package.yml | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b832550..21020d0 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -5,18 +5,32 @@ name: Python package on: push: - branches: [ "main" ] + branches: + - main pull_request: - branches: [ "main" ] + branches: + - main + - devel + - packaging-updates + types: + - opened + - reopened + - synchronize + - ready_for_review + + +concurrency: + group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request'}} jobs: - build: + build-lint-pytest: runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 @@ -27,7 +41,9 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip + python -m pip install uv python -m pip install flake8 pytest + uv pip compile pyproject.toml -o requirements.txt if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 run: | From aa3b40ac9e080aada26e428edb3a18ccba6d26aa Mon Sep 17 00:00:00 2001 From: Xander Date: Tue, 15 Apr 2025 12:42:52 -0400 Subject: [PATCH 8/8] Update .gitignore --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1c01d4a..2c3d1e6 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,7 @@ __pycache__ ../build dist *egg-info -*.pyc \ No newline at end of file +*.pyc + +*.DS_Store +*.vscode \ No newline at end of file