Skip to content

Commit

Permalink
Merge 8fe304a into d744d21
Browse files Browse the repository at this point in the history
  • Loading branch information
mfherbst committed Oct 26, 2019
2 parents d744d21 + 8fe304a commit 0fd61f1
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 37 deletions.
7 changes: 7 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[run]
branch = True
source = adcc
omit =
adcc/testdata/*
adcc/lib/*
*/test_*.py
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

# Testing
.pytest_cache
.coverage

# Jupyter
.ipynb_checkpoints/
Expand Down
52 changes: 21 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,52 @@
language: python
cache:
directories:
- "$HOME/.cache/pip"

notifications:
email: false

branches:
only:
# Only build master and version tags
- master
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/

os: linux
language: python
python:
- "3.7"
# - "3.6" # (best use this for deployment only)
- "3.5"

addons:
apt:
packages:
- libopenblas-base

# Environment variables for linux
env:
- [CC=gcc, CXX=g++]

install:
- travis_retry pip3 install pyscf # Install an SCF code
- pip3 install pyscf
- pip3 install --verbose -r requirements.txt
script: python3 setup.py test -a '--cov=adcc'

# These jobs are only run with the first python version
# mentioned in the initial list
jobs:
include:
#
# Checking
- stage: code style
python: 3.7
addons:
apt:
packages: [] # Do not install openblas here
install: travis_retry pip3 install flake8
script: flake8
env: CODE_STYLE="flake8"
#
# Testing
- stage: test
python: 3.7
env: BUILD_SDIST=true
- python: 3.5
- os: osx
language: script
os: osx
osx_image: xcode11.1 # macos 10.14
env: [CC=gcc-9, CXX=g++-9]

# This is the 'test' build stage
script: CC=$CC CXX=$CXX python3 setup.py test

stages:
- code style
- test

after_failure:
- $CC --version
- $CXX --version


# TODO Coverage on the python sources
# TODO Deployment to pip on linux (once, as sdist) and macos (each os as bdist_wheel)


notifications:
email: false
after_success:
- pip3 install coveralls
- coveralls
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<img src="https://raw.githubusercontent.com/adc-connect/adcc/master/docs/logo/logo.png" alt="adcc logo" height="100px" />

# adcc: Seamlessly connect your program to ADC
[![license](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://github.com/adc-connect/adcc/blob/master/LICENSE)
[![pypi](https://img.shields.io/pypi/v/adcc)](https://pypi.org/project/adcc)
[![Documentation](https://img.shields.io/badge/doc-latest-blue.svg)](https://adc-connect.org)
[![Travis](https://travis-ci.org/adc-connect/adcc.svg?branch=master)](https://travis-ci.org/adc-connect/adcc)
[![pypi](https://img.shields.io/pypi/v/adcc)](https://pypi.org/project/adcc)
[![license](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://github.com/adc-connect/adcc/blob/master/LICENSE)
[![Coverage Status](https://coveralls.io/repos/github/adc-connect/adcc/badge.svg?branch=master)](https://coveralls.io/github/adc-connect/adcc?branch=master)
[![DOI](https://zenodo.org/badge/215731857.svg)](https://zenodo.org/badge/latestdoi/215731857)


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.
Expand Down
12 changes: 9 additions & 3 deletions scripts/upload_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,15 @@ def upload_tarball(filename):
print()
print_input("Press enter to upload {} -> {}".format(filename, target))

host, tdir = target.split(":")
command = "put {} {}/".format(filename, tdir)
subprocess.run(["sftp", "-b", "-", host], input=command.encode(), check=True)
# TODO Ideally one would create a hash here and verify it on download
# to ensure integrity of the download process.

if ":" in target: # Remote deployment
host, tdir = target.split(":")
command = "put {} {}/".format(filename, tdir)
subprocess.run(["sftp", "-b", "-", host], input=command.encode(), check=True)
else: # Dummy local deployment
subprocess.run(["cp", filename, target], check=True)


def main():
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def run_tests(self):
"h5py >= 2.9", # Maybe also lower?
"tqdm >= 4.30", # Maybe also lower?
],
tests_require=["pytest"],
tests_require=["pytest", "pytest-cov"],
extras_require={
"build_docs": ["sphinx>=2", "breathe", "sphinxcontrib-bibtex"],
},
Expand Down

0 comments on commit 0fd61f1

Please sign in to comment.