Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI with coverage #60

Merged
merged 19 commits into from
Sep 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
tags
__pycache__/
pwscf.save/
.cache/
Expand Down
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
sudo: true

language: python

python: 3.7

cache:
- pip

before_install:
- sudo apt update
- sudo apt install -y quantum-espresso
- pip install codecov pytest pytest-cov
- wget http://folk.uio.no/anjohan/lmp
- chmod u+x lmp
- pip install -r requirements.txt

script:
- cd tests
- PWSCF_COMMAND=pw.x lmp=../lmp pytest --cov=../
- coverage xml

after_success:
- codecov
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
[![Build Status](https://travis-ci.org/anjohan/flare.svg?branch=master)](https://travis-ci.org/anjohan/flare) [![codecov](https://codecov.io/gh/anjohan/flare/branch/master/graph/badge.svg)](https://codecov.io/gh/anjohan/flare)

# FLARE: Fast Learning of Atomistic Rare Events

FLARE is an open-source Python package for creating fast and accurate atomistic potentials. Documentation of the code is in progress, and can be accessed here: https://flare.readthedocs.io/


## Prerequisites
1. To train a potential on the fly, you'll need to have a working installation of Quantum ESPRESSO on your machine. The instructions for installation can be found here: https://www.quantum-espresso.org/
2. Our kernels and environment objects require the Python package numba. If you're using Anaconda, you can get it with the command "conda install numba".
2. Our kernels and environment objects require the Python package numba. If you're using Anaconda, you can get it with the command `conda install numba`.
3. In order for unit testing to work:<br/>
a. set an environment variable called "PWSCF_COMMAND" to point to your pw.x Quantum ESPRESSO binary.<br/>
b. ensure you have the pytest python package installed.
Expand Down
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
numpy
scipy
memory_profiler
numba
2 changes: 1 addition & 1 deletion tests/test_mgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def test_parse_header():
lammps_calculator.write_text(data_file_name, data_text)

# create lammps input
style_string = 'mff' #TODO: change the name of lammps
style_string = 'mgp' #TODO: change the name of lammps
coeff_string = '* * {} 47 53 yes yes'.format(lammps_location)
lammps_executable = '$lmp'
dump_file_name = 'tmp.dump'
Expand Down