Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial draft of updated CI. #67

Merged
merged 14 commits into from
Jan 8, 2024
Merged
39 changes: 15 additions & 24 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: true
matrix:
os: [macOS-latest, ubuntu-latest]
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.11']

steps:
- uses: actions/checkout@v2
Expand All @@ -37,49 +37,40 @@ 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 conda-forge
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 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 }}
20 changes: 2 additions & 18 deletions devtools/conda-envs/psi.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
name: p4dev
name: p4env
channels:
- 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
- nodefaults
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"numpy",
"opt_einsum",
"scipy",
"torch<=1.11"
"torch"
],

# Which Python importable modules should be included when your package is installed
Expand All @@ -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,
Expand Down
Loading