Skip to content

Add Astropy units support - #50

Merged
dprada merged 2 commits into
mainfrom
codex/add-astropy-module-support-with-tests-pakbvk
Sep 26, 2025
Merged

Add Astropy units support#50
dprada merged 2 commits into
mainfrom
codex/add-astropy-module-support-with-tests-pakbvk

Conversation

@dprada

@dprada dprada commented Sep 26, 2025

Copy link
Copy Markdown
Collaborator

Summary

  • add an astropy.units form implementation with conversions, dimensionality, and parser support
  • register the Astropy form across configuration, parser dispatch, and string translation helpers
  • cover the new form with Astropy-focused tests and update configuration expectations

Testing

  • pytest

https://chatgpt.com/codex/tasks/task_e_68d5c8acfc4c8326b42a74f902bee1d0

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive support for Astropy units to the pyunitwizard library, extending the existing multi-library unit handling system to include astropy.units alongside pint, openmm.unit, and unyt.

  • Implements complete API layer for astropy.units with conversion, dimensionality, and parser support
  • Registers astropy.units across all configuration, parsing, and translation systems
  • Adds comprehensive test coverage for astropy.units functionality

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pyunitwizard/forms/api_astropy_unit.py New complete API implementation for astropy.units with all required functionality
pyunitwizard/configure/configure.py Adds astropy.units to supported libraries and module mapping
pyunitwizard/forms/init.py Registers astropy.units in the forms API modules dictionary
pyunitwizard/init.py Auto-loads astropy.units library when available
pyunitwizard/parse.py Adds astropy.units parser support and fixes exception naming
pyunitwizard/main.py Updates docstrings to include astropy.units in supported parsers/forms
pyunitwizard/_private/parsers.py Adds astropy.units to parsers list
pyunitwizard/_private/forms.py Adds astropy.units to forms list
pyunitwizard/forms/api_pint.py Adds conversion functions from pint to astropy.units
pyunitwizard/forms/api_openmm_unit.py Adds conversion functions from openmm.unit to astropy.units
pyunitwizard/forms/api_unyt.py Adds conversion functions from unyt to astropy.units
pyunitwizard/forms/api_string.py Adds string parsing to astropy.units
tests/astropy_units/test_astropy_units.py Comprehensive test suite for astropy.units functionality
tests/test_configure.py Updates configuration tests to handle astropy.units

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread pyunitwizard/forms/api_astropy_unit.py Outdated
Comment thread pyunitwizard/forms/api_astropy_unit.py
@codecov

codecov Bot commented Sep 26, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 12.14286% with 123 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.57%. Comparing base (1bb3006) to head (6ba257a).
⚠️ Report is 10 commits behind head on main.
✅ All tests successful. No failed tests found.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dprada
dprada merged commit 8f57a8f into main Sep 26, 2025
7 checks passed
@dprada
dprada deleted the codex/add-astropy-module-support-with-tests-pakbvk branch September 26, 2025 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants