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

Trade 187 #93

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Trade 187 #93

wants to merge 7 commits into from

Conversation

danielfromearth
Copy link

@danielfromearth danielfromearth commented Aug 30, 2024

Description

Adds a regression test notebook for the SAMBAH service chain.

Jira Issue ID

Local Test Steps

PR Acceptance Checklist

  • Acceptance criteria met
  • Tests added/updated (if needed) and passing
  • Documentation updated (if needed)

@danielfromearth
Copy link
Author

pre-commit.ci autofix

Copy link
Member

@owenlittlejohns owenlittlejohns left a comment

Choose a reason for hiding this comment

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

The notebook mostly looks great! I had a couple of comments about test data mainly and reuse of common functionality (I think that was added after you initially opened this PR).

The other thing that this PR would need is the plumbing to hook this up. There are a couple of places that would need updating:

"req_infos = {\n",
" 'UAT': {\n",
" # TEMPO NO2 tropospheric, stratospheric, and total columns V03\n",
" 'collection': Collection(id='C1262899916-LARC_CLOUD'),\n",
Copy link
Member

Choose a reason for hiding this comment

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

I tried running this notebook and it couldn't find this collection. Maybe it's behind an ACL?

"\n",
"compare_results_to_reference_file(temp_var_bbox_filename)\n",
"compare_results_to_reference_file(temp_var_bbox_filename, 'product')\n",
"# compare_results_to_reference_file(temp_var_bbox_filename, 'geolocation')\n",
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Could this commented out line be removed?

"), 'Unsuccessful SAMBAH temporal, variable, bounding box request.'\n",
"\n",
"\n",
"compare_results_to_reference_file(temp_var_bbox_filename)\n",
Copy link
Member

Choose a reason for hiding this comment

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

Could this be simplified by using datatree? (Albeit from the old location prior to the next xarray release)

Copy link
Member

Choose a reason for hiding this comment

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

@flamingbear did some fancy stuff a little while back to place a bunch of common utility functions in a shared_utils directory. Maybe some there's overlap here and this file could be simplified?

}
},
"outputs": [],
"source": [
Copy link
Member

Choose a reason for hiding this comment

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

A lot of the other test suites wrap their test cells with an if condition to guard against when there aren't test collections/granules defined for an environment (mainly production).

" 'https://harmony.earthdata.nasa.gov': Environment.PROD,\n",
"}\n",
"\n",
"data_environment = 'PROD' if harmony_host_url == '' else 'UAT'\n",
Copy link
Member

Choose a reason for hiding this comment

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

From this the notebook is going to always use the UAT test data values because of this condition, but that feels a bit wonky. That means that a run in production will trigger errors because it will be trying to find UAT data. Is this because there aren't equivalent production data available, yet?

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.

4 participants