Skip to content

Update endorsements.py #96

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Update endorsements.py #96

wants to merge 1 commit into from

Conversation

54J4N
Copy link

@54J4N 54J4N commented Jan 27, 2025

Changes:

  • Added memoization to improve performance and reduce unnecessary database queries.
  • Refactored endorsement compression logic to use wildcard categories (*.*) where applicable.
  • Improved the auto-endorsement evaluation process by adding checks for email whitelist, blacklist, and paper count.
  • Enhanced handling of invalidated endorsements to follow the legacy system's rules more accurately.
  • Updated the code to be more modular and easier to maintain.

Why:

  • These changes were made to optimize performance, enhance code readability, and ensure compliance with endorsement policies.
  • The new compression method allows for more concise representation of endorsements, reducing the need for redundant data.
  • The improved handling of auto-endorsements and invalidated endorsements ensures the system's behavior remains consistent with the legacy system.

Additional Notes:

  • The docstring has been updated to reflect the changes in functionality and provide more clarity about the module's behavior.

### Changes:
- Added memoization to improve performance and reduce unnecessary database queries.
- Refactored endorsement compression logic to use wildcard categories (`*.*`) where applicable.
- Improved the auto-endorsement evaluation process by adding checks for email whitelist, blacklist, and paper count.
- Enhanced handling of invalidated endorsements to follow the legacy system's rules more accurately.
- Updated the code to be more modular and easier to maintain.

### Why:
- These changes were made to optimize performance, enhance code readability, and ensure compliance with endorsement policies.
- The new compression method allows for more concise representation of endorsements, reducing the need for redundant data.
- The improved handling of auto-endorsements and invalidated endorsements ensures the system's behavior remains consistent with the legacy system.

### Additional Notes:
- The docstring has been updated to reflect the changes in functionality and provide more clarity about the module's behavior.
@jweiskoff jweiskoff requested a review from bdc34 January 27, 2025 23:03
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.

1 participant