-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feat: Multi-Technology Campaign Events #1040
base: main
Are you sure you want to change the base?
Conversation
This commit simplifies and optimizes the querying logic in campaign.py. The main changes involve minimizing the number of separate queries within loops and instead using single queries with the "__in" lookup. This is more performant and reduces database load. The code is also slightly more readable with this structure.
…ultiple-tech-to-events
Updated the .gitignore file to ignore JetBrains IDE files .idea/. In the store/campaign.py, refactored add_campaign_technology_event method to handle multiple campaign technologies instead of a single one. Modified error messages and variable names to reflect changes.
This commit involves refactoring of the implementation of add_campaign_technology_event method in the campaign.py file. The multiple campaign ids handling has been removed and replaced with handling for a single campaign id. This promises for a more direct, and less error-prone system.
The commit introduces iterative processing for assigning multiple technologies to a campaign. Instead of dealing with a single technology at a time, the updated method accepts and processes a list of technologies, allowing numerous assignments in one operation, and subsequently returns a list of successful assignments. This offers a more efficient way to handle campaign technologies.
…ultiple-tech-to-events
Updated the validation rules in the "campaign" API handler to require "campaign_technology_ids" and "event_ids". Removed a redundant comment in the "campaign" data store file. The changes aim to improve data integrity and code readability.
The payload in the test "test_add_campaign_technology_event" in "test_campaigns.py" has been updated. The "campaign_technology_id" attribute has been renamed to "campaign_technology_ids" and now accepts a list of ids instead of a single id.
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1040 +/- ##
=======================================
Coverage 53.02% 53.02%
=======================================
Files 419 419
Lines 31087 31089 +2
=======================================
+ Hits 16483 16485 +2
Misses 14604 14604 ☔ View full report in Codecov by Sentry. |
@abdullai-t any update on this draft PR? |
Summary / Highlights
This pull request introduces a feature that allows campaign events to be associated with multiple technologies.
Details (Give details about what this PR accomplishes, include any screenshots etc)
Testing Steps (Provide details on how your changes can be tested)
Requirements (place an
x
in each[ ]
)Transparency (Project board)