From 445192a7a877f11293d5f967e34e8c4f730239a9 Mon Sep 17 00:00:00 2001 From: "T. Daniel Crawford" Date: Tue, 26 Dec 2023 21:57:26 -0500 Subject: [PATCH 01/13] Initial draft of updated CI. --- .github/workflows/CI.yaml | 40 +++++++++++++++--------------------- devtools/conda-envs/psi.yaml | 21 ++----------------- 2 files changed, 19 insertions(+), 42 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index f327c25..153475f 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -37,49 +37,43 @@ jobs: - name: Create Psi4 Environment uses: conda-incubator/setup-miniconda@v2 with: - activate-environment: p4dev + activate-environment: p4env environment-file: devtools/conda-envs/psi.yaml python-version: ${{ matrix.python-version }} auto-activate-base: true - - name: Environment Information + - name: Install Psi4 run: | conda info conda list --show-channel-urls hash -r env - - - name: Install Psi4 - run: | - conda info - conda list --show-channel-urls - conda install psi4 python=${{ matrix.python-version }} -c psi4/label/dev + conda install psi4 python=${{ matrix.python-version }} -c conda-forge ls -l $CONDA - name: Test Psi4 Python Loading run: | export PATH=$CONDA_PREFIX/bin:$PATH export PYTHONPATH=$CONDA_PREFIX/lib:$PYTHONPATH + conda env list python -c 'import psi4' - name: Install PyCC and Deps run: | - env - export PATH=$CONDA_PREFIX/bin:$PATH - export PYTHONPATH=$CONDA_PREFIX/lib:$PYTHONPATH python -m pip install . - python -m pip install opt_einsum - python -m pip install scipy - python -m pip install torch==1.11 - conda list + pip install opt_einsum + pip install scipy + pip install torch + pip install pytest - - name: PyTest + - name: Test and generate coverage report run: | - pytest -v --cov=pycc --cov-report=xml --color=yes pycc/tests/ + pip install coverage + coverage run -m pytest + coverage xml + ls -l - - name: CodeCov - uses: codecov/codecov-action@v1 - with: - file: ./coverage.xml - flags: unittests - name: codecov-pycc + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/devtools/conda-envs/psi.yaml b/devtools/conda-envs/psi.yaml index 9ca2bd1..6fda2b9 100644 --- a/devtools/conda-envs/psi.yaml +++ b/devtools/conda-envs/psi.yaml @@ -1,21 +1,4 @@ -name: p4dev +name: p4env channels: - - psi4/label/dev - conda-forge -dependencies: - - psi4 - - intel-openmp!=2019.5 - - # Core - - python - - pyyaml - - py-cpuinfo - - psutil - - qcelemental >=0.19.0 # test minimum stated version. - - pydantic >=1.0.0 # test minimun stated version. actually min is 1.0 but no py38 builds - - msgpack-python - - # Testing - - pytest - - pytest-cov - - codecov + - nodefauts From ec844b72c26fe07f7f426eac86c59fa4d33a006b Mon Sep 17 00:00:00 2001 From: "T. Daniel Crawford" Date: Tue, 26 Dec 2023 22:07:35 -0500 Subject: [PATCH 02/13] Fixing typo in psi.yaml --- devtools/conda-envs/psi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/conda-envs/psi.yaml b/devtools/conda-envs/psi.yaml index 6fda2b9..b52057d 100644 --- a/devtools/conda-envs/psi.yaml +++ b/devtools/conda-envs/psi.yaml @@ -1,4 +1,4 @@ name: p4env channels: - conda-forge - - nodefauts + - nodefaults From f5ba24efce5c75e988a575ca748412d82584914b Mon Sep 17 00:00:00 2001 From: "T. Daniel Crawford" Date: Tue, 26 Dec 2023 22:29:08 -0500 Subject: [PATCH 03/13] Attempting to remove torch pin and temporarily reducing CI matrix to ubunu-latest and python-3.9 for debugging. --- .github/workflows/CI.yaml | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 153475f..ef79e0c 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -21,8 +21,8 @@ jobs: strategy: fail-fast: true matrix: - os: [macOS-latest, ubuntu-latest] - python-version: ['3.8', '3.9', '3.10'] + os: [ubuntu-latest] + python-version: ['3.9'] steps: - uses: actions/checkout@v2 diff --git a/setup.py b/setup.py index 3679584..34553fd 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ "numpy", "opt_einsum", "scipy", - "torch<=1.11" + "torch" ], # Which Python importable modules should be included when your package is installed From 475ce9aaeb260b509da0412071c4eaa93d238feb Mon Sep 17 00:00:00 2001 From: "T. Daniel Crawford" Date: Tue, 26 Dec 2023 22:40:09 -0500 Subject: [PATCH 04/13] Adding macOS-latest and python 3.8 and 3.10 to CI matrix. --- .github/workflows/CI.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index ef79e0c..153475f 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -21,8 +21,8 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-latest] - python-version: ['3.9'] + os: [macOS-latest, ubuntu-latest] + python-version: ['3.8', '3.9', '3.10'] steps: - uses: actions/checkout@v2 From e8283f5ab89f4bb255afa6d247dd3da78eefe01b Mon Sep 17 00:00:00 2001 From: "T. Daniel Crawford" Date: Tue, 26 Dec 2023 22:50:28 -0500 Subject: [PATCH 05/13] Debugging CI error for macOS-latest. --- .github/workflows/CI.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 153475f..ef29618 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -21,8 +21,8 @@ jobs: strategy: fail-fast: true matrix: - os: [macOS-latest, ubuntu-latest] - python-version: ['3.8', '3.9', '3.10'] + os: [macOS-latest] + python-version: ['3.10'] steps: - uses: actions/checkout@v2 From 8378d0c83a9e374389d88e962949835c14712fa3 Mon Sep 17 00:00:00 2001 From: "T. Daniel Crawford" Date: Tue, 26 Dec 2023 22:58:07 -0500 Subject: [PATCH 06/13] Debugging CI error for macOS-latest. --- .github/workflows/CI.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index ef29618..ed65fb4 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -22,7 +22,7 @@ jobs: fail-fast: true matrix: os: [macOS-latest] - python-version: ['3.10'] + python-version: ['3.11'] steps: - uses: actions/checkout@v2 From 9460ad0f9b3f56c936f1e798bb8f7c47590bae20 Mon Sep 17 00:00:00 2001 From: "T. Daniel Crawford" Date: Tue, 26 Dec 2023 23:04:36 -0500 Subject: [PATCH 07/13] Trying python-3.10.11? --- .github/workflows/CI.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index ed65fb4..034fe38 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -22,7 +22,7 @@ jobs: fail-fast: true matrix: os: [macOS-latest] - python-version: ['3.11'] + python-version: ['3.10.11'] steps: - uses: actions/checkout@v2 From 19ce85bc91b11b18ebdd6976f1ca1bd4db5c8130 Mon Sep 17 00:00:00 2001 From: "T. Daniel Crawford" Date: Tue, 26 Dec 2023 23:15:36 -0500 Subject: [PATCH 08/13] Setting python>=3.11 --- .github/workflows/CI.yaml | 4 ++-- setup.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 034fe38..e72800c 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -21,8 +21,8 @@ jobs: strategy: fail-fast: true matrix: - os: [macOS-latest] - python-version: ['3.10.11'] + os: [macOS-latest, ubuntu-latest] + python-version: ['3.11'] steps: - uses: actions/checkout@v2 diff --git a/setup.py b/setup.py index 34553fd..a3e9f99 100644 --- a/setup.py +++ b/setup.py @@ -57,9 +57,9 @@ # install_requires=[], # Required packages, pulls from pip if needed; do not use for Conda deployment platforms=['Linux', 'Mac OS-X', - 'Unix'] + 'Unix'], # 'Windows'], # Valid platforms your code works on, adjust to your flavor - # python_requires=">=3.7" # Python version restrictions + python_requires=">=3.11" # Python version restrictions # Manual control if final package is compressible or not, set False to prevent the .egg from being made # zip_safe=False, From 22116fc9f771d6b13f1e354df46c202cc7630d88 Mon Sep 17 00:00:00 2001 From: "T. Daniel Crawford" Date: Tue, 26 Dec 2023 23:30:36 -0500 Subject: [PATCH 09/13] Testing whether deps are handled automatically by setup.py as they should be. --- .github/workflows/CI.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index e72800c..dc384ab 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -61,9 +61,6 @@ jobs: - name: Install PyCC and Deps run: | python -m pip install . - pip install opt_einsum - pip install scipy - pip install torch pip install pytest - name: Test and generate coverage report From 247f18cb312e820474ee27ee46beae057542627e Mon Sep 17 00:00:00 2001 From: "T. Daniel Crawford" Date: Sun, 7 Jan 2024 14:30:51 -0500 Subject: [PATCH 10/13] Added python 3.12 to workflow. --- .github/workflows/CI.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index dc384ab..13f54f1 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -22,7 +22,7 @@ jobs: fail-fast: true matrix: os: [macOS-latest, ubuntu-latest] - python-version: ['3.11'] + python-version: ['3.11', '3.12'] steps: - uses: actions/checkout@v2 From 25d7d69715ea0428205dbe9b57b6aa27b048cdb5 Mon Sep 17 00:00:00 2001 From: "T. Daniel Crawford" Date: Mon, 8 Jan 2024 11:36:13 -0500 Subject: [PATCH 11/13] Testing python 3.12 only. --- .github/workflows/CI.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 13f54f1..c06bd27 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -22,7 +22,7 @@ jobs: fail-fast: true matrix: os: [macOS-latest, ubuntu-latest] - python-version: ['3.11', '3.12'] + python-version: ['3.12'] steps: - uses: actions/checkout@v2 From 018ed43c7fea174f8e1cf12105e8c5376e90bc7a Mon Sep 17 00:00:00 2001 From: "T. Daniel Crawford" Date: Mon, 8 Jan 2024 14:45:12 -0500 Subject: [PATCH 12/13] Shifting to python 3.11 only for now. --- .github/workflows/CI.yaml | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index c06bd27..dc384ab 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -22,7 +22,7 @@ jobs: fail-fast: true matrix: os: [macOS-latest, ubuntu-latest] - python-version: ['3.12'] + python-version: ['3.11'] steps: - uses: actions/checkout@v2 diff --git a/setup.py b/setup.py index a3e9f99..76d2de6 100644 --- a/setup.py +++ b/setup.py @@ -59,7 +59,7 @@ 'Mac OS-X', 'Unix'], # 'Windows'], # Valid platforms your code works on, adjust to your flavor - python_requires=">=3.11" # Python version restrictions + python_requires="=3.11" # Python version restrictions # Manual control if final package is compressible or not, set False to prevent the .egg from being made # zip_safe=False, From a37ce5d39ea7ccfc5b8dc79f290f3f19dec92b72 Mon Sep 17 00:00:00 2001 From: "T. Daniel Crawford" Date: Mon, 8 Jan 2024 14:47:30 -0500 Subject: [PATCH 13/13] Shifting to python 3.11 only for now. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 76d2de6..a3e9f99 100644 --- a/setup.py +++ b/setup.py @@ -59,7 +59,7 @@ 'Mac OS-X', 'Unix'], # 'Windows'], # Valid platforms your code works on, adjust to your flavor - python_requires="=3.11" # Python version restrictions + python_requires=">=3.11" # Python version restrictions # Manual control if final package is compressible or not, set False to prevent the .egg from being made # zip_safe=False,