File tree 6 files changed +34
-7
lines changed
6 files changed +34
-7
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,33 @@ language: python
2
2
3
3
python :
4
4
- ' 2.7'
5
- - ' 3.3'
6
5
- ' 3.4'
7
6
- ' 3.5'
8
7
- ' 3.6'
9
8
10
9
install :
11
- - pip install -r requirements.txt
12
- - python setup.py install
10
+ - sudo apt-get update
11
+ # We do this conditionally because it saves us some downloading if the
12
+ # version is the same.
13
+ - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
14
+ wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
15
+ else
16
+ wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
17
+ fi
18
+ - bash miniconda.sh -b -p $HOME/miniconda
19
+ - export PATH="$HOME/miniconda/bin:$PATH"
20
+ - hash -r
21
+ - conda config --set always_yes yes --set changeps1 no
22
+ - conda update -q conda
23
+ # Useful for debugging any issues with conda
24
+ - conda info -a
25
+
26
+ # Replace dep1 dep2 ... with your dependencies
27
+ - conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy nose
28
+ - source activate test-environment
29
+ - pip install -r requirements.txt
30
+ - pip install --no-deps -e .
31
+ - which nosetests
13
32
14
33
script : nosetests
15
34
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ A Python library for extracting the input settings and results from Density Func
7
7
Requirements
8
8
------------
9
9
10
- Python 2.7 or >=3.3 , with dependencies listed in [ requirements.txt] ( https://github.com/CitrineInformatics/pif-dft/blob/master/requirements.txt )
10
+ Python 2.7 or >=3.4 , with dependencies listed in [ requirements.txt] ( https://github.com/CitrineInformatics/pif-dft/blob/master/requirements.txt )
11
11
12
12
Installation
13
13
------------
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ def get_total_energy(self):
84
84
if "!" in line and "total energy" in line :
85
85
energy = line .split ()[4 :]
86
86
return Property (scalars = float (energy [0 ]), units = energy [1 ])
87
- raise Exception ( '%s not found in %s' % ( '! & total energy' , os . path . join ( self . _directory , self . outputf )))
87
+ return None
88
88
89
89
@Value_if_true
90
90
def is_relaxed (self ):
Original file line number Diff line number Diff line change 4
4
import os
5
5
from ase .calculators .vasp import Vasp
6
6
from ase .io .vasp import read_vasp , read_vasp_out
7
- from pypif .obj . common . value import Value
8
- from pypif . obj . common . file_reference import FileReference
7
+ from pypif .obj import Value , FileReference
8
+
9
9
10
10
class VaspParser (DFTParser ):
11
11
'''
Original file line number Diff line number Diff line change @@ -12,6 +12,14 @@ def get_parser(self,name):
12
12
unpack_example (os .path .join ('examples' , 'pwscf' , name + '.tar.gz' ))
13
13
return PwscfParser (name )
14
14
15
+ def test_Au_nscf (self ):
16
+ """Test that a NSCF calculation is even parseable"""
17
+ # Parse the results
18
+ parser = self .get_parser ('Au.nscf' )
19
+
20
+ # Test the settings
21
+ self .assertEquals ('PWSCF' , parser .get_name ())
22
+
15
23
def test_NaF (self ):
16
24
# Parse the results
17
25
parser = self .get_parser ('NaF.scf' )
You can’t perform that action at this time.
0 commit comments