Releases: TechlauncherFireApp/backend
Releases · TechlauncherFireApp/backend
fireapp-3.119.0-alpha.7763
v3.119.0-alpha.7763 Use correct multiline syntax (#303)
fireapp-3.119.0-alpha.7554
v3.119.0-alpha.7554 Fix docker workflow (#302)
fireapp-3.119.0-alpha.7348
Fishchimp/feature/optimiser v2 2 (#300) ## Describe your changes Refactor and Enhancement of the Optimiser Class for Shift and Volunteer Assignment This PR focuses on improving the Optimiser class's overall code readability, functionality, and alignment with the new requirements for volunteer shift management. Major changes include the replacement of vehicle-based requirements with role-based requirements, the addition of logging for better debugging, and the introduction of new constraints for skill and compatibility handling in the optimisation model. **Key Changes:** 1. **Logging Integration:** - Added logging functionality to track errors and provide insights during the optimisation process. - Enhanced the debugging output for clearer visibility of the optimiser's internal state. 2. **Role-Based Optimisation:** - Transitioned from the asset/vehicle-based logic in the old implementation to a role-based structure in the new version. - Replaced `AssetRequestVolunteer` and `AssetRequestVehicle` logic with `ShiftRequestVolunteer` to align with shift management requirements. 3. **MiniZinc Model Refactor:** - Introduced a new MiniZinc model that simplifies the assignment of volunteers to shifts and roles. - The compatibility, mastery, and skill requirements are now handled with flattened 1D matrices to optimise the data passing to the solver. - Constraints added to ensure that volunteers are only assigned to roles they are compatible with and have mastered. 4. **Constraints and Objective:** - The new model includes constraints for skill requirements, ensuring the required number of roles is filled. - The objective is now focused on maximising the number of valid role assignments while respecting constraints. 5. **Improved Database Handling:** - Enhanced `save_result` function to store possible volunteer assignments with a `PENDING` status in the `ShiftRequestVolunteer` table. - Added exception handling and rollback mechanisms for better reliability in database transactions. 6. **Flattened Matrices:** - Helper methods were introduced (`flatten_compatibility`, `flatten_skill_requirements`) to flatten 2D matrices into 1D arrays for passing into the MiniZinc model. 7. **Miscellaneous:** - Removed unnecessary vehicle and position requirements that were irrelevant to the current optimisation scenario. - Refactored the entire `solve()` method for clarity and performance. **Testing:** - The MiniZinc model string was tested by running it in the MiniZincIDE with hardcoded inputs to validate the optimisation logic and constraints. Further testing for data persistence is required, particularly for interactions with the database. Since I am not yet familiar with this process, I need some guidance on setting up and using a database mockup. ## Issue ticket number and link ### Related Issue Tickets - [FIR-4: Scheduler Create Shifts](https://fireapp-emergiq-2024.atlassian.net/browse/FIR-4) - [FIR-111: Optimiser outputs optimal volunteers](https://fireapp-emergiq-2024.atlassian.net/browse/FIR-111)
fireapp-3.119.0-alpha.7150
5oappy/feature/calculator v2 (#294) ## Describe your changes big one: removed vehicles and its ties to shifts, that will be handled separately via a flag in `shift_request` table. added `shift_position` which acts as a replacement for vehicles and essentially creates position slots for each shift of which volunteers can be assigned to, not very resource efficient I'm aware but it seemed the most object oriented way of doing it. work flow cant be thought of as: 1) "scheduler-user" creates a `shift_request` entry `shift_request` entry contains key information about the shift etc but specifically the `vehicle_id` flag which ... 2) triggers a function that adds the specific assignment and amount of `roles` required for the shift to the `shift_position` table linked back to the shift. The amount of positions and their roles types depends on the `vehicle_id` flag. (note this is not implemented in this pr but will be created soon [FIR-112](https://fireapp-emergiq-2024.atlassian.net/browse/FIR-112) ) 3) Then, the scheduler (`optimiser`) is called and it obtains all the info from the relevant tables: `shift_request, shift_position, roles` and extrapolates data into values that mini zinc can use. 4) mini zinc returns a 2d array of best volunteers for each shift as well as persisting them to the database table `shift_request_volunteer`. ( [FIR-111](https://fireapp-emergiq-2024.atlassian.net/browse/FIR-111) ) Other misc changes included: - Adding unavailability parameter to `user` table. - Changing the link to roles be through role.code instead of Id as it makes more canonical sense. BIG RISK as it might mess with mini zinc , `user_roles` and how we parse the roles types however it can simply be reworked. added unique flag to the code to ensure only one of each role type is ever created. - Commenting out the deprecated code of the original calculator. Ideally I should have set this up in a separate file (I still can, id just have to copy all local changes into a new branch in a separate file) I just happened to do it in the file as it was easiest to see which stuff impacted which directly. more details of the table linking logic at commit b099dacd3ddb4248ada633a35195f8559e540713 note theres is a conflict in this pr in the domain/entity/__init__.py just of notification stuff will be handled when prompted by GitHub. ## Issue ticket number and link [FIR-4](https://fireapp-emergiq-2024.atlassian.net/browse/FIR-4) [FIR-51](https://fireapp-emergiq-2024.atlassian.net/browse/FIR-51) note: its a tiny bit of a mess as I wasn't signed in and it wouldn't let me pr but I didn't realise so I went through a whole mess of rebasing origin/main into my branch before realising
fireapp-3.119.0-alpha.6968
v3.119.0-alpha.6968 Trigger build workflow in merge queue
fireapp-3.119.0-alpha.6798
v3.119.0-alpha.6798 Update pipeline to inject credentials (#293)
fireapp-3.119.0-alpha.6629
v3.119.0-alpha.6629 First pass at consolidating workflows (#292)
fireapp-3.119.0-alpha.6462
Chim/feature/setup notification repository (#284) ## Describe your changes Add fcm token repository and Api endpoint for register and unregister fcm token. Add a new domain FCMToken for representing fcm token. ## Issue ticket number and link - [Jira](https://fireapp-emergiq-2024.atlassian.net/jira/software/projects/FIR/boards/2?selectedIssue=FIR-99) - [Documentation](https://fireapp-emergiq-2024.atlassian.net/wiki/spaces/fireapp202/pages/99713028/Notification+Feature)
fireapp-3.119.0-alpha.6308
Bump filelock from 3.14.0 to 3.16.0 (#280) Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.14.0 to 3.16.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tox-dev/py-filelock/releases">filelock's releases</a>.</em></p> <blockquote> <h2>3.16.0</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <ul> <li>Test Python 3.13 by <a href="https://github.com/hugovk"><code>@hugovk</code></a> in <a href="https://redirect.github.com/tox-dev/filelock/pull/352">tox-dev/filelock#352</a></li> <li>Add 3.13 to CI by <a href="https://github.com/gaborbernat"><code>@gaborbernat</code></a> in <a href="https://redirect.github.com/tox-dev/filelock/pull/359">tox-dev/filelock#359</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/tox-dev/filelock/compare/3.15.4...3.16.0">https://github.com/tox-dev/filelock/compare/3.15.4...3.16.0</a></p> <h2>3.15.4</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <ul> <li>Pass <code>file_lock</code> as positional argument by <a href="https://github.com/kwist-sgr"><code>@kwist-sgr</code></a> in <a href="https://redirect.github.com/tox-dev/filelock/pull/347">tox-dev/filelock#347</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/tox-dev/filelock/compare/3.15.3...3.15.4">https://github.com/tox-dev/filelock/compare/3.15.3...3.15.4</a></p> <h2>3.15.3</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <ul> <li>Add test for virtualenv stability by <a href="https://github.com/gaborbernat"><code>@gaborbernat</code></a> in <a href="https://redirect.github.com/tox-dev/filelock/pull/344">tox-dev/filelock#344</a></li> <li>Fix <code>TypeError: _CountedFileLock.__init__() got an unexpected keyword argument 'timeout'</code> by <a href="https://github.com/kwist-sgr"><code>@kwist-sgr</code></a> in <a href="https://redirect.github.com/tox-dev/filelock/pull/345">tox-dev/filelock#345</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/tox-dev/filelock/compare/3.15.2...3.15.3">https://github.com/tox-dev/filelock/compare/3.15.2...3.15.3</a></p> <h2>3.15.2</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <ul> <li>Use a metaclass to implement the singleton pattern by <a href="https://github.com/kwist-sgr"><code>@kwist-sgr</code></a> in <a href="https://redirect.github.com/tox-dev/filelock/pull/340">tox-dev/filelock#340</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/kwist-sgr"><code>@kwist-sgr</code></a> made their first contribution in <a href="https://redirect.github.com/tox-dev/filelock/pull/340">tox-dev/filelock#340</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/tox-dev/filelock/compare/3.15.1...3.15.2">https://github.com/tox-dev/filelock/compare/3.15.1...3.15.2</a></p> <h2>3.15.1</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <ul> <li>Hotfix: Restore <strong>init</strong> method; more robust initialization for singleton locks by <a href="https://github.com/ethanbb"><code>@ethanbb</code></a> in <a href="https://redirect.github.com/tox-dev/filelock/pull/338">tox-dev/filelock#338</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/tox-dev/filelock/compare/3.15.0...3.15.1">https://github.com/tox-dev/filelock/compare/3.15.0...3.15.1</a></p> <h2>3.15.0</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tox-dev/filelock/commit/0acea4f63dc11522441b89a6a699253818c0269d"><code>0acea4f</code></a> Add 3.13 to CI (<a href="https://redirect.github.com/tox-dev/py-filelock/issues/359">#359</a>)</li> <li><a href="https://github.com/tox-dev/filelock/commit/4dc2a8f5f3678f8b0fc9939b9fc09e1ca733e382"><code>4dc2a8f</code></a> Bump pypa/gh-action-pypi-publish from 1.9.0 to 1.10.1 (<a href="https://redirect.github.com/tox-dev/py-filelock/issues/356">#356</a>)</li> <li><a href="https://github.com/tox-dev/filelock/commit/7397dd7a17678354b3a732faec98d1b50c71c0be"><code>7397dd7</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/tox-dev/py-filelock/issues/354">#354</a>)</li> <li><a href="https://github.com/tox-dev/filelock/commit/067b65169525f3358808b8dad0afd728c7750ea8"><code>067b651</code></a> Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows (<a href="https://redirect.github.com/tox-dev/py-filelock/issues/357">#357</a>)</li> <li><a href="https://github.com/tox-dev/filelock/commit/85760d7531cfaa6fe9382d950aadf2ebd21364a0"><code>85760d7</code></a> Test Python 3.13 (<a href="https://redirect.github.com/tox-dev/py-filelock/issues/352">#352</a>)</li> <li><a href="https://github.com/tox-dev/filelock/commit/4104f3e0e6e809d3ce7ca3105cbb0f5599d45ddb"><code>4104f3e</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/tox-dev/py-filelock/issues/348">#348</a>)</li> <li><a href="https://github.com/tox-dev/filelock/commit/9a979dfe68fab75517c0612952ea401a232055a0"><code>9a979df</code></a> Pass file_lock as positional argument (<a href="https://redirect.github.com/tox-dev/py-filelock/issues/347">#347</a>)</li> <li><a href="https://github.com/tox-dev/filelock/commit/3a79343711eef57b864670dc2cafd352ed749d9b"><code>3a79343</code></a> Fix `TypeError: _CountedFileLock.<strong>init</strong>() got an unexpected keyword argumen...</li> <li><a href="https://github.com/tox-dev/filelock/commit/81d4cf9e9ea98cefdf9f380b024d627dffb28efb"><code>81d4cf9</code></a> Add test for virtualenv stability (<a href="https://redirect.github.com/tox-dev/py-filelock/issues/344">#344</a>)</li> <li><a href="https://github.com/tox-dev/filelock/commit/192f1efcb95924010d785c3f726433273f6ed114"><code>192f1ef</code></a> Use a metaclass to implement the singleton pattern (<a href="https://redirect.github.com/tox-dev/py-filelock/issues/340">#340</a>)</li> <li>Additional commits viewable in <a href="https://github.com/tox-dev/py-filelock/compare/3.14.0...3.16.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
fireapp-3.119.0-alpha.6155
Bump virtualenv from 20.26.3 to 20.26.4 (#281) Bumps [virtualenv](https://github.com/pypa/virtualenv) from 20.26.3 to 20.26.4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pypa/virtualenv/releases">virtualenv's releases</a>.</em></p> <blockquote> <h2>20.26.4</h2> <!-- raw HTML omitted --> <h2>What's Changed</h2> <ul> <li>release 20.26.3 by <a href="https://github.com/gaborbernat"><code>@gaborbernat</code></a> in <a href="https://redirect.github.com/pypa/virtualenv/pull/2742">pypa/virtualenv#2742</a></li> <li>Fix whitespace around backticks in changelog by <a href="https://github.com/edmorley"><code>@edmorley</code></a> in <a href="https://redirect.github.com/pypa/virtualenv/pull/2751">pypa/virtualenv#2751</a></li> <li>Test latest Python 3.13 by <a href="https://github.com/hugovk"><code>@hugovk</code></a> in <a href="https://redirect.github.com/pypa/virtualenv/pull/2752">pypa/virtualenv#2752</a></li> <li>Fix typo in Nushell activation script by <a href="https://github.com/edmorley"><code>@edmorley</code></a> in <a href="https://redirect.github.com/pypa/virtualenv/pull/2754">pypa/virtualenv#2754</a></li> <li>GitHub Actions: Replace deprecated macos-12 with macos-13 by <a href="https://github.com/hugovk"><code>@hugovk</code></a> in <a href="https://redirect.github.com/pypa/virtualenv/pull/2756">pypa/virtualenv#2756</a></li> <li>Fix <a href="https://redirect.github.com/pypa/virtualenv/issues/2728">#2728</a>: Activating venv create unwanted console output by <a href="https://github.com/ShootGan"><code>@ShootGan</code></a> in <a href="https://redirect.github.com/pypa/virtualenv/pull/2748">pypa/virtualenv#2748</a></li> <li>Upgrade bundled wheels by <a href="https://github.com/gaborbernat"><code>@gaborbernat</code></a> in <a href="https://redirect.github.com/pypa/virtualenv/pull/2760">pypa/virtualenv#2760</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/ShootGan"><code>@ShootGan</code></a> made their first contribution in <a href="https://redirect.github.com/pypa/virtualenv/pull/2748">pypa/virtualenv#2748</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/pypa/virtualenv/compare/20.26.3...20.26.4">https://github.com/pypa/virtualenv/compare/20.26.3...20.26.4</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst">virtualenv's changelog</a>.</em></p> <blockquote> <h2>v20.26.4 (2024-09-07)</h2> <p>Bugfixes - 20.26.4</p> <pre><code>- no longer create `()` output in console during activation of a virtualenv by .bat file. (:issue:`2728`) - Upgrade embedded wheels: <ul> <li>wheel to <code>0.44.0</code> from <code>0.43.0</code></li> <li>pip to <code>24.2</code> from <code>24.1</code></li> <li>setuptools to <code>74.1.2</code> from <code>70.1.0</code> (:issue:<code>2760</code>) </code></pre></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pypa/virtualenv/commit/dc9416acbb822a797e2b6b12efd5072160899540"><code>dc9416a</code></a> release 20.26.4</li> <li><a href="https://github.com/pypa/virtualenv/commit/d8f1b147f2fed19cffa53ac91ec1d5bd468c5bdb"><code>d8f1b14</code></a> Upgrade bundled wheels (<a href="https://redirect.github.com/pypa/virtualenv/issues/2760">#2760</a>)</li> <li><a href="https://github.com/pypa/virtualenv/commit/374660b653c71a2ff81b4e7cbf3d938ac95f1f07"><code>374660b</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/pypa/virtualenv/issues/2753">#2753</a>)</li> <li><a href="https://github.com/pypa/virtualenv/commit/61e774fcd38cde063c4804c020d77267c3e8e11e"><code>61e774f</code></a> Fix <a href="https://redirect.github.com/pypa/virtualenv/issues/2728">#2728</a>: Activating venv create unwanted console output (<a href="https://redirect.github.com/pypa/virtualenv/issues/2748">#2748</a>)</li> <li><a href="https://github.com/pypa/virtualenv/commit/38e02c8447421dd881cf55a00516ab9dcd82f695"><code>38e02c8</code></a> Bump pypa/gh-action-pypi-publish from 1.9.0 to 1.10.1 (<a href="https://redirect.github.com/pypa/virtualenv/issues/2757">#2757</a>)</li> <li><a href="https://github.com/pypa/virtualenv/commit/77df0a0b0c54972ea4f41642771de2b6d1815dce"><code>77df0a0</code></a> GitHub Actions: Replace deprecated macos-12 with macos-13 (<a href="https://redirect.github.com/pypa/virtualenv/issues/2756">#2756</a>)</li> <li><a href="https://github.com/pypa/virtualenv/commit/265011a187100fec999420cd9ddcda75d35bfbff"><code>265011a</code></a> Fix typo in Nushell activation script (<a href="https://redirect.github.com/pypa/virtualenv/issues/2754">#2754</a>)</li> <li><a href="https://github.com/pypa/virtualenv/commit/95c5eed96c225faff01ac2f108368e0c4303989b"><code>95c5eed</code></a> Test latest Python 3.13 (<a href="https://redirect.github.com/pypa/virtualenv/issues/2752">#2752</a>)</li> <li><a href="https://github.com/pypa/virtualenv/commit/805365be6d73cc9e18ffda62092938c6f6ea0387"><code>805365b</code></a> Fix whitespace around backticks in changelog (<a href="https://redirect.github.com/pypa/virtualenv/issues/2751">#2751</a>)</li> <li><a href="https://github.com/pypa/virtualenv/commit/b6c052bdac73138251dc46abda6154f3a0bf8a14"><code>b6c052b</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/pypa/virtualenv/issues/2743">#2743</a>)</li> <li>Additional commits viewable in <a href="https://github.com/pypa/virtualenv/compare/20.26.3...20.26.4">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>