Skip to content

Commit

Permalink
Made tests uninstallable (#189)
Browse files Browse the repository at this point in the history
* fix #182 
* Made tests not installable
* Fixed relative imports in tests
  • Loading branch information
whitead authored Sep 15, 2020
1 parent 1737771 commit a4492a1
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ env:
- GROMACS_VERSION=4.6.5 PYTHON_VERSION=3.6
- GROMACS_VERSION=2018.6 PYTHON_VERSION=3.6
- GROMACS_VERSION=2019.1 PYTHON_VERSION=3.6
- GROMACS_VERSION=2019.1 PYTHON_VERSION=3.7
- GROMACS_VERSION=2019.1 PYTHON_VERSION=3.7
# Test "append_suffix" implementation
- GROMACS_VERSION=2018.6 PYTHON_VERSION=3.6
SETUP_CMD="${SETUP_CMD} --link-gmx-mpi --no-append-suffix"
Expand All @@ -44,7 +44,7 @@ matrix:
include:
# see Gromacs packages on bioconda https://anaconda.org/bioconda/gromacs/files
- os: osx
env: GROMACS_VERSION=4.6.5 PYTHON_VERSION=3.6
env: GROMACS_VERSION=4.6.5 PYTHON_VERSION=3.6
- os: osx
env: GROMACS_VERSION=2019.1 PYTHON_VERSION=2.7 NUMPY_VERSION=1.16
- os: osx
Expand Down
41 changes: 17 additions & 24 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,24 @@
'Topic :: Scientific/Engineering :: Chemistry',
'Topic :: Software Development :: Libraries :: Python Modules',
],
packages=find_packages(exclude=['tests','scripts','extras','doc/examples']),
scripts = [
'scripts/gw-join_parts.py',
'scripts/gw-merge_topologies.py',
'scripts/gw-forcefield.py',
'scripts/gw-partial_tempering.py',
],
packages=find_packages(
exclude=['scripts', 'tests', 'tests.*', 'extras', 'doc/examples']),
scripts=[
'scripts/gw-join_parts.py',
'scripts/gw-merge_topologies.py',
'scripts/gw-forcefield.py',
'scripts/gw-partial_tempering.py',
],
package_data={'gromacs': ['templates/*.sge', 'templates/*.pbs', # template files
'templates/*.ll', 'templates/*.sh',
'templates/*.mdp', 'templates/*.cfg',
'tests/data/fileformats/top/*.mdp', # test data
'tests/data/fileformats/top/*.bz2',
'tests/data/fileformats/top/*/*.top',
'tests/data/fileformats/top/*/*.gro',
'tests/data/*.log',
'tests/data/*.ndx',
'templates/*.mdp', 'templates/*.cfg'
],
},
install_requires = ['numpy>=1.0',
'six', # towards py 3 compatibility
'numkit', # numerical helpers
'matplotlib',
],
tests_require = ['pytest', 'numpy>=1.0', 'pandas>=0.17'],
zip_safe = True,
)


install_requires=['numpy>=1.0',
'six', # towards py 3 compatibility
'numkit', # numerical helpers
'matplotlib',
],
tests_require=['pytest', 'numpy>=1.0', 'pandas>=0.17'],
zip_safe=True,
)
1 change: 0 additions & 1 deletion tests/fileformats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
# Copyright (c) 2009 Oliver Beckstein <[email protected]>
# Released under the GNU Public License 3 (or higher, your choice)
# See the file COPYING for details.

1 change: 0 additions & 1 deletion tests/fileformats/top/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
# Copyright (c) 2009 Oliver Beckstein <[email protected]>
# Released under the GNU Public License 3 (or higher, your choice)
# See the file COPYING for details.

3 changes: 2 additions & 1 deletion tests/test_cbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@

from .datafiles import datafile


def test_grompp_qtot(tmpdir):
pdb = datafile("1ake_A.pdb")
top = tmpdir.mkdir("top")
with top.as_cwd():
f = gromacs.setup.topology(struct=pdb, ff="oplsaa", water="tip4p")
with open('none.mdp','w') as mdp:
with open('none.mdp', 'w') as mdp:
mdp.write('; empty mdp file\nrcoulomb = 1\nrvdw = 1\nrlist = 1\n')
qtot = cbook.grompp_qtot(f="none.mdp", c=f['struct'], p=f['top'],
stdout=False, maxwarn=10)
Expand Down

0 comments on commit a4492a1

Please sign in to comment.