Skip to content

Set up namespace #19

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

Merged
merged 2 commits into from
May 15, 2025
Merged

Set up namespace #19

merged 2 commits into from
May 15, 2025

Conversation

mwcraig
Copy link
Member

@mwcraig mwcraig commented May 15, 2025

This makes imports a little easier in downstream packages. As a bonus, it also fixes a type annotation error.

@mwcraig mwcraig requested a review from Copilot May 15, 2025 15:16
Copy link

@Copilot Copilot AI left a comment

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 simplifies module imports by centralizing exports in the package’s init.py file and fixes a type annotation error in the ImageViewer class.

  • Updated test files to import directly from the package namespace.
  • Removed several constants from interface_definition’s all.
  • Updated the type annotation for the _cuts attribute in dummy_viewer.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_dummy_viewer.py Changed imports to utilize the new namespace
tests/test_astro_image_display_api.py Updated import statement to reflect centralized export
src/astro_image_display_api/interface_definition.py Removed constants from all to streamline the public API
src/astro_image_display_api/dummy_viewer.py Fixed the type annotation error for the _cuts attribute
src/astro_image_display_api/init.py Added wildcard exports from sub-modules to set up the namespace
Comments suppressed due to low confidence (2)

src/astro_image_display_api/interface_definition.py:22

  • Removal of constants from all may break backward compatibility for consumers who import these values directly. Consider adding deprecation warnings or updating documentation to reflect their new location.
    'ALLOWED_CURSOR_LOCATIONS',

src/astro_image_display_api/dummy_viewer.py:36

  • The updated type annotation for _cuts now explicitly indicates a tuple containing two floats. Verify that this change aligns with expected usage and downstream type checks.
    _cuts: str | tuple[float, float] = (0, 1)

@mwcraig mwcraig merged commit af612d3 into astropy:main May 15, 2025
1 check passed
@mwcraig mwcraig deleted the set-up-namespace branch May 15, 2025 15:18
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.

1 participant