diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index a71d1d5e..ab1092b0 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -100,6 +100,61 @@ jobs:
coveralls --service=github --merge=coverage.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ #
+ # Test Conda Python
+ #
+ test_conda:
+ name: Conda Python ${{ matrix.version }} - ${{ matrix.os }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - {version: '3.9', os: ubuntu-latest, documentation: False}
+ defaults:
+ run:
+ shell: bash -l {0}
+ steps:
+ - uses: actions/checkout@v2
+ - uses: conda-incubator/setup-miniconda@v2
+ with:
+ activate-environment: adcc-dev
+ environment-file: conda/environment_dev_linux.yml
+ python-version: ${{ matrix.version }}
+ auto-activate-base: false
+ - name: Dump siteconfig with coverage flags for C++
+ run: |
+ mkdir $HOME/.adcc/
+ echo 'coverage = True' > $HOME/.adcc/siteconfig.py
+ - name: Build and test adcc
+ run: |
+ conda info
+ conda list
+ pip install pyscf
+ # python -c "import psi4"
+ python setup.py test -a '--cov=adcc'
+ python setup.py cpptest -v
+ #
+ - name: Upload coverage to codecov
+ run: |
+ pip install codecov
+ codecov -X gcov
+ lcov --directory . --capture --output-file coverage.info
+ lcov --remove coverage.info '/opt/*' '/Applications/*' '/Library/*' '/usr/*' "${HOME}"'/.cache/*' "${HOME}"'/.local/*' "${PWD}"'/build/*' "${PWD}"'/libadcc/tests/*' --output-file coverage.info
+ lcov --list coverage.info
+ codecov -X gcov -f coverage.info
+ #
+ - name: Upload coverage to coveralls
+ # Note: Needs to be after the above step, because it parses the coverage.info
+ run: |
+ pip install coveralls
+ sudo gem install coveralls-lcov
+ coveralls-lcov -v -n coverage.info > coverage.json
+ coveralls --service=github --merge=coverage.json
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
#
# Test source code formatting
#
diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml
index 0cc56189..193d1c1c 100644
--- a/.github/workflows/publish.yaml
+++ b/.github/workflows/publish.yaml
@@ -28,54 +28,4 @@ jobs:
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
- password: ${{ secrets.pypi_password }}
-
- publish_conda:
- name: Publish 📦 to Conda
- needs: publish_pypi
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [macos-latest, ubuntu-latest]
-
- steps:
- - uses: actions/checkout@v2
-
- - name: Install deps on macos
- if: contains( matrix.os, 'macos')
- run: brew install coreutils || true
-
- - name: Install macOS SDK
- if: contains( matrix.os, 'macos')
- working-directory: /Users/runner
- run: |
- curl -fsSL https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.9.sdk.tar.xz > ~/MacOSX10.9.sdk.tar.xz
- tar -xzf ~/MacOSX10.9.sdk.tar.xz
- rm ~/MacOSX10.9.sdk.tar.xz
-
- - name: Download and verify miniconda
- run: |
- if [[ "${{ matrix.os }}" =~ ^macos ]]; then
- md5sum () { command md5 -r "$@"; }
- MINICONDA=Miniconda3-latest-MacOSX-x86_64.sh
- else
- MINICONDA=Miniconda3-latest-Linux-x86_64.sh
- fi
- MINICONDA_MD5=$(curl -s https://repo.anaconda.com/miniconda/ | grep -A3 $MINICONDA | sed -n '4p' | sed -n 's/ *
\(.*\)<\/td> */\1/p')
- curl -fsSL https://repo.anaconda.com/miniconda/$MINICONDA > miniconda.sh
- if [[ $MINICONDA_MD5 != $(md5sum miniconda.sh | cut -d ' ' -f 1) ]]; then
- echo "Miniconda MD5 mismatch"
- exit 1
- fi
-
- - name: Install miniconda
- run: |
- bash miniconda.sh -b -p "$HOME/miniconda"
- rm miniconda.sh
-
- - name: Build and Deploy
- env:
- ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
- run: |
- source $HOME/miniconda/bin/activate
- bash scripts/upload_to_anaconda.sh
+ password: ${{ secrets.pypi_password }}
\ No newline at end of file
diff --git a/conda/build.sh b/conda/build.sh
deleted file mode 100644
index a21f5b2e..00000000
--- a/conda/build.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-set -eu
-
-# First run h2o_sto3g tests
-${PYTHON} setup.py test -a "-k h2o_sto3g"
-
-# Check adcc finds pyscf and psi4
-# TODO Installing psi4 or pyscf currently does not work, so disabled here
-# ${PYTHON} <<- EOF
-# import adcc
-# assert "psi4" in adcc.backends.available()
-# assert "pyscf" in adcc.backends.available()
-# EOF
-
-# Now install adcc
-${PYTHON} setup.py install --prefix=${PREFIX}
diff --git a/conda/conda_build_config.yaml b/conda/conda_build_config.yaml
deleted file mode 100644
index d6f1809a..00000000
--- a/conda/conda_build_config.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
-# <<< Compiler Stuff >>>
-c_compiler:
- - clang # [osx]
- - gcc # [linux]
-cxx_compiler:
- - clangxx # [osx]
- - gxx # [linux]
-target_platform:
- - osx-64 # [osx]
- - linux-64 # [linux]
-CONDA_BUILD_SYSROOT:
- - /Users/runner/MacOSX10.9.sdk # [osx]
-c_compiler_version:
- - 7.3.0 # [linux]
- - 10 # [osx]
-cxx_compiler_version:
- - 7.3.0 # [linux]
- - 10 # [osx]
diff --git a/conda/config_dev.yaml b/conda/config_dev.yaml
deleted file mode 100644
index e5d865a3..00000000
--- a/conda/config_dev.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-# only python 3.8 for dev deployment
-python:
- - 3.8
\ No newline at end of file
diff --git a/conda/config_main.yaml b/conda/config_main.yaml
deleted file mode 100644
index 378349ab..00000000
--- a/conda/config_main.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-python:
- - 3.7
- - 3.8
- - 3.9
diff --git a/conda/environment_dev_linux.yml b/conda/environment_dev_linux.yml
new file mode 100644
index 00000000..ea757e1d
--- /dev/null
+++ b/conda/environment_dev_linux.yml
@@ -0,0 +1,23 @@
+name: adcc-dev
+channels:
+ - conda-forge
+dependencies:
+ # Build
+ - python
+ - gcc_linux-64 =9.4
+ - gxx_linux-64 =9.4
+ - libtensorlight =3.0.1=hc894906_1
+ - pybind11 >=2.6
+ # Run
+ - numpy >=1.14
+ - scipy >=1.2
+ - tqdm >=4.30
+ - h5py >=2.9
+ - opt_einsum >=3.0
+ # Tests
+ - pandas >=0.25.0
+ - cppe >=0.3.1
+ - pytest
+ - pytest-cov
+ - pyyaml
+ - lcov
diff --git a/conda/meta.yaml.in b/conda/meta.yaml.in
deleted file mode 100644
index fefe9930..00000000
--- a/conda/meta.yaml.in
+++ /dev/null
@@ -1,77 +0,0 @@
-package:
- name: adcc
- version: @ADCC_VERSION@
-
-source:
- path: ../
-
-requirements:
- build:
- - {{ compiler('c') }}
- - {{ compiler('cxx') }}
- - python {{ python }}
- - libtensorlight >=3.0.1
- host:
- - python {{ python }}
- - libtensorlight >=3.0.1
- - pybind11 >=2.6
- # Testing:
- - pytest
- - pytest-cov
- - pyyaml
- # - psi4 # TODO Unfortunately installing psi4 here does not work.
- # - pyscf # TODO Unfortunately pyscf neither
- # Standard dependencies:
- - numpy >=1.14
- - h5py >=2.9
- - scipy >=1.2
- - matplotlib >=3.0
- - tqdm >=4.30
- - opt_einsum >=3.0
- - pandas >=0.25.0
- run:
- - {{ pin_compatible('python', max_pin='x.x') }}
- - libtensorlight >=3.0.1
- - numpy >=1.14
- - h5py >=2.9
- - scipy >=1.2
- - matplotlib >=3.0
- - tqdm >=4.30
- - opt_einsum >=3.0
- - pandas >=0.25.0
-
-test:
- imports:
- - adcc
- requires:
- - pytest
- - libtensorlight
- commands:
- - export PYLIB_EXT=`$PYTHON -c 'import sysconfig as s; print(s.get_config_var("EXT_SUFFIX"))'`
- - test -f $PREFIX/lib/python{{ PY_VER }}/site-packages/libadcc$PYLIB_EXT
- # TODO Proper testing done during build for now.
-
-
-files:
- - $PREFIX/lib/python{{ PY_VER }}/site-packages/adcc*
- - $PREFIX/lib/python{{ PY_VER }}/site-packages/libadcc*
-
-
-about:
- home: https://adc-connect.org
- dev_url: https://github.com/adc-connect/adcc
- doc_url: https://adc-connect.org
- license: GPL-3.0
- license_family: GPL
- license_file: {{ SRC_DIR }}/LICENSE
- summary: "adcc: Seamlessly connect your program to ADC"
- description: |
- adcc (**ADC-connect**) is a python-based framework for performing
- the calculation of molecular spectra and electronically excited states
- based upon the algebraic-diagrammatic construction (ADC) approach.
- Arbitrary host programs may be used to supply a
- self-consistent field (SCF) reference to start off the ADC calculation.
- Currently adcc comes with ready-to-use interfaces to four programs,
- namely pyscf, psi4, VeloxChem or molsturm. Adding other SCF codes or
- starting a calculation from
- statically computed data can be easily achieved.
diff --git a/scripts/upload_to_anaconda.sh b/scripts/upload_to_anaconda.sh
deleted file mode 100755
index 7e2c4acc..00000000
--- a/scripts/upload_to_anaconda.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-
-if [ ! -f scripts/upload_to_anaconda.sh -o ! -f setup.py -o ! -f conda/meta.yaml.in ]; then
- echo "Please run from top dir of repository" >&2
- exit 1
-fi
-if [ -z "$ANACONDA_TOKEN" ]; then
- echo "Skipping build ... ANACONDA_TOKEN not set." >&2
- exit 1
-fi
-
-ADCC_VERSION=$(< setup.cfg awk '/current_version/ {print; exit}' | egrep -o "[0-9.]+")
-ADCC_TAG=$(git tag --points-at $(git rev-parse HEAD))
-if [[ "$ADCC_TAG" =~ ^v([0-9.]+)$ ]]; then
- LABEL=main
-else
- LABEL=dev
- ADCC_VERSION="${ADCC_VERSION}.dev"
- ADCC_TAG=$(git rev-parse HEAD)
-fi
-
-echo -e "\n#"
-echo "#-- Deploying tag/commit '$ADCC_TAG' (version $ADCC_VERSION) to label '$LABEL'"
-echo -e "#\n"
-
-set -eu
-
-# Build conda/meta.yaml and conda_build_config.yaml
-< conda/meta.yaml.in sed "s/@ADCC_VERSION@/$ADCC_VERSION/g;" > conda/meta.yaml
-
-# Install requirements and setup channels
-conda install conda-build anaconda-client conda-verify --yes
-# conda config --append channels psi4/label/dev
-# conda config --append channels pyscf
-
-# Running build and deployment
-conda build conda -m conda/config_${LABEL}.yaml -c adcc/label/main -c defaults -c conda-forge --user adcc --token $ANACONDA_TOKEN --label $LABEL
|