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

Event enum #8573

Merged
merged 17 commits into from
Nov 29, 2024
Merged

Event enum #8573

merged 17 commits into from
Nov 29, 2024

Conversation

SchrodingersGat
Copy link
Member

@SchrodingersGat SchrodingersGat commented Nov 27, 2024

Enumerate available "events" as Enum values, rather than raw strings:

  • Ensure that the values can be accurately registered
  • Ability to introspect on available event names
  • Automatically document available events
  • Ensure plugins keep up to date with event names

TODO

  • Update documentation
  • Add unit testing (ensure correct events are triggered)
  • Work with python 3.9

@SchrodingersGat SchrodingersGat added enhancement This is an suggested enhancement or new feature plugin Plugin ecosystem documentation refactor labels Nov 27, 2024
@SchrodingersGat SchrodingersGat added this to the 0.17.0 milestone Nov 27, 2024
Copy link

netlify bot commented Nov 27, 2024

Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit dcc0e72
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/6749092c82188500087d27db

Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 88.59060% with 17 lines in your changes missing coverage. Please review.

Project coverage is 84.55%. Comparing base (db128f9) to head (dcc0e72).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
src/backend/InvenTree/order/models.py 60.00% 6 Missing ⚠️
src/backend/InvenTree/plugin/base/event/events.py 60.00% 4 Missing ⚠️
src/backend/InvenTree/InvenTree/unit_test.py 92.59% 2 Missing ⚠️
src/backend/InvenTree/part/events.py 0.00% 2 Missing ⚠️
src/backend/InvenTree/plugin/registry.py 50.00% 2 Missing ⚠️
src/backend/InvenTree/build/models.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8573      +/-   ##
==========================================
- Coverage   84.57%   84.55%   -0.02%     
==========================================
  Files        1183     1185       +2     
  Lines       54100    54183      +83     
  Branches     2044     2026      -18     
==========================================
+ Hits        45756    45816      +60     
- Misses       7835     7861      +26     
+ Partials      509      506       -3     
Flag Coverage Δ
backend 86.06% <88.59%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/backend/InvenTree/build/test_build.py Outdated Show resolved Hide resolved
src/backend/InvenTree/build/test_build.py Outdated Show resolved Hide resolved
src/backend/InvenTree/part/events.py Show resolved Hide resolved
src/backend/InvenTree/stock/models.py Outdated Show resolved Hide resolved
src/backend/InvenTree/users/authentication.py Outdated Show resolved Hide resolved
@SchrodingersGat SchrodingersGat merged commit dd9a6a8 into inventree:master Nov 29, 2024
26 checks passed
@SchrodingersGat SchrodingersGat deleted the event-enum branch November 29, 2024 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation enhancement This is an suggested enhancement or new feature plugin Plugin ecosystem refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants