From e28106a6cf8a72d29cba951423f06558659d166a Mon Sep 17 00:00:00 2001 From: Viet Dung Nguyen <60036798+rxng8@users.noreply.github.com> Date: Sat, 7 Jun 2025 15:37:27 -0400 Subject: [PATCH 1/8] Update pyproject.toml --- pyproject.toml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 012f7e41..a0d8edae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,10 @@ [build-system] -requires = ["setuptools>=61.0"] -build-backend = "setuptools.build_meta" +requires = [ + "setuptools>=61.0", # default + "wheel", # also often needed + "numpy>=1.19.5" # add numpy here for build-time use +] +build-backend = "setuptools.build_meta" # using setuptool building engine [project] name = "ngclearn" From d3761386a93921e16b3abda018e7331781d929f3 Mon Sep 17 00:00:00 2001 From: Viet Dung Nguyen <60036798+rxng8@users.noreply.github.com> Date: Sat, 7 Jun 2025 15:46:25 -0400 Subject: [PATCH 2/8] Update python-package-conda.yml --- .github/workflows/python-package-conda.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 404cbaec..b08123cd 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -18,9 +18,12 @@ jobs: run: | # $CONDA is an environment variable pointing to the root of the miniconda directory echo $CONDA/bin >> $GITHUB_PATH + - name: Pre-install numpy (build dependency) + run: | + pip install 'numpy>=1.19.5' - name: Install current library and dependencies run: | - pip install -e . + pip install --no-build-isolation -e . # - name: Lint with flake8 # run: | # conda install flake8 From 001e1c9c858dcc1ddc5a296d81c14285d39f8c6a Mon Sep 17 00:00:00 2001 From: Viet Dung Nguyen <60036798+rxng8@users.noreply.github.com> Date: Sat, 7 Jun 2025 15:51:57 -0400 Subject: [PATCH 3/8] Update python-package-conda.yml --- .github/workflows/python-package-conda.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index b08123cd..046671bd 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -18,9 +18,8 @@ jobs: run: | # $CONDA is an environment variable pointing to the root of the miniconda directory echo $CONDA/bin >> $GITHUB_PATH - - name: Pre-install numpy (build dependency) - run: | - pip install 'numpy>=1.19.5' + - name: Pre-install numpy + run: conda install numpy=1.26.4 -y - name: Install current library and dependencies run: | pip install --no-build-isolation -e . From dfc445e77a95ff831447a988f2d8d059cb1952a2 Mon Sep 17 00:00:00 2001 From: Viet Dung Nguyen <60036798+rxng8@users.noreply.github.com> Date: Sat, 7 Jun 2025 15:54:47 -0400 Subject: [PATCH 4/8] Update python-package-conda.yml --- .github/workflows/python-package-conda.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 046671bd..c1b48d81 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -13,11 +13,13 @@ jobs: - name: Set up Python 3.10 uses: actions/setup-python@v3 with: - python-version: '3.10' - - name: Add conda to system path - run: | - # $CONDA is an environment variable pointing to the root of the miniconda directory - echo $CONDA/bin >> $GITHUB_PATH + python-version: '3.11' + - name: Set up Conda + uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + python-version: '3.11' + environment-name: test-env - name: Pre-install numpy run: conda install numpy=1.26.4 -y - name: Install current library and dependencies From 309d4190bc74404b3517961d1c346fb6198b3570 Mon Sep 17 00:00:00 2001 From: Viet Dung Nguyen <60036798+rxng8@users.noreply.github.com> Date: Sat, 7 Jun 2025 16:04:57 -0400 Subject: [PATCH 5/8] Update python-package-conda.yml --- .github/workflows/python-package-conda.yml | 31 +++++++--------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index c1b48d81..06f9c86e 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -10,29 +10,18 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.10 - uses: actions/setup-python@v3 - with: - python-version: '3.11' - - name: Set up Conda + + - name: Install Miniconda uses: conda-incubator/setup-miniconda@v2 with: auto-update-conda: true - python-version: '3.11' - environment-name: test-env - - name: Pre-install numpy - run: conda install numpy=1.26.4 -y - - name: Install current library and dependencies + miniforge-variant: Mambaforge # Faster solver + + - name: Install dependencies run: | - pip install --no-build-isolation -e . - # - name: Lint with flake8 - # run: | - # conda install flake8 - # # 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 + conda install -n testenv numpy=1.26 pytest pip + conda run -n testenv pip install -e . + + - name: Run tests run: | - conda install pytest - pytest + conda run -n testenv pytest From 1627fbe14c43b8649662cba375b149db3e4540ab Mon Sep 17 00:00:00 2001 From: Viet Dung Nguyen <60036798+rxng8@users.noreply.github.com> Date: Sat, 7 Jun 2025 16:05:34 -0400 Subject: [PATCH 6/8] Update python-package-conda.yml --- .github/workflows/python-package-conda.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 06f9c86e..a9ba8acb 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -15,7 +15,6 @@ jobs: uses: conda-incubator/setup-miniconda@v2 with: auto-update-conda: true - miniforge-variant: Mambaforge # Faster solver - name: Install dependencies run: | From 8495225d7527be2a425783dee9d31e2ecba43237 Mon Sep 17 00:00:00 2001 From: Viet Dung Nguyen <60036798+rxng8@users.noreply.github.com> Date: Sat, 7 Jun 2025 16:07:15 -0400 Subject: [PATCH 7/8] Update python-package-conda.yml --- .github/workflows/python-package-conda.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index a9ba8acb..ecd0c0ff 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -15,6 +15,8 @@ jobs: uses: conda-incubator/setup-miniconda@v2 with: auto-update-conda: true + python-version: 3.11 + environment-name: testenv - name: Install dependencies run: | From cdcc05ea9391917c50f7a7f068617a3a80979d60 Mon Sep 17 00:00:00 2001 From: Viet Dung Nguyen <60036798+rxng8@users.noreply.github.com> Date: Sat, 7 Jun 2025 16:08:52 -0400 Subject: [PATCH 8/8] Update python-package-conda.yml --- .github/workflows/python-package-conda.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index ecd0c0ff..5bfec32e 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -16,13 +16,13 @@ jobs: with: auto-update-conda: true python-version: 3.11 - environment-name: testenv + environment-name: test - name: Install dependencies run: | - conda install -n testenv numpy=1.26 pytest pip - conda run -n testenv pip install -e . + conda install -n test numpy=1.26 pytest pip + conda run -n test pip install -e . - name: Run tests run: | - conda run -n testenv pytest + conda run -n test pytest