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

docs: [FC-0074] add details for illustrating how filters work #231

Merged
merged 12 commits into from
Dec 10, 2024

Conversation

mariajgrimaldi
Copy link
Member

@mariajgrimaldi mariajgrimaldi commented Nov 18, 2024

Description

This PR:

  1. Attaches a diagram of how filters work to illustrate better the steps introduced in docs: [FC-0074] add more detailed docs on filters #222.
  2. Improves wording in how filters work sections.
  3. Include more examples to better illustrate behavior.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Nov 18, 2024
@openedx-webhooks
Copy link

openedx-webhooks commented Nov 18, 2024

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 approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If 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 @openedx/hooks-extension-framework. Tag them in a comment and let them know that your changes are ready for review.

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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@mariajgrimaldi mariajgrimaldi force-pushed the MJG/arch-diagram branch 2 times, most recently from 8a29483 to 65af164 Compare November 18, 2024 20:24
@mariajgrimaldi mariajgrimaldi marked this pull request as ready for review November 18, 2024 20:24
@mariajgrimaldi mariajgrimaldi requested a review from a team as a code owner November 18, 2024 20:24
@mariajgrimaldi mariajgrimaldi added the FC Relates to an Axim Funded Contribution project label Nov 18, 2024
@mariajgrimaldi mariajgrimaldi changed the title docs: add diagram for illustrating how filters work docs: [FC-0074] add diagram for illustrating how filters work Nov 18, 2024
@sarina
Copy link
Contributor

sarina commented Nov 19, 2024

I think the filter numbers on this diagram (function 0, function n-1) don't match the revised way we numbered the filter steps in another PR

@mariajgrimaldi
Copy link
Member Author

@sarina: I totally missed updating the diagram with the latest changes in #222. Thanks for pointing it out!

@mariajgrimaldi mariajgrimaldi marked this pull request as draft November 21, 2024 12:29
@mariajgrimaldi
Copy link
Member Author

mariajgrimaldi commented Nov 21, 2024

I'm sorry, this still needs work so I'm turning it into draft.

Good news! It didn't take me that long to make it re-ready.

@mariajgrimaldi mariajgrimaldi changed the title docs: [FC-0074] add diagram for illustrating how filters work docs: [FC-0074] add details for illustrating how filters work Nov 21, 2024
@mariajgrimaldi mariajgrimaldi marked this pull request as ready for review November 21, 2024 12:57
@mariajgrimaldi mariajgrimaldi requested review from Ian2012 and a team November 21, 2024 12:57

#. This method retrieves the configuration from ``OPEN_EDX_FILTERS_CONFIG``, which defines a list of N functions :math:`f_1, f_2, \ldots, f_{n}` that will be executed.

#. Then it executes each function in the pipeline sequentially, starting with :math:`f_1`, which processes the input arguments ``kwargs`` and applies the developer's operations, returning potentially modified arguments ``kwargs_1``.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the diagram I'm using kwargs because that's how filters are called, by using keyword arguments. Now, I'm not sure if using kwargs makes the explanation more cumbersome to read.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Python developers should understand kwargs, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, of course. I was referring to how good (fluent?) it read, but it should be fine.

@mariajgrimaldi mariajgrimaldi linked an issue Nov 22, 2024 that may be closed by this pull request
Copy link
Contributor

@sarina sarina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the diagram is a bit misleading, because step2 raises an exception but the diagram indicates that step N still runs. I think I would just omit the FilterException from the diagram (just have the line return kwargs_2) to be the happy path, and then step 8 in the workflow will explain how f_2 could return an exception.

@mariajgrimaldi
Copy link
Member Author

mariajgrimaldi commented Nov 26, 2024

@sarina: I'd prefer we represented both situations, though. I'm going to add both versions to see how well they read or if they're too much.

EDIT: I think your suggestion is more cleaner than mine, so I'll go with that.

Base automatically changed from MJG/improve-concepts-docs to main November 26, 2024 12:20
@sarina
Copy link
Contributor

sarina commented Nov 26, 2024

I think "raise" should be "return"

image

Copy link
Member

@felipemontoya felipemontoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The information in the change is correct. The graph look nice and it explains every step of the process. I think the language flows naturally and the result is easy to read. Overall great work.

@mariajgrimaldi mariajgrimaldi merged commit a791841 into main Dec 10, 2024
8 checks passed
@mariajgrimaldi mariajgrimaldi deleted the MJG/arch-diagram branch December 10, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FC Relates to an Axim Funded Contribution project open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

How Open edX filters work
5 participants