-
Notifications
You must be signed in to change notification settings - Fork 11
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
Refactor to authoring package #184
Conversation
Okay, that makes sense. I'm always a little hesitant to add more nesting; can you say more about the rationale for having apps/authoring/ instead of apps/components, apps/content/, and apps/publishing/ at the same level as future packages like apps/grading/? Assuming that we are going forward with apps/authoring/, though, I like that you're consolidating the Python APIs so that most consumers won't need to think about the layers:
Will we remove or rename the underlying ./apps/authoring/SUBPACKAGE/api.py modules, so that we don't have consumers importing from a mix of apps/authoring/api.py and the subpackage api.pys? |
Sure. I figure we're going to add at least a few more apps under the authoring umbrella, like In any case, I think that at that point, we have at least a few broad packages:
I think that two layers of hierarchy gives us a decent tradeoff in terms of making apps that are small enough to work on and understand, while still being able to present clients with a small number of API modules based on logical groupings of functionality.
I think I'd like to use both, but for slightly different things. I'm honestly not sure how this will really pan out, but I thought we might have app api.py guidelines like the following:
So the |
@kdmccormick: In Slack, you mentioned:
That got me thinking. In this PR, I'm currently aggregating the various API modules into The more I think about it, the more I like this sort of top-level separation of the public part of the API that openedx_learning exposes, instead of mixing them into the hierarchies with apps. |
My only question so far is pretty minor: Is the Your proposal:
vs
|
@bradenmacdonald: Fair point, esp. since I want to also kill the Still, even if there are only a few things in it, I like having that layer of But at the end of the day, I think I just like the uniformity where |
da9a357
to
ca18bec
Compare
check_call([apidoc_path, '-o', docs_path, os.path.join(root_path, 'openedx_learning'), | ||
os.path.join(root_path, 'openedx_learning/migrations')]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disabled auto-generation of all API docs here. There's only a manual generation of docs for public APIs and models, via the /docs/public_apis
dir. The generated docs are usable but not pretty (a lot of formatting issues). But I figure those could be for later.
bd05d7d
to
8092015
Compare
@kdmccormick, @bradenmacdonald: This PR should be in a reviewable state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! 🚀
tox.ini
Outdated
@@ -58,7 +58,7 @@ allowlist_externals = | |||
deps = | |||
-r{toxinidir}/requirements/doc.txt | |||
commands = | |||
doc8 --ignore-path docs/_build README.rst docs | |||
# doc8 --ignore-path docs/_build README.rst docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accidental?
# doc8 --ignore-path docs/_build README.rst docs | |
doc8 --ignore-path docs/_build README.rst docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right. I couldn't build the docs with that in there because we aren't building docs properly in CI and there were syntax linting issues in some of the ADRs. I meant to fix that in a separate commit after everything else was passing. I'll do that now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, this is fixed up. There's definitely more docs cleanup that needs to be done later as a followup.
All the Django apps that were in openedx_learning.core were specific to authoring library and course content: publishing, contents, components. As time goes on, we will likely add other groupings of apps, e.g. "learner", "personalization", "grading", etc. Important compatibility notes: 1. This is a breaking change, and edx-platform will need to be updated to point to the new locations for apps. 2. This should not affect the table names or migrations, since all app names remain the same, and we use the explicit repo-level "oel_" prefix anyway. This commit also removes the rest_api app. This app was never really functional, and was just put in as a skeleton to demonstrate a possible approach to adding a REST API to the openedx_learning package as a distinct app (as opposed to making a separate API per app). That being said, there's no current use case to expose a REST API from any of the authoring apps, and it's not clear whether we'd really want a top level rest_api app or separate rest_api apps for different groups of apps (e.g. "the REST API for authoring"). To avoid confusion, I'm just removing it altogether.
8092015
to
2bb8c2f
Compare
I'm holding off of merging this until openedx/edx-platform#34796 lands, since that is intended for backport into Redwood, and these changes are incompatible with the edx-platform code cut in Redwood. |
All the Django apps that were in openedx_learning.core were specific to authoring library and course content: publishing, contents, components. As time goes on, we will likely add other groupings of apps, e.g. "learner", "personalization", "grading", etc.
Important compatibility notes: