Max Metz
|
7a97cd7d95
|
format of exceptions now always follows baseline format. 'errors'-key is always a list of dictionaries.
|
2024-09-10 13:50:13 +02:00 |
|
Max Metz
|
9127cdeac8
|
BSMD users are now allowed to POST times entry, if they are assigned to the ShipcallParticipantMap or the special BSMD-flag-clause takes place
|
2024-09-09 17:06:03 +02:00 |
|
Max Metz
|
d2cd233f13
|
creating default handlers for every kind of Exception in the /api/ routes. Those default functions also create automatic logging with the .warning level. Relocated the .impl-calls into the Try-Exception-blocks, so they are properly logged and avoid system failures.
|
2024-09-09 12:46:55 +02:00 |
|
Max Metz
|
85973ad848
|
creating a default error response format for each API route
|
2024-09-09 12:21:32 +02:00 |
|
Max Metz
|
61b00b8b22
|
auto-converting non-lists to list values.
|
2024-09-09 11:55:58 +02:00 |
|
Max Metz
|
ab7b1ed34f
|
every ValidationError is defined to return a dictionary. In case of validation errors without such a call, a function enforces a default with an undefined key to ensure the correct format.
|
2024-09-05 12:46:04 +02:00 |
|
Max Metz
|
c7371a945a
|
adapting traffic light validation 0002-C. This no longer requires ETA verification. Adapted the description when the error occurs and renamed the function.
|
2024-09-04 12:21:22 +02:00 |
|
Max Metz
|
e4d0ea2301
|
fixed serialization of marshmallow.ValidationErrors. This was caused by the 'valid_data' containing datetime objects, which were not serializable natively.
|
2024-09-04 12:11:32 +02:00 |
|
Max Metz
|
2f678267c8
|
time estimations are no longer dependency on times POST requests. This refers to eta_berth, etd_berth, operations_start, operations_end.
|
2024-09-04 11:41:03 +02:00 |
|
Max Metz
|
2c0a73113b
|
shipcall PUTs may no longer change the shipcall type
|
2024-09-04 11:17:32 +02:00 |
|
Max Metz
|
3d2405e8fb
|
maintenance of API Input Validation (ship & times)
|
2024-09-04 10:27:46 +02:00 |
|
Max Metz
|
1ff972883f
|
adding input validation for time intervals
|
2024-09-04 10:27:38 +02:00 |
|
Max Metz
|
4b5ff90b34
|
properly serializing ValidationError exceptions.
|
2024-09-04 08:30:46 +02:00 |
|
Max Metz
|
a51b830cf6
|
removed the 'canceled may not be set on post'-issue.
|
2024-08-28 13:06:36 +02:00 |
|
Max Metz
|
e1d9570268
|
solving the concatenation issue of a list and a None-type.
|
2024-08-27 20:52:10 +02:00 |
|
Max Metz
|
6eab98d2a1
|
correcting the issue with participant_id authorization (BSMD or AGENCY check).
|
2024-08-27 19:23:37 +02:00 |
|
Max Metz
|
fcc03b2ade
|
adaptation of traffic validation (resolving open issue)
|
2024-08-14 19:09:35 +02:00 |
|
Max Metz
|
22009eb469
|
resolving an issue where missing values for 'flags' in the Shipcall would cause rule-violations
|
2024-08-12 19:56:26 +02:00 |
|
Max Metz
|
e526337c6a
|
added a reference check to PUT-requests (shipcall), so each provided ID must exist. Corrected some input validation functions to solve known bugs
|
2024-08-12 19:43:19 +02:00 |
|
Max Metz
|
d54fed9160
|
corrected open issues of the API validation functions. Made some validation errors more verbose, improved robustness, refactored some of the methods and adapted many unit tests to the novel format.
|
2024-08-06 20:46:40 +02:00 |
|
Max Metz
|
3ce2fc829d
|
correcting a validation issue for 'voyage'
|
2024-08-01 18:34:56 +02:00 |
|
Max Metz
|
cd8c246d72
|
adapting times POST, PUT, DELETE to properly include the special case, where a BSMD user should also be allowed to handle times entries of an AGENCY, if the agency has the flag set.
|
2024-07-25 10:42:44 +02:00 |
|
|
|
83520a2bc7
|
Fixed small issues for ships endpoint validation
|
2024-07-25 10:42:44 +02:00 |
|
Max Metz
|
3d2e1f5158
|
Added input validation for API requests. Refactored some methods, added docstrings. Solved marshmallow-warnings in BreCal.schemas.model. Added unit tests, now totaling 215. Added proposals to refactor all SQL queries into an object at BreCal.database.sql_queries.SQLQuery for better standardization. Created a helper-object to handle Emails, which prepares the notification-feature.
|
2024-07-25 10:42:44 +02:00 |
|
|
|
8698d3a1f5
|
increased 1 hour comparison by 60 seconds to avoid seconds deviation
|
2024-05-05 11:18:35 +02:00 |
|
|
|
76bf4f01bd
|
Maximum threshold should still be allowed (e.g. 1 hour)
|
2024-05-05 11:17:36 +02:00 |
|
|
|
3b01dbb7aa
|
set schedule logging to INFO and using correct query for schedule test calls
|
2024-05-02 09:44:00 +02:00 |
|
Max Metz
|
7f50624d23
|
adapting validation rules for version 1.2. Rules 0002: the time-difference threshold for 'disagreement' is expanded to 1 hour. There is now element-wise comparison of elements to circumvent instabilities from rounding pd.Timestamp objects. Rules 0001 L&M and 0003: created a feature flag, which skips the evaluation of Terminal times altogether. For version 1.2, this feature flag is enabled.
|
2024-04-29 12:59:14 +02:00 |
|
|
|
aba1d9d00b
|
Changed validation rule 002 A-C so that the agency time is set as reference time allowing 15 minute deviation
|
2024-01-13 19:02:43 +01:00 |
|
|
|
d8fabe0f97
|
Fixed time comparison validation func. Now compares min/max value of array.
|
2024-01-13 19:01:56 +01:00 |
|
|
|
b4764e29b6
|
disable port authority validation logic
|
2023-12-24 11:20:43 +01:00 |
|
scopesorting
|
191aff720b
|
Implemented the feature to ignore port administration. However, the flag is currently disabled.
|
2023-12-19 09:51:29 +01:00 |
|
scopesorting
|
e7b7d7e18f
|
correcting 0004A & 0004B
|
2023-12-19 09:51:29 +01:00 |
|
scopesorting
|
ca8a7ab291
|
updating rule 0004A&0004B by using a rounding method for time differences.
|
2023-12-19 09:51:29 +01:00 |
|
scopesorting
|
a29b3ead0e
|
bugfix of 0004A and B, where the tide window may have deviated by few seconds, so the wrong state would be concluded.
|
2023-12-19 09:51:29 +01:00 |
|
scopesorting
|
dfdd4da1d8
|
correcting minor typos in the documentation and verbosity
|
2023-12-15 16:40:51 +01:00 |
|
scopesorting
|
2f67e58ace
|
created a feature flag, which disables the PORT_ADMINISTRATION validation rules. Currently, the flag is 'hardcoded' once in the library. Adapting the test to properly facilitate the feature flag
cherry picking all open adjustments to the develop branch.
|
2023-12-15 16:40:51 +01:00 |
|
scopesorting
|
ad7637368b
|
removing unused if-statements
|
2023-12-15 16:40:51 +01:00 |
|
scopesorting
|
836c1aa802
|
fixing the 'KeyError' when using an empty times dataframe. Returning 'green'
|
2023-12-15 16:40:51 +01:00 |
|
scopesorting
|
6ce6e882e9
|
more concise evaluation messages for 0001. Adding newlines (works on Windows) when multiple evaluation messages are shown. Properly adding the ShipcallType filters for each rule (whether incoming, outgoing or shifting). Added a regular expression to abbreviate an evaluation message when 512 characters are exceeded.
fixing a version conflict for validation rule functions.
|
2023-12-15 16:40:51 +01:00 |
|
scopesorting
|
d004e77650
|
created a feature flag, which disables the PORT_ADMINISTRATION validation rules. Currently, the flag is 'hardcoded' once in the library. Adapting the test to properly facilitate the feature flag
cherry picking the feature flag of 'port administration' rules
|
2023-12-15 16:40:51 +01:00 |
|
scopesorting
|
ad593ff2a2
|
more concise evaluation messages for 0001. Adding newlines (works on Windows) when multiple evaluation messages are shown. Properly adding the ShipcallType filters for each rule (whether incoming, outgoing or shifting). Added a regular expression to abbreviate an evaluation message when 512 characters are exceeded.
|
2023-12-01 09:44:22 +02:00 |
|
scopesorting
|
fce8ce0c68
|
changing the ParticipantType to an IntFlag, so multiple roles are possible. Adapting every validation rule (0001, 0003, 0004, 0005), which may be affected by this change. Changing the filter for a participant type to properly include the change. Changing the pier_side rule (0006B), which uses the shipcall and times_terminal. New shipcalls should now be evaluated properly, unless no participant is assigned at all. If the ladder case can occur, the validation rules 0001N+0001O will be added (held back for now).
|
2023-12-01 09:44:09 +02:00 |
|
scopesorting
|
6f9b4a6b5a
|
removing verbosity in validation rule functions, and returning 'None', when a selected times dataframe is empty. In case of empty results, the function now properly computes the delta towards a query time and returns YELLOW, when a violation is observed. This should finally fix the bugs for 0001 A-M
|
2023-12-01 09:43:49 +02:00 |
|
scopesorting
|
9a12d74e77
|
updating validation rules 0001 A-M. Instead of filtering by times_df (which may not exist), the rules make use of the shipcall_participant_map. When one of the participants in a rule is not assigned, no violation is observed. When there are multiple entries of a participant (due to an input bug), the function still verifies properly. When critical time is observed, and there is not yet an entry for the respective key time, there will be a 'yellow' state.
|
2023-12-01 09:43:31 +02:00 |
|
scopesorting
|
9f61e2af38
|
updating check_time_delta_violation_query_time_to_now: no longer ignoring events of the past (delta<=0)
|
2023-12-01 09:43:17 +02:00 |
|
scopesorting
|
4859ff6803
|
ensuring that len(df_times) always works. Preventing 'None' from occuring
|
2023-12-01 09:42:48 +02:00 |
|
scopesorting
|
834da84786
|
minot adjustments & refactoring
|
2023-11-28 16:49:16 +02:00 |
|
scopesorting
|
8027620f22
|
fixing the 'KeyError' when using an empty times dataframe. Returning 'green'
|
2023-11-28 16:48:53 +02:00 |
|
scopesorting
|
3cc1591aba
|
potentially correcting 0006A/0006B
|
2023-11-21 11:41:56 +01:00 |
|