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

DM-47972: Support entry points for loading external metadata translators #80

Merged
merged 13 commits into from
Jan 13, 2025

Conversation

timj
Copy link
Member

@timj timj commented Jan 3, 2025

No description provided.

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 42.22222% with 26 lines in your changes missing coverage. Please review.

Project coverage is 87.32%. Comparing base (1e2c377) to head (ec985f2).
Report is 14 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...hon/astro_metadata_translator/cli/astrometadata.py 36.36% 17 Missing and 4 partials ⚠️
python/astro_metadata_translator/translator.py 50.00% 2 Missing and 1 partial ⚠️
python/astro_metadata_translator/bin/translate.py 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #80      +/-   ##
==========================================
- Coverage   87.97%   87.32%   -0.66%     
==========================================
  Files          37       37              
  Lines        3144     3187      +43     
  Branches      414      423       +9     
==========================================
+ Hits         2766     2783      +17     
- Misses        260      280      +20     
- Partials      118      124       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

entry_points API is different in 3.9.
@timj timj force-pushed the tickets/DM-47972 branch from a07513a to c36343d Compare January 6, 2025 23:23
timj added 2 commits January 6, 2025 16:36
Anything registered with the group astro_metadata_translators
will be available.
@timj timj force-pushed the tickets/DM-47972 branch from c36343d to 9882c5f Compare January 6, 2025 23:40
@timj timj requested a review from JeremyMcCormick January 9, 2025 17:41
@JeremyMcCormick JeremyMcCormick requested review from JeremyMcCormick and removed request for JeremyMcCormick January 9, 2025 19:14
doc/index.rst Outdated Show resolved Hide resolved
Copy link

@JeremyMcCormick JeremyMcCormick left a comment

Choose a reason for hiding this comment

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

This looks good and makes the changes outlined here.

I verified using lsstsw tools that astrometadata --list-plugins shows the list of available translator plugins, and an update was also made by @timj to list the built-in translators as well.

I would suggest adding better test coverage for the plugin functionality in the future, possibly using a dummy/mock internal package. Or a CI repo could be created and depend on astro_metadata_translator plus several of the other repositories that implement plugins.

@timj timj force-pushed the tickets/DM-47972 branch from 12a4b5e to ec985f2 Compare January 13, 2025 20:14
@timj timj merged commit 46c833a into main Jan 13, 2025
15 of 17 checks passed
@timj timj deleted the tickets/DM-47972 branch January 13, 2025 21:03
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.

2 participants