Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
run yapf for all and remove py2 compatibility fix tests but qeq still failing fix examples put back output parsing
- Loading branch information
1 parent
9d10f69
commit 3e1cc19
Showing
41 changed files
with
455 additions
and
665 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Check that version numbers match. | ||
Check version number in setup.json and aiida_qeq/__init__.py and make sure | ||
they match. | ||
""" | ||
import os | ||
import json | ||
import sys | ||
|
||
THIS_PATH = os.path.split(os.path.realpath(__file__))[0] | ||
|
||
# Get content of setup.json | ||
SETUP_FNAME = 'setup.json' | ||
SETUP_PATH = os.path.join(THIS_PATH, os.pardir, SETUP_FNAME) | ||
with open(SETUP_PATH) as f: | ||
SETUP_CONTENT = json.load(f) | ||
|
||
# Get version from python package | ||
sys.path.insert(0, os.path.join(THIS_PATH, os.pardir)) | ||
import aiida_qeq # pylint: disable=wrong-import-position | ||
VERSION = aiida_qeq.__version__ | ||
|
||
if VERSION != SETUP_CONTENT['version']: | ||
print('version number mismatch detected:') | ||
print("version number in '{}': {}".format(SETUP_FNAME, SETUP_CONTENT['version'])) | ||
print("version number in '{}/__init__.py': {}".format('aiida_qeq', VERSION)) | ||
sys.exit(1) | ||
|
||
# Overwrite version in setup.json | ||
#SETUP_CONTENT['version'] = VERSION | ||
#with open(SETUP_PATH, 'w') as f: | ||
# json.dump(SETUP_CONTENT, f, indent=4, sort_keys=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: ci | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
tests: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
strategy: | ||
matrix: | ||
python-version: [3.7] | ||
backend: ['django'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install system dependencies | ||
run: | | ||
wget -O - "https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc" | sudo apt-key add - | ||
echo 'deb https://dl.bintray.com/rabbitmq-erlang/debian bionic erlang' | sudo tee -a /etc/apt/sources.list.d/bintray.rabbitmq.list | ||
echo 'deb https://dl.bintray.com/rabbitmq/debian bionic main' | sudo tee -a /etc/apt/sources.list.d/bintray.rabbitmq.list | ||
sudo rm -f /etc/apt/sources.list.d/dotnetdev.list /etc/apt/sources.list.d/microsoft-prod.list | ||
sudo apt update | ||
sudo apt install postgresql-10 rabbitmq-server graphviz | ||
sudo systemctl status rabbitmq-server.service | ||
- name: Install python dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install -e .[testing,cp2k] | ||
reentry scan -r aiida | ||
- name: Run test suite | ||
env: | ||
AIIDA_TEST_BACKEND: ${{ matrix.backend }} | ||
PYTEST_ADDOPTS: "--cov-report xml --cov-append" | ||
run: py.test | ||
|
||
- name: Upload coverage report | ||
if: github.repository == 'lsmo-epfl/aiida-qeq' | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
name: aiida-ddec | ||
file: ./coverage.xml | ||
fail_ci_if_error: true | ||
|
||
# docs: | ||
# runs-on: ubuntu-latest | ||
# timeout-minutes: 15 | ||
# steps: | ||
# - uses: actions/checkout@v1 | ||
# - name: Set up Python 3.7 | ||
# uses: actions/setup-python@v1 | ||
# with: | ||
# python-version: 3.7 | ||
# - name: Install python dependencies | ||
# run: | | ||
# pip install --upgrade pip | ||
# pip install -e .[docs] | ||
# reentry scan -r aiida | ||
# - name: Build docs | ||
# run: cd docs && make | ||
|
||
pre-commit: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
- name: Install python dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install -e .[pre-commit,testing] | ||
reentry scan -r aiida | ||
- name: Run pre-commit | ||
run: | | ||
pre-commit install | ||
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Publish on PyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
# After vMajor.Minor.Patch _anything_ is allowed (without "/") ! | ||
- v[0-9]+.[0-9]+.[0-9]+* | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'lsmo-epfl/aiida-qeq' && startsWith(github.ref, 'refs/tags/v') | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Upgrade setuptools and install package | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install -e . | ||
- name: Assert package version | ||
env: | ||
TAG_VERSION: ${{ github.ref }} | ||
run: python ./.github/check_version.py | ||
|
||
- name: Build source distribution | ||
run: python ./setup.py sdist | ||
|
||
- name: Publish package to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ dist/ | |
build/ | ||
.vscode | ||
.pytest_cache/ | ||
pip-wheel-metadata/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
aiida_qeq | ||
AiiDA plugin for computing electronic charges on atoms using equilibration-type models (QEq, EQEq, ...). | ||
""" | ||
|
||
__version__ = "1.0.0a1" | ||
__version__ = '1.0.0a1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Calculations provided by aiida_qeq. | ||
Register calculations via the "aiida.calculations" entry point in setup.json. | ||
""" | ||
from __future__ import absolute_import |
Oops, something went wrong.