Iris: Don't ship the tests with iris

Created on 24 Sep 2019  路  5Comments  路  Source: SciTools/iris

Lift and shift the iris.tests out and up to the root directory (same level as setup.py) to avoid installing the tests with iris.

Also collapse the lib directory, it's not necessary.

Decision Required Infrastructure

Most helpful comment

I'm :+1: on this in principle, but we should take the opportunity improve the "how to" descriptions for new developers : At present the "Developer's Guide" assumes a distressing level of proficiency, E.G. it lays out how to write tests + where to put them without ever explaining "how to run the tests".
Possibly, "setup.py tests" still works, or not, but that was never well signposted, or even clearly documented in the setup.py command-line help.

All 5 comments

Removing the tests will mean it is not possible to run the tests on an installed version. That may or may not be OK, I'm not sure. It is worth considering this use case at least.

Hey @ajdawson! Great to hear from you :smile:

I definitely think it's worthwhile considering. Just though I'd have the debate here...

My line of thought was that if iris has been installed as a package then it's most likely a pucker packaged release, and it should just work. In that sense, I really wouldn't expect someone to run all the tests, as they'd also need to set-up the test data etc. I'm more inclined to think that a _developer_ would run the tests, and they wouldn't do that from an installation, rather they'd pip install -e . (or similar) a development (or master) branch into an installation that they own i.e., miniconda - in which case they'd have access to the tests.

Hmmm I dunno...

What I do know is that currently there is ~9.5MB of code sitting under iris.tests :worried:

My line of thought was that if iris has been installed as a package then it's most likely a pucker packaged release, and it should just work.

I can buy that line of thought. I guess packaging the tests used to make a lot of sense before conda and wheels were prevalent and we used to have to install from source ourselves. I will not object to proceeding with this work.

I'm :+1: on this in principle, but we should take the opportunity improve the "how to" descriptions for new developers : At present the "Developer's Guide" assumes a distressing level of proficiency, E.G. it lays out how to write tests + where to put them without ever explaining "how to run the tests".
Possibly, "setup.py tests" still works, or not, but that was never well signposted, or even clearly documented in the setup.py command-line help.

Possibly, "setup.py tests" still works

It ran last time I tried, though I had failures in places I hadn't touched. I also got failures because iris.std_names.py didn't get regenerated. It hadn't so far occurred to me to try other ways of running the tests. So, as well as new developers, I'd benefit from an update to these docs.

Was this page helpful?
0 / 5 - 0 ratings