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

Fine-grained reproduce flags and testing #204

Merged
merged 43 commits into from
Oct 17, 2019
Merged

Fine-grained reproduce flags and testing #204

merged 43 commits into from
Oct 17, 2019

Conversation

aidanheerdegen
Copy link
Collaborator

Added test model for ... testing. Has minimal requirements and means
tests can be independent of model driver implementation. A platonic
ideal if you will.

Added config options for fine-grained reproduce options. Input, exe
and restart reproduce can be turned on independently of each other.

Added extensive testing of init/setup and reproduce.

Fixes #203

tests can be independent of model driver implementation. A platonic
ideal if you will.

Added config options for fine-grained reproduce options. Input, exe
and restart reproduce can be turned on independently of each other.

Added extensive testing of init/setup and reproduce.
@pep8speaks
Copy link

pep8speaks commented Oct 11, 2019

Hello @aidanheerdegen! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2019-10-17 00:32:10 UTC

@aidanheerdegen
Copy link
Collaborator Author

@marshallward I've moved the pbs environment init function to cli.pyso that it is only called if a job is submitted. In this way PBS isn't required on travis unless a PBS job is submitted.

(The PBS install stuff seems to be broken BTW. It couldn't find /etc/pbs.conf as the install script errors)

@marshallward
Copy link
Collaborator

marshallward commented Oct 11, 2019

I think a lot of that was cut-and-paste from the bundled Python bootstrap script. Not sure why it isn't working, might need looking into.

Is there not some way to retain 2.7 and 3.5 testing? I don't know if removing versions is the right path foward here.

@marshallward
Copy link
Collaborator

Are you dropping 2.7 to use exist_ok in os.makedirs? Can not some of this be resolved using mkdir_p in the fs module?

@aidanheerdegen
Copy link
Collaborator Author

Sorry, I thought we'd decided to drop 2.7 support, as people could always use an older version?

All the tests I just wrote are not python2 compatible as they use pathlib to make writing the tests less painful. I also dropped 3.5 as I believe there are a few pathlib compatibilities that only work from 3.6, but it isn't a deal breaker. I did mean to add 3.7 so it didn't look quite so bad!

@marshallward
Copy link
Collaborator

Ah yeah, ok, it's just the test itself. pathlib does seem pretty fantastic, as does the exist_ok argument in os.makedirs.

All good, just wondering how things might work if I ever try porting payu to Gaea.

@aidanheerdegen
Copy link
Collaborator Author

Could have version dependent tests where the 2.7 test just does payu list like the conda test

https://github.com/payu-org/payu/blob/master/conda/meta.yaml#L34

to make sure there are no breaking changes to payu itself.

Do you only have access to python2.7 on gaea? Eeeuuuwww.

@aidanheerdegen
Copy link
Collaborator Author

So now the tests will do payu list and pylint -E for all python versions. The latter should pick up anything not python27 compliant.

Additionally for python3.x interpreters pytest test/test_manifest.py is run. This is just testing init, setup and sweep for a test model.

@aidanheerdegen aidanheerdegen merged commit 89375e9 into master Oct 17, 2019
@aidanheerdegen aidanheerdegen deleted the issue_202 branch October 17, 2019 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fine grained control over reproduce
3 participants