-
Notifications
You must be signed in to change notification settings - Fork 17
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
docs: [FC-0074] add more detailed docs on filters #222
Conversation
Thanks for the pull request, @mariajgrimaldi! What's next?Please work through the following steps to get your changes 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. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by Where 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. |
14ddd14
to
044bd0e
Compare
@sarina @Apgomeznext: here's the WIP I've been working on for the 1.1 Improve Definitions and Update Outdated References in the Framework project feature. I discussed with AnaP having feedback loops within the maintenance team about the documents' content. She'd get involved to review the document structure once she has the capacity for the project. So, early feedback is welcome. |
@mariajgrimaldi thanks for sharing. I did a quick skim, it looks like it's off to a good start. Regarding duplicating documentation, I would strongly recommend against this. I would make a centralized document, and link to that as needed. |
Thank you, @sarina. I agree we should solve this duplication of documents, so I moved some of these documents to a subsection of Concepts and Guides in the docs.openedx.org docs: openedx/edx-platform#35733. That PR references documents from each event and filters repos. My only concern is that leaving the docs there suggests the framework is edx-platform scoped when it's not. Would a single repo for the shared definitions of the framework be possible? |
7e4c1e6
to
930f5e2
Compare
@mariajgrimaldi why not put the shared docs in https://github.com/openedx/docs.openedx.org ? |
@sarina -- I thought about adding it here. It would have been something like OEP-50 Overview. We wouldn't have the misconception that the framework is edx-platform scoped, but it felt randomly placed. So now that you mentioned it, I tried digging more into the docs sections and found this: https://docs.openedx.org/en/latest/developers/references/developer_guide/extending_platform/index.html. However, the extensions listed there are more content-focused, not like those listed here: https://docs.openedx.org/projects/edx-platform/en/latest/concepts/extension_points.html, where folder where I'm currently adding the documents. This is entirely out of this project's scope, but should we move those extension points to docs.openedx.org? For the time being, I'll move the hooks docs from edx-platform to the Extending the Open edX Platform section. |
@mariajgrimaldi the Developers Guide on the docs site isn't in Diataxis format, so I wouldn't add more to it. I think adding a Concept doc makes sense. You could link to the Concept doc in the Developer's Guide as well, but I think it'll be more visible/easier to find as a Concept guide. |
930f5e2
to
03e10af
Compare
@sarina: I'll be following your suggestions from openedx/openedx-events#406 here as well! Thank you :) |
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 good!
docs/concepts/openedx-filters.rst
Outdated
|
||
#. The tooling then executes each function in the pipeline sequentially, starting with :math:`f_0`, which processes the input arguments ``args`` and applies the developer's operations, returning potentially modified arguments. | ||
|
||
#. The next function :math:`f_0` receives the potentially modified arguments and applies further operations, returning another modified set of arguments. This process continues through the list of functions. |
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.
#. The next function :math:`f_0` receives the potentially modified arguments and applies further operations, returning another modified set of arguments. This process continues through the list of functions. | |
#. The next function (if there are more than one) :math:`f_1` receives the potentially modified arguments and applies further operations, returning another modified set of arguments. This process continues through the list of functions. |
I think this is what you mean?
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.
Yes! Thank you :)
docs/concepts/openedx-filters.rst
Outdated
|
||
#. The next function :math:`f_0` receives the potentially modified arguments and applies further operations, returning another modified set of arguments. This process continues through the list of functions. | ||
|
||
#. Each subsequent function :math:`f_{i+1}` receives the output from the previous function and returns its modified output until all functions have been executed. |
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.
#. Each subsequent function :math:`f_{i+1}` receives the output from the previous function and returns its modified output until all functions have been executed. | |
#. Each subsequent function :math:`f_{n+1}` receives the output from the previous function and returns its modified output until all functions have been executed. |
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 think using f_{i+1}
it'd be even more confusing, so I removed it completely.
docs/concepts/openedx-filters.rst
Outdated
|
||
#. The ``run_filter`` method calls the pipeline tooling under the hood, which manages the execution of the filter's pipeline. | ||
|
||
#. The filter's tooling retrieves the configuration from ``OPEN_EDX_FILTERS_CONFIG``, which defines a list of N functions :math:`f_0, f_1, \ldots, f_{n-1}` that will be executed. |
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.
#. The filter's tooling retrieves the configuration from ``OPEN_EDX_FILTERS_CONFIG``, which defines a list of N functions :math:`f_0, f_1, \ldots, f_{n-1}` that will be executed. | |
#. The filter's tooling retrieves the configuration from ``OPEN_EDX_FILTERS_CONFIG``, which defines a list of N functions :math:`f_0, f_1, \ldots, f_{n}` that will be executed. |
I think I might just use n
because n-1
I would assume there's a final n
step
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, good suggestion. So we'll start counting from 1 instead, then, if that's more straightforward.
docs/concepts/openedx-filters.rst
Outdated
How are Open edX Filters used? | ||
------------------------------ | ||
|
||
Developers can implement functions in an `Open edX Django plugin`_, configure them for a particular filter in the ``OPEN_EDX_FILTERS_CONFIG`` setting, modifying the application flow when a the filter in question is invoked by the process in execution. These functions can the application's behavior by altering data, adding new data, or stopping execution by raising exceptions. For example, a filter can stop a student's enrollment if certain conditions, such as business rules, are not met. |
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.
Developers can implement functions in an `Open edX Django plugin`_, configure them for a particular filter in the ``OPEN_EDX_FILTERS_CONFIG`` setting, modifying the application flow when a the filter in question is invoked by the process in execution. These functions can the application's behavior by altering data, adding new data, or stopping execution by raising exceptions. For example, a filter can stop a student's enrollment if certain conditions, such as business rules, are not met. | |
Developers can implement functions in an `Open edX Django plugin`_, configure them for a particular filter in the ``OPEN_EDX_FILTERS_CONFIG`` setting, and modify the application flow when a the filter in question is invoked by the process in execution. These functions can the application's behavior by altering data, adding new data, or stopping execution by raising exceptions. For example, a filter can stop a student's enrollment if certain conditions, such as business rules, are not met. |
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.
Thanks!
b10058d
to
64f6c5c
Compare
Hey, @openedx/hooks-extension-framework, can some of you help me review this PR from a technical perspective so we can ensure we didn't miss anything? Thank you! |
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.
LGTM
Description
This PR improves the concept section of the documentation by adding a new document dedicated only to Open edX Filters.
Initially, I also added two additional modifications:
Which I later dropped in favor of centralizing shared documentation docs.openedx.org and avoiding duplication across repos: So I'll be moving those docs to docs.openedx.org, Here's the PR for the implementation: openedx/docs.openedx.org#599
For more details on the decision, please see this thread.