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

Use typing.Literal for boundary mode, padding mode, and orthogonalization mode #77

Merged
merged 23 commits into from
Jan 26, 2024

Conversation

cthoyt
Copy link
Collaborator

@cthoyt cthoyt commented Jan 25, 2024

This PR does the following:

  1. Creates a Literal type annotation for ptwt boundary modes
  2. Uses this literal for type annotations. This has the benefit that it makes the type checker much smarter and also auto-generates docs
  3. Re-write the docs for mode in many places to point to a centralized place where we can expand on padding.
  4. Sets a lot of these parameters to be keyword-only. This will make code much more understandable in the future, and also allows for easier development/debugging

Did the same thing for convolutional boundaries as well as orthogonalization method.

src/ptwt/conv_transform.py Outdated Show resolved Hide resolved
@cthoyt cthoyt marked this pull request as ready for review January 25, 2024 16:45
@cthoyt cthoyt requested a review from v0lta January 25, 2024 16:58
@cthoyt
Copy link
Collaborator Author

cthoyt commented Jan 26, 2024

@v0lta this is blocked by @v0lta since I want to isolate the formatting updates from the new black style

@cthoyt cthoyt changed the title Use typing.Literal for boundary mode Use typing.Literal for boundary mode, padding mode, and orthogonalization mode Jan 26, 2024
@cthoyt cthoyt merged commit f390042 into main Jan 26, 2024
7 checks passed
@cthoyt cthoyt deleted the boundary-typing branch January 26, 2024 17:37
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.

None yet

1 participant