Repository navigation
feat: export enrollments, learner administration and grading constants from authz - #615
Conversation
…s from authz Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks for the pull request, @BryanttV! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
rodmgwgu
left a comment
There was a problem hiding this comment.
This looks good, however I have a question:
My impression of the applets idea is that going forward, users of these constants should explicitly import from the applets, so it's clear what belongs where and it's easier to refactor in the future when those applets are exported out of authz.
This meant that keeping these constants under authz was a retrocompatibility meassure, not a practice to keep going forward.
Now, it does feel cleaner to still keep this exports in sync.
I don't have a strong opinion on that, but wanted to raise this discussion.
What do you think?
|
Thanks for raising this, @rodmgwgu. I checked what the repo says today, and it isn't consistent:
So I don't think we can say yet that What do you think? FYI @mariajgrimaldi |
Thanks for clarifying this, in that case, I'm ok with these changes. Thanks! |
|
Adding to Bryann's comment, the ADR 0032 addendum replaces the import paths described earlier in the ADR (line 25 included), so openedx_authz.authz is the public API for the constants and openedx_authz.constants.* is the compatibility layer. The applets stay internal on purpose, since importing from them directly would tie clients to the internal layout and break those imports when an applet moves out of openedx-authz. +1 to keeping the exports in sync and updating the three READMEs here, thanks! |
Update the READMEs of the enrollments, learner_administration and learner_grading applets to state that clients import their constants from openedx_authz.authz, with openedx_authz.constants.permissions kept as a compatibility export. This matches the content_libraries, course_authoring and course_team_roles applets and the ADR 0032 addendum.
Description
Re-exports the constants of the
enrollments,learner_administration, andlearner_gradingapplets fromopenedx_authz.authz, alongside the applets already exported there (content libraries, course authoring, and course team roles).After #550 moved the built-in definitions into applets, these three applets were missing from the public
openedx_authz.authznamespace and__all__. This makes every applet's constants importable from a single place.Changes
src/openedx_authz/authz/__init__.py: import and add to__all__the constants ofenrollments,learner_administrationandlearner_grading.Testing instructions
Merge checklist
Check off if complete or not applicable: