home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 1690019325

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
1690019325 PR_kwDOAMm_X85PddJ6 7799 Start making unit testing more general 6197628 closed 0     7 2023-04-30T18:04:52Z 2024-01-11T11:49:14Z 2024-01-11T11:49:14Z CONTRIBUTOR   0 pydata/xarray/pulls/7799

As part of https://github.com/pydata/xarray/issues/525, I would like to start running the same tests already implemented for pint on other unit libraries - the one I'm specifically interested in is astropy.

This PR is a proof of concept to start making the tests in test_units.py more general, so it's easy to implement tests against other unit libraries. Important bits of this PR:

  • The UnitInfo base class, which defines an interface against which additional unit libraries can be implemented.
  • Concrete implementations of this for pint and astropy (the astropy one is commented out for now)
  • Modifications that make test_apply_ufunc_dataarray run for both astropy and pint.
  • A few new tests for helper functions, that I needed to fix issues with astropy testing

Would be greatful for feedback - is this worthwhile? If so, I can roll this approach out to more tests in test_units.py (there's certainly a lot of them!), either in this PR or a subsequent one.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/7799/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 pull

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 6 rows from issue in issue_comments
Powered by Datasette · Queries took 0.722ms · About: xarray-datasette