Skip to content

Commit

Permalink
Release v0.10.0b5, merge PR #27 from chrisjsewell/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Oct 18, 2019
2 parents 359702e + 72892e9 commit 1eab963
Show file tree
Hide file tree
Showing 270 changed files with 35,003 additions and 8,132 deletions.
2 changes: 1 addition & 1 deletion .condarc
Expand Up @@ -7,4 +7,4 @@ channels:
show_channel_urls: True

# For more information about this file see:
# https://conda.io/docs/user-guide/configuration/use-condarc.html
# https://conda.io/docs/user-guide/configuration/use-condarc.html
2 changes: 0 additions & 2 deletions .coveragerc
Expand Up @@ -2,5 +2,3 @@


[report]


5 changes: 4 additions & 1 deletion .flake8
@@ -1,2 +1,5 @@
[flake8]
max-line-length = 121
max-line-length = 121
import-order-style = appnexus
application-import-names = aiida_crystal17
application-package-names = aiida
7 changes: 7 additions & 0 deletions .gitchangelog.rc
Expand Up @@ -94,6 +94,13 @@ ignore_regexps = [
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[d|D]ev:',
r'^(.{3,3}\s*:)?\s*[fF]irst commit.?\s*$',
r'^$', # ignore commits with empty messages

# one time removals
r'^[Pp]re commit( test)? fix\.$',
r'^Add test for aiida development version.*$',
r'^Test correction\.$',
r'^Minor improvements\.$',
r'^Style test fix\.$',
]

# ``section_regexps`` is a list of 2-tuples associating a string label and a
Expand Down
124 changes: 67 additions & 57 deletions .pre-commit-config.yaml
@@ -1,60 +1,70 @@
# Install pre-commit hooks via
# pre-commit install

- repo: git://github.com/pre-commit/pre-commit-hooks
sha: v2.2.3
hooks:
- id: check-json
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: double-quote-string-fixer
- id: flake8

- repo: local
hooks:

- id: yapf
name: Yet Another Python Formatter
entry: yapf
language: system
types: [python]
args: ["-i", "-vv"]

- id: version-number
name: Check version numbers
entry: python ./.travis-data/check_version.py version
language: system
files: >-
(?x)^(
setup.json|
.travis-data/check_version.py|
aiida_crystal17/__init__.py
)$
pass_filenames: false

- id: conda
name: Create environment.yml
entry: python ./.travis-data/check_version.py conda
language: system
files: >-
(?x)^(
setup.json|
setup.py|
.travis-data/check_version.py|
conda_dev_env.yml|
)$
pass_filenames: false

- id: travis-linter
name: Travis Lint
entry: travis lint
files: .travis.yml
language: ruby
additional_dependencies: ['travis']

- id: doc8
entry: doc8
language: system
types: [rst]
name: doc8 - Lint the documentation.
exclude: >
(?x)^(
aiida_crystal17/tests/raw_files/.*|
cry17_scripts/.*
)$
repos:

- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
hooks:
- id: check-json
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: double-quote-string-fixer
- id: flake8

- repo: local
hooks:

- id: yapf
name: Yet Another Python Formatter
entry: yapf
language: system
types: [python]
args: ["-i", "-vv"]

- id: version-number
name: Check version numbers
entry: python ./.pre-commit/check_version.py version
language: system
files: >-
(?x)^(
setup.json|
.pre-commit/check_version.py|
aiida_crystal17/__init__.py
)$
pass_filenames: false

- id: conda
name: Create environment.yml
entry: python ./.pre-commit/check_version.py conda
language: system
files: >-
(?x)^(
setup.json|
setup.py|
.pre-commit/check_version.py|
conda_dev_env.yml|
)$
pass_filenames: false

- id: travis-linter
name: Travis Lint
entry: travis lint
files: .travis.yml
language: ruby
additional_dependencies: ['travis']

- id: doc8
entry: doc8
language: system
types: [rst]
name: doc8 - Lint the documentation.

# TODO could also add check-manifest
Expand Up @@ -18,7 +18,7 @@


def get_setup_json():
"""Return the `setup.json` as a python dictionary """
"""Return the `setup.json` as a python dictionary."""
with open(FILEPATH_SETUP_JSON, 'r') as handle:
setup_json = json.load(handle) # , object_pairs_hook=OrderedDict)

Expand All @@ -27,6 +27,7 @@ def get_setup_json():

@click.group()
def cli():
"""Command line interface for pre-commit checks."""
pass


Expand Down Expand Up @@ -59,9 +60,7 @@ def validate_version():

@cli.command('conda')
def update_environment_yml():
"""
Updates conda_dev_env.yml file for conda.
"""
"""Update conda_dev_env.yml file for conda."""
import re
from ruamel.yaml.comments import CommentedMap, CommentedSeq
from ruamel.yaml import YAML
Expand Down
1 change: 0 additions & 1 deletion .readthedocs.yml
Expand Up @@ -16,4 +16,3 @@ python:
# builder: html
# configuration: conf.py
# fail_on_warning: true

3 changes: 2 additions & 1 deletion .style.yapf
@@ -1,3 +1,4 @@
[style]
based_on_style = google
column_limit = 120
column_limit = 120
indent_dictionary_value = true
57 changes: 39 additions & 18 deletions .travis.yml
Expand Up @@ -16,48 +16,61 @@ addons:
matrix:
include:
- python: 3.6
env: TEST_TYPE="code-style"
env: TEST_TYPE="pre-commit"
- python: 3.6
env: TEST_TYPE="version"
- python: 3.6
env: TEST_TYPE="pytest" TEST_AIIDA_BACKEND="django" MOCK_CRY17_EXECUTABLES=true PYPI_DEPLOY=true
env: TEST_TYPE="pytest" TEST_AIIDA_BACKEND="django" PYPI_DEPLOY=true
- python: 2.7
env: TEST_TYPE="pytest" TEST_AIIDA_BACKEND="django" MOCK_CRY17_EXECUTABLES=true
env: TEST_TYPE="pytest" TEST_AIIDA_BACKEND="django"
- python: 3.6
env: TEST_TYPE="pytest" TEST_AIIDA_BACKEND="sqlalchemy" MOCK_CRY17_EXECUTABLES=true
env: TEST_TYPE="pytest" TEST_AIIDA_BACKEND="sqlalchemy"
- python: 3.6
env: TEST_TYPE="docs" READTHEDOCS="True"
- python: 3.6
env: TEST_TYPE="conda"

# allow_failures:
# - env: TEST_TYPE="docs" READTHEDOCS="True"

install:
# Upgrade pip setuptools and wheel
- pip install -U "pip<19" wheel setuptools "reentry>=1.3"
- pip install --upgrade pip wheel setuptools "reentry>=1.3"
- pip install numpy==1.16.4 # otherwise numpy 1.17 is installed, which is incompatible with aiida-core==1.0.0b5
- |
if [[ "$TEST_TYPE" == "version" ]]; then
pip install click
if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
pip install typing==3.6.6 # otherwise importlib_resources installs incompatible version for aiida-core==1.0.0b5
fi
- |
if [[ "$TEST_TYPE" == "code-style" ]]; then
pip install "flake8<3.8.0,>=3.7.0"
if [[ "$TEST_TYPE" == "pre-commit" ]]; then
pip install -e .[code_style]
fi
- |
if [[ "$TEST_TYPE" == "pytest" ]]; then
pip uninstall -y numpy
pip install "notebook<5.5" # required by aiida-core->circus->pyzmq<17
pip install -e .[testing]
pip install coveralls
fi
- |
if [[ "$TEST_TYPE" == "docs" ]]; then
pip uninstall -y numpy
pip install -e .[docs]
url="https://github.com/jgm/pandoc/releases/tag/2.6"
path=$(curl -L $url | grep -o '/jgm/pandoc/releases/download/.*-amd64\.deb')
downloadUrl="https://github.com$path"
file=${path##*/}
wget $downloadUrl && sudo dpkg -i $file
fi
- |
if [[ "$TEST_TYPE" == "conda" ]]; then
# See https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html#the-travis-yml-file
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
hash -r
conda config --set always_yes yes --set changeps1 no
conda update -q conda
# Useful for debugging any issues with conda
conda info -a
fi
# - |
# if [[ ! -z "${AIIDA_BRANCH}" ]]; then
# cur_path="$(pwd)"
Expand All @@ -80,21 +93,29 @@ script:
pytest -v --cov=aiida_crystal17 --cov=examples --cov-config .coveragerc --cov-report= aiida_crystal17
fi
- |
if [[ "$TEST_TYPE" == "code-style" ]]; then
flake8 .
if [[ "$TEST_TYPE" == "pre-commit" ]]; then
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
fi
- |
if [[ "$TEST_TYPE" == "docs" ]]; then
cd docs
make
fi
- |
if [[ "$TEST_TYPE" == "version" ]]; then
python ./.travis-data/check_version.py version
if [[ "$TEST_TYPE" == "conda" ]]; then
travis_retry conda env create -f conda_dev_env.yml -n test-environment python=$TRAVIS_PYTHON_VERSION
conda list -n test-environment
source activate test-environment
pip install --no-deps -e .
reentry scan
verdi data crystal17.parse --help
fi
after_success:
- coveralls
- |
if [[ "$TEST_TYPE" == "pytest" ]]; then
coveralls
fi
deploy:
- provider: pypi
Expand Down
9 changes: 5 additions & 4 deletions .vscode/settings.json
Expand Up @@ -29,13 +29,14 @@
"restructuredtext.confPath": "${workspaceFolder}/docs/source",
"restructuredtext.linter.extraArgs": ["--max-line-length", "120"],
"cSpell.words": [
"aiida"
"aiida",
"pytest"
],
"todo-tree.tags": [
"todo-tree.general.tags": [
"TODO",
"todo::",
"FIXME",
"NOTE"
],
"todo-tree.regex": "((//|#-?|<!--|\\.\\.|;|/\\*|^)\\s*($TAGS)|^\\s*- \\[ \\])"
],
"todo-tree.regex.regex": "((//|#-?|<!--|\\.\\.|;|/\\*|^)\\s*($TAGS)|^\\s*- \\[ \\])"
}
3 changes: 2 additions & 1 deletion MANIFEST.in
@@ -1,4 +1,5 @@
include LICENSE
include pyproject.toml
include setup.json
recursive-include aiida_crystal17/tests/raw_files *
include aiida_crystal17/validation/*.json
include aiida_crystal17/validation/schemas/*.json

0 comments on commit 1eab963

Please sign in to comment.