Commit Graph

105 Commits

Author SHA1 Message Date
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
24757c1702 Version bump 1.0.0 -> 1.1.0 2023-12-17 11:12:52 +01:00
scopesorting
99c798bfe0 changing 'exit' with sys.exit to avoid 'NameError' for the exit call 2023-12-15 16:40:51 +01:00
scopesorting
31a5034e17 Solving: RemovedInMarshmallow4Warning: Passing field metadata as keyword arguments is deprecated. Use the explicit argument instead. Additional metadata: {'Required': False} 2023-12-15 16:40:51 +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
08ab984096 updating the sql handler's method of filtering for the filled-in header 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
c36e913472 added trace output and fixed a bug when saving shipcalls without times 2023-11-28 16:48:16 +02:00
721baa3a06 moved schedule import after venv sitepackage path set 2023-11-22 10:48:27 +01:00
scopesorting
fd0efe0046 adding schedule routine jobs, which will be executed in a background thread within WSGI while running the Flask application. 2023-11-21 12:47:04 +01:00
scopesorting
9346920a97 potentially solving the 'shipcall_id' error log 2023-11-21 11:51:49 +01:00
scopesorting
3cc1591aba potentially correcting 0006A/0006B 2023-11-21 11:41:56 +01:00
scopesorting
a5220fd6f2 refactoring: simplification of error messages. These now stem from a string, which is the function name. Previously, the inspect module was used with a rather complex function call to obtain the method's name. The simplification makes code more readable for future work. 2023-11-20 16:43:27 +01:00
scopesorting
49bbb77624 refactoring a few methods 2023-11-20 16:35:31 +01:00
scopesorting
40dc022b25 fixing np to_list error, which may have caused the evaluation function to stop altogether. 2023-11-20 16:22:58 +01:00
scopesorting
21e9c75781 typo. 2023-11-14 12:07:59 +01:00
scopesorting
c6d1bf30a6 adapting rules 0001-L & 0001-M (times terminal) and 0006-B. However, for 0006-B the provided solution is not verified, as the errors could not be reproduced locally. 2023-11-14 12:06:39 +01:00
fd5bd76db2
Merge pull request #15 from puls200/feature/hotfix_20231110
Feature/hotfix 20231110
2023-11-10 18:07:12 +01:00
scopesorting
e9aace6268 creating stub objects for every single validation function. Unit tests are created for each function to check whether they return 'GREEN' whenever no violation is expected, or 'YELLOW'/'RED' when a rule violation is artificially forced. The test framework now successfully runs 116 unit tests. Adapted some validation functions, applied refactoring and solved potential obstacles along the way. At least from the perspective of unit tests, every function now works as expected. 2023-11-10 17:59:08 +01:00
scopesorting
b2cde8b6f5 correcting the open issues from 09.11.2023 (0001 A-M was previously commited, 0006A+B are corrected herein) 2023-11-10 17:50:01 +01:00
9d61b95378 Version bump to 0.9.6 2023-11-10 14:36:25 +01:00
scopesorting
2374cf4ff0
Feature/removing pandas warning (#14)
* removing the Pandas 'sqlalchemy' warning by refactoring

* removing the Pandas 'sqlalchemy' warning by refactoring.

* reformatting
2023-11-07 07:08:52 +01:00
scopesorting
8606e1fdb6 removing the Pandas 'sqlalchemy' warning by refactoring
removing the Pandas 'sqlalchemy' warning by refactoring.

reformatting
2023-11-04 10:26:43 +01:00
ead190d219
Merge pull request #11 from puls200/feature/hotfix_20231031_traffic_lights
Validation rule bug fixes as noted in test version 0.9.4
2023-11-01 16:07:38 +01:00
scopesorting
8e2e676cb0 hotfixing open errors, as defined by Daniel Schick and Christin Hollman (26.10. and 27.10.). Adding descriptions for the error codes instead of using 'cryptic' function names. This should make the application much more readable. 2023-10-31 18:15:59 +01:00
1695ca101e Set development / feature branch to 'devel' settings, added scripts to move to test and to production. Added script to increase version, store version and to update the respective files 2023-10-29 17:56:06 +01:00
b254759562 fixed mixup in enum ids outgoing/shifting for shipcall queries 2023-10-28 12:43:36 +02:00
c8e634156b Allow changes of users phone and email contact info by the user 2023-10-26 16:29:17 +02:00
3e63b9ce46 added missing paranthesis 2023-10-26 16:21:26 +02:00
cc284b2612 fixed search query 2023-10-26 16:11:34 +02:00
13c5866884 Fixed eta / etd search error and evaluate searchFromEta as filter used against the back-end to retrieve shipcalls from the past 2023-10-26 15:00:15 +02:00
scopesorting
d1f4703102 updating rules 0002 A-C (check_participants_agree_on_estimated_time) and 0004 B (typo in function) 2023-10-25 14:20:24 +02:00
scopesorting
e4cb2eb639 correcting an import error for 'evaluate_shipcall_state', updating misc/Deployment to describe the creation of a virtual environment, Python installation and running tests (pytest and pytest-coverage). 2023-10-19 13:26:19 +02:00
scopesorting
25db0cf44f Adding validation rules (traffic light status) to the system. Post & Put calls of shipcalls and times now execute the traffic light evaluation and store the result in the connected MySQL database instance. The 'brecal_utils' library is merged with 'BreCal', including the stub objects and test functions. Requirements were adapted, and installation of a virtual environment works from scratch (on a linux system). 2023-10-17 09:09:35 +02:00
3044ca2621 add missing include 2023-10-16 18:47:22 +02:00
26b71052ae add missing key 2023-10-16 18:43:48 +02:00
2857c8693a fixes 2023-10-16 17:46:30 +02:00