Becksteinlab / GromacsWrapper

GromacsWrapper wraps system calls to GROMACS tools into thin Python classes (GROMACS 4.6.5 - 2024 supported).
https://gromacswrapper.readthedocs.org
GNU General Public License v3.0
169 stars 53 forks source link

Package installs 'tests' package which is likely a bug in the build system #182

Closed pacho2 closed 4 years ago

pacho2 commented 4 years ago

This patch fixes it


+++ b/setup.py  2020-06-06 21:50:43.109010442 +0200
@@ -35,7 +35,7 @@
                    'Topic :: Scientific/Engineering :: Chemistry',
                    'Topic :: Software Development :: Libraries :: Python Modules',
                    ],
-      packages=find_packages(exclude=['tests','scripts','extras','doc/examples']),
+      packages=find_packages(exclude=['tests','tests.*','scripts','extras','doc/examples']),
       scripts = [
                  'scripts/gw-join_parts.py',
                  'scripts/gw-merge_topologies.py',```
orbeckst commented 4 years ago

Hm, yes, that's not good.

I think we just need to move tests into gromacs – just the way that most sane Python packages do.

EDIT (2020-09-03) — Keeping tests separate was made intentionally in PR #165 so just reverting it will lead to other issues, due to the specific way in which we have to run some tests.

whitead commented 4 years ago

@orbeckst can we just remove the __init__.py files in tests instead so tests directory is not an installable python module?

orbeckst commented 4 years ago

Absolutely! It was probably as historical oversight from the early days when I really had no clue how to work with Python and tests!

On Sep 3, 2020, at 9:10 AM, Andrew White notifications@github.com wrote:

@orbeckst https://github.com/orbeckst can we just remove the init.py files in tests instead so tests directory is not an installable python module?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Becksteinlab/GromacsWrapper/issues/182#issuecomment-686597491, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB2DHCH5ILS4X7ZUXU4EUTSD65WVANCNFSM4NWKCSAQ.

-- Oliver Beckstein (he/him) orbeckst@gmail.com

orbeckst commented 4 years ago

Reading a bit more about where you're coming from with this question: Although I typically like it when one can run tests from an installed package, I don't think that in this case it's worth it. If the sanest course of action seems to be making it a CI/source only thing then I am ok with it.

We can still package it with the source tar ball, we just won't install it.

Does this sound reasonable?