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

WIP: Add cloud testing + refactoring nominal x y replacement #35

Merged
merged 29 commits into from May 4, 2020

Conversation

jbusecke
Copy link
Owner

@jbusecke jbusecke commented Apr 5, 2020

Towards fixing #30 and #34

@codecov
Copy link

codecov bot commented Apr 5, 2020

Codecov Report

Merging #35 into master will increase coverage by 7.91%.
The diff coverage is 64.70%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #35      +/-   ##
==========================================
+ Coverage   33.81%   41.73%   +7.91%     
==========================================
  Files           5        5              
  Lines         343      357      +14     
==========================================
+ Hits          116      149      +33     
+ Misses        227      208      -19     
Impacted Files Coverage Δ
cmip6_preprocessing/preprocessing.py 77.85% <64.70%> (+16.37%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea89123...a8e0a84. Read the comment docs.

@jbusecke
Copy link
Owner Author

jbusecke commented Apr 7, 2020

@andersy005: This is the PR I was talking about earlier. It seems like the circleci is running but its so slow that it wont even finish a fraction of the test, so that is not feasible at the moment. Could you think of a way to speed the reading with intake-esm or get more bandwidth?

For travis it really seems like they dont allow access from within their testing env...see this cryptic error [here])(https://travis-ci.com/github/jbusecke/cmip6_preprocessing/jobs/314580159).
If you got any input how to speed this up, or who to contact with this, I would tremendously appreciate the help. I think this testing is awesome (even though its slow) to make sure that changes to cmip6_preprocessing are working on input in the cloud.

table_id="Omon",
grid_label=grid_label,
)
ddict = cat.to_dataset_dict(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try passing storage_options with token=anon to to_dataset_dict()

ddict = cat.to_dataset_dict(zarr_kwargs={"consolidated": True, "decode_times": False}, \
           preprocess=combined_preprocessing, storage_options={'token':'anon'})

@andersy005
Copy link

For travis it really seems like they dont allow access from within their testing env...see this cryptic error [here])(travis-ci.com/github/jbusecke/cmip6_preprocessing/jobs/314580159).

I found a similar issue here: googleapis/google-auth-library-python#287. It appears that at some point TravisCI locked access to APIs (including Google's authentication API). Unfortunately the linked issue does not provided any solution (the person who opened the issue ended up migrating to CircleCI).

Comment on lines 48 to 54
cat = col.search(
source_id=source_id,
experiment_id=experiment_id,
variable_id=variable_id,
table_id="Omon",
grid_label=grid_label,
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For testing purposes, do you need all member_ids?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats a good point. Ill try to restrict this.

@andersy005
Copy link

It appears that the upstream-dev is failing due to numpy build error. Do we need to test against the master branch of NumPy i.e. would it be okay to just test against the latest stable release of NumPy?

@andersy005
Copy link

andersy005 commented Apr 8, 2020

Glad to see Python 3.6 job running successfully.

Regarding Python 3.8 and Python 3.7 jobs, I recommend re-running the jobs with SSH and SSH-ing into the container and running one of the hanging tests:

pytest -v cmip6_preprocessing/tests/test_preprocessing_cloud.py::test_lat_lon[BCC-ESM1-thetao-historical-gn] 

@jbusecke
Copy link
Owner Author

@andersy005 , sorry for the delay on this. I am afraid I am not quite sure how to SSH into the container. Is there some documentation I could follow for this? Many thanks for your help.

@andersy005
Copy link

andersy005 commented Apr 28, 2020

Head over to one of the jobs' URL: https://app.circleci.com/pipelines/github/jbusecke/cmip6_preprocessing/26/workflows/1679fc07-8435-4abf-8537-025457a0a94d/jobs/91/steps

and click on dropdown Rerun button:

Screen Shot 2020-04-28 at 9 29 42 AM

I am afraid I am not quite sure how to SSH into the container. Is there some documentation I could follow for this?

Here' the detailed documentation page: https://circleci.com/docs/2.0/ssh-access-jobs/

@jbusecke
Copy link
Owner Author

Thank you so much! Ill try that out in a bit.

@jbusecke
Copy link
Owner Author

I think I will give up on making these tests work with CI for this PR. It is not essential for this change, and I would like to move ahead with some other changes. I will for now check these tests only locally. @rabernat mentioned pangeo-bot as a possible solution. I will investigate that possibility further and come back to it. I really appreciete the help on this @andersy005.

@andersy005
Copy link

@rabernat mentioned pangeo-bot as a possible solution. I will investigate that possibility further and come back to it.

👍 This sounds like a more robust solution.

I really appreciete the help on this @andersy005.

Anytime! Sorry this didn't work as we had expected.

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.

None yet

2 participants