Skip to content

Export names from the top level of xmlmap (#17)#18

Merged
blms merged 4 commits intomainfrom
chore/17-revert-xmlmap
May 1, 2025
Merged

Export names from the top level of xmlmap (#17)#18
blms merged 4 commits intomainfrom
chore/17-revert-xmlmap

Conversation

@blms
Copy link
Copy Markdown
Contributor

@blms blms commented Apr 30, 2025

Associated Issue(s): #17

Changes in this PR

  • Export names from the top level of the xmlmap module instead of requiring references to submodules, in a way that Ruff accepts
  • Revert internal usage and documentation to xmlmap.XYZ style
  • Remove import migration script and update MIGRATION.rst

@blms blms requested a review from rlskoeser April 30, 2025 19:57
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.21%. Comparing base (a6401bf) to head (8550716).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #18      +/-   ##
==========================================
- Coverage   85.50%   85.21%   -0.29%     
==========================================
  Files          15       15              
  Lines        2215     2165      -50     
==========================================
- Hits         1894     1845      -49     
+ Misses        321      320       -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@rlskoeser rlskoeser left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this! Sorry for the extra work, but glad for the solution we arrived at.

Comment thread neuxml/xmlmap/__init__.py
load_xmlobject_from_file as load_xmlobject_from_file,
load_xslt as load_xslt,
)
from neuxml.xmlmap.fields import (
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.

ruff requires this syntax? import thing as thing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, otherwise it complains about it being an unused import (F401). It offers this solution as help text during pre-commit:

help: Use an explicit re-export: `XmlObject as XmlObject`

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.

Could we use the __all__ syntax instead? Sorry for the change, but that feels more readable / slightly less redundant to me.

https://docs.astral.sh/ruff/rules/unused-import/#why-is-this-bad

@blms blms requested a review from rlskoeser May 1, 2025 14:59
Copy link
Copy Markdown
Contributor

@rlskoeser rlskoeser left a comment

Choose a reason for hiding this comment

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

thank you!

@blms blms merged commit 2784104 into main May 1, 2025
10 checks passed
@blms blms deleted the chore/17-revert-xmlmap branch May 1, 2025 15:20
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