mirror of https://github.com/abinit/abipy.git
Try to replace nose with pytest
This commit is contained in:
parent
f621450cf8
commit
e82a843194
34
.travis.yml
34
.travis.yml
|
@ -17,33 +17,16 @@ install:
|
|||
- env
|
||||
|
||||
# pip-based installation.
|
||||
#- pip install numpy
|
||||
#- travis_wait pip install -q -r requirements.txt
|
||||
#- travis_wait pip install -q -r requirements-optional.txt
|
||||
|
||||
# Install conda https://conda.io/docs/travis.html
|
||||
- source dev_scripts/conda_installer.sh
|
||||
|
||||
- source dev_scripts/conda_develop.sh
|
||||
- conda uninstall -y pymatgen
|
||||
|
||||
#- conda config --add channels conda-forge
|
||||
# See https://github.com/BVLC/caffe/issues/3884 and https://docs.continuum.io/mkl-optimizations/
|
||||
#- conda install nomkl
|
||||
#- conda install pandas
|
||||
#- conda install netcdf4
|
||||
# See https://github.com/ContinuumIO/anaconda-issues/issues/1360
|
||||
#- conda install hdf4=4.2.12
|
||||
#- pip install pytest scripttest
|
||||
- if [[ "${PYTHON_VERSION}" == "2.7" ]]; then conda install mock; fi
|
||||
#- pip install pep8 python-coveralls
|
||||
#- conda install matplotlib seaborn
|
||||
#- pip install matplotlib seaborn
|
||||
#- pip install scikit-image
|
||||
#- conda install ipython jupyter nbformat
|
||||
- pip install ipython jupyter nbformat
|
||||
- pip install nose nose-exclude
|
||||
#- conda install -c conda-forge ipywidgets
|
||||
#- pip install ipywidgets
|
||||
|
||||
# Install abinit from abinit conda channel.
|
||||
#- conda install -c gmatteo abinit=8.6.1
|
||||
|
@ -53,18 +36,6 @@ install:
|
|||
# Mayavi (optional requirement)
|
||||
#- if [[ "${PYTHON_VERSION}" == "2.7" ]]; then conda install mayavi; fi
|
||||
#- if [[ "${PYTHON_VERSION}" == "3.6" ]]; then conda install vtk && pip install mayavi; fi
|
||||
#
|
||||
# phonopy is not a requirement but we test scripts in data/runs that use it
|
||||
#- conda install -c conda-forge phonopy
|
||||
|
||||
#- if [[ "${PYTHON_VERSION}" == "2.7" ]]; then rm -rf /home/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/pymatgen*; fi
|
||||
#- if [[ "${PYTHON_VERSION}" == "3.6" ]]; then rm -rf /home/travis/miniconda/envs/test-environment/lib/python3.6/site-packages/pymatgen*; fi
|
||||
|
||||
- conda uninstall -y pymatgen
|
||||
|
||||
# Get pymatgen from matsci
|
||||
#- conda config --add channels matsci
|
||||
#- conda install pymatgen #=4.7.2
|
||||
|
||||
# Use my pymatgen fork
|
||||
#- git clone --depth=50 https://github.com/gmatteo/pymatgen.git && cd pymatgen && pip install -q -r requirements.txt && pip install -q -r requirements-optional.txt && python setup.py install && cd ../
|
||||
|
@ -80,9 +51,6 @@ install:
|
|||
- cp abipy/data/managers/travis_manager.yml ${HOME}/.abinit/abipy/manager.yml
|
||||
- ./dev_scripts/pyclean.py .
|
||||
|
||||
# Install bader (http://theory.cm.utexas.edu/henkelman/code/bader/) from matsci
|
||||
#- conda install -c matsci bader
|
||||
|
||||
before_script:
|
||||
# This to run tests requiring a graphical user e.g. mayavi
|
||||
# https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
|
||||
|
|
|
@ -114,9 +114,9 @@ class BaderCharges(Charges):
|
|||
"BaderCharges.from_files requires the executable bader to be in the path.")
|
||||
def from_files(cls, density_path, pseudopotential_paths, with_core=True, workdir=None, **kwargs):
|
||||
"""
|
||||
Uses the abinit density files and the bader executable from Henkelmann et al. to calculate
|
||||
Uses the abinit density files and the bader executable_ from Henkelmann et al. to calculate
|
||||
the bader charges of the system. If pseudopotentials are given, the atomic charges will be
|
||||
extracted as well.
|
||||
extracted as well. See also :cite:`Henkelmann2006`.
|
||||
|
||||
The extraction of the core charges may be a time consuming calculation, depending on the
|
||||
size of the system. A tuning of the parameters may be required (see Density.ae_core_density_on_mesh).
|
||||
|
|
|
@ -3,14 +3,16 @@ set -ev # exit on first error, print each command
|
|||
|
||||
echo "PMG_MAPI_KEY: 8pkvwRLQSCVbW2Fe" > ${HOME}/.pmgrc.yaml
|
||||
|
||||
abinit --version
|
||||
abinit --build
|
||||
abicheck.py --with-flow
|
||||
|
||||
nosetests -v --with-coverage --cover-package=abipy --logging-level=INFO
|
||||
#nosetests abipy -v --with-coverage --cover-package=abipy --logging-level=INFO
|
||||
# Run unit tests with nose.
|
||||
#nosetests -v --with-coverage --cover-package=abipy --logging-level=INFO --doctest-tests
|
||||
|
||||
#pytest --cov-config .coveragerc --cov=abipy -v abipy # --doctest-modules
|
||||
pytest --cov-config=.coveragerc --cov=abipy -v --doctest-modules --cache-clear abipy
|
||||
# This is to run the integration tests (append results)
|
||||
# pytest --cov-config .coveragerc --cov=abipy --cov-append -v abipy/integration_tests
|
||||
# pytest --cov-config=.coveragerc --cov=abipy --cov-append -v abipy/integration_tests
|
||||
|
||||
# Generate documentation
|
||||
if [[ "${PYTHON_VERSION}" == "3.6" && "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
||||
|
|
|
@ -55,7 +55,7 @@ extensions = [
|
|||
'sphinx.ext.inheritance_diagram',
|
||||
'sphinxcontrib.programoutput',
|
||||
'sphinx_gallery.gen_gallery',
|
||||
#"sphinxarg.ext", # CLI doc
|
||||
"sphinxarg.ext", # CLI doc
|
||||
#'nbsphinx',
|
||||
'sphinxcontrib.bibtex',
|
||||
"releases",
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
.. _jupyter: http://jupyter.org/
|
||||
.. _Python: http://www.python.org/
|
||||
.. _spglib: https://atztogo.github.io/spglib/
|
||||
.. _bader: http://theory.cm.utexas.edu/henkelman/code/bader/
|
||||
.. _ase: https://wiki.fysik.dtu.dk/ase/
|
||||
.. _COD: http://www.crystallography.net/cod/
|
||||
.. _CIF: http://www.iucr.org/resources/cif
|
||||
|
|
|
@ -233,3 +233,18 @@
|
|||
year = {2017},
|
||||
month = feb,
|
||||
}
|
||||
@article{Henkelman2006,
|
||||
author = {Henkelman, Graeme and Arnaldsson, Andri and Jónsson, Hannes},
|
||||
doi = {10.1016/j.commatsci.2005.04.010},
|
||||
number = {3},
|
||||
pages = {354-360},
|
||||
source = {Crossref},
|
||||
url = {http://dx.doi.org/10.1016/j.commatsci.2005.04.010},
|
||||
volume = {36},
|
||||
journal = {Computational Materials Science},
|
||||
publisher = {Elsevier BV},
|
||||
title = {A fast and robust algorithm for Bader decomposition of charge density},
|
||||
issn = {0927-0256},
|
||||
year = {2006},
|
||||
month = jun,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue