Closed aidanheerdegen closed 5 years ago
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! :beers:
@marshallward I've moved the pbs environment init function to cli.py
so 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)
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.
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?
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!
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.
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.
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.
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 https://github.com/payu-org/payu/issues/203