-
Notifications
You must be signed in to change notification settings - Fork 75
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
GitHub actions ci #198
GitHub actions ci #198
Changes from all commits
5865571
9894449
f42d548
8d1c94a
3eab4a0
3cebc9a
ee8c895
40f5552
f755809
9ce7462
b04dbca
0463c08
eccf01d
e1d55ba
8522ca5
df092e9
57761c4
c953034
5c05112
dc16ddb
b8d3b46
6f2d1fc
05004ab
f5781c4
3c3cc7f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
updates: | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,128 @@ | ||||||||||
name: ci | ||||||||||
|
||||||||||
on: | ||||||||||
push: | ||||||||||
branches: | ||||||||||
- "master" | ||||||||||
pull_request: | ||||||||||
branches: | ||||||||||
- "master" | ||||||||||
|
||||||||||
jobs: | ||||||||||
test: | ||||||||||
runs-on: ${{ matrix.os }} | ||||||||||
strategy: | ||||||||||
fail-fast: false | ||||||||||
matrix: | ||||||||||
os: | ||||||||||
- macOS-latest | ||||||||||
- ubuntu-latest | ||||||||||
python-version: | ||||||||||
- 3.6 | ||||||||||
- 3.7 | ||||||||||
- 3.8 | ||||||||||
env: | ||||||||||
CI_OS: ${{ matrix.os }} | ||||||||||
PYVER: ${{ matrix.python-version }} | ||||||||||
PACKAGE: forcebalance | ||||||||||
|
||||||||||
steps: | ||||||||||
- name: Checkout | ||||||||||
uses: actions/checkout@v2 | ||||||||||
|
||||||||||
- uses: conda-incubator/setup-miniconda@v2 | ||||||||||
with: | ||||||||||
python-version: ${{ matrix.python-version }} | ||||||||||
activate-environment: test | ||||||||||
channel-priority: true | ||||||||||
environment-file: devtools/conda-envs/test_env.yaml | ||||||||||
auto-activate-base: false | ||||||||||
|
||||||||||
- name: Additional info about the build | ||||||||||
shell: bash | ||||||||||
run: | | ||||||||||
uname -a | ||||||||||
df -h | ||||||||||
ulimit -a | ||||||||||
|
||||||||||
- name: Environment Information | ||||||||||
shell: bash -l {0} | ||||||||||
run: | | ||||||||||
conda info --all | ||||||||||
conda list | ||||||||||
|
||||||||||
- name: Install OpenFF stack and OpenEye on Python 3.6+ | ||||||||||
if: ${{ matrix.python-version != 2.7}} | ||||||||||
shell: bash -l {0} | ||||||||||
run: | | ||||||||||
conda install openforcefield -c conda-forge -c omnia -y | ||||||||||
|
||||||||||
# Need to replace ndcctools with this block | ||||||||||
# - name: Install Work Queue | ||||||||||
# shell: bash -l {0} | ||||||||||
# run: | | ||||||||||
# wget https://raw.githubusercontent.com/leeping/forcebalance/master/tools/install-cctools.sh | ||||||||||
# bash install-cctools.sh | ||||||||||
# echo "Checking for Work Queue import; if successful, no message will be printed" | ||||||||||
# python -c "import work_queue" | ||||||||||
# export PATH="$GITHUB_WORKSPACE/opt/cctools/current/bin:$PATH" | ||||||||||
|
||||||||||
- name: Install GROMACS | ||||||||||
shell: bash -l {0} | ||||||||||
run: | | ||||||||||
# This will not install double precision, needs to be replaced with a fresh build | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since it's easy to lose the context of these sorts of comments
Suggested change
|
||||||||||
conda install gromacs -c bioconda -c conda-forge -y | ||||||||||
|
||||||||||
- name: Install Tinker | ||||||||||
run: | | ||||||||||
if [[ "$CI_OS" == 'ubuntu-latest' ]]; then | ||||||||||
wget https://dasher.wustl.edu/tinker/downloads/bin-linux-8.8.3.tar.gz -O tinker.tar.gz | ||||||||||
fi | ||||||||||
if [[ "$CI_OS" == 'macOS-latest' ]]; then | ||||||||||
wget https://dasher.wustl.edu/tinker/downloads/bin-macos-8.8.3.tar.gz -O tinker.tar.gz | ||||||||||
fi | ||||||||||
tar xvzf tinker.tar.gz &> untar.log | ||||||||||
|
||||||||||
mkdir -p $GITHUB_WORKSPACE/opt/tinker/8.8.3 | ||||||||||
if [[ "$CI_OS" == 'ubuntu-latest' ]]; then | ||||||||||
mv bin-linux $GITHUB_WORKSPACE/opt/tinker/8.8.3/bin | ||||||||||
fi | ||||||||||
if [[ "$CI_OS" == 'macOS-latest' ]]; then | ||||||||||
mv bin-macos $GITHUB_WORKSPACE/opt/tinker/8.8.3/bin | ||||||||||
fi | ||||||||||
|
||||||||||
echo "appending to GITHUB_PATH ... " | ||||||||||
echo "$GITHUB_WORKSPACE/opt/tinker/8.8.3/bin" >> $GITHUB_PATH | ||||||||||
echo "successfully appended to GITHUB_PATH" | ||||||||||
|
||||||||||
- name: Extract data archives | ||||||||||
run: | | ||||||||||
cd studies/001_water_tutorial | ||||||||||
tar xvjf targets.tar.bz2 | ||||||||||
cd ../../ | ||||||||||
|
||||||||||
- name: Install package | ||||||||||
shell: bash -l {0} | ||||||||||
run: | | ||||||||||
# python setup.py install | ||||||||||
python -m pip install --no-deps . | ||||||||||
python -c "import forcebalance; print(forcebalance.__version__)" | ||||||||||
|
||||||||||
- name: Run water study | ||||||||||
shell: bash -l {0} | ||||||||||
run: | | ||||||||||
cd studies/001_water_tutorial | ||||||||||
tar xvjf targets.tar.bz2 | ||||||||||
ForceBalance very_simple.in | ||||||||||
cd ../../ | ||||||||||
|
||||||||||
- name: Run tests | ||||||||||
shell: bash -l {0} | ||||||||||
run: | | ||||||||||
pytest -v --cov=forcebalance --cov-config=setup.cfg --durations=0 --cov-report=xml | ||||||||||
|
||||||||||
- name: Codecov | ||||||||||
uses: codecov/codecov-action@v1 | ||||||||||
with: | ||||||||||
file: ./coverage.xml | ||||||||||
fail_ci_if_error: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,4 @@ dependencies: | |
#- openforcefield | ||
#- openeye-toolkits | ||
|
||
- ndcctools |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -360,7 +360,7 @@ def calltinker(self, command, stdin=None, print_to_screen=False, print_command=F | |
if len(vw.split('.')) <= 2: | ||
vn = float(vw) | ||
else: | ||
vn = float(vw.split('.')[:2]) | ||
vn = float(vw.split('.')[0]) + 0.1*float(vw.split('.')[1]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This issue was reported by a student in a private message but I don't think there's an issue corresponding to it. |
||
vn_need = 6.3 | ||
try: | ||
if vn < vn_need: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.