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
6cfd311bbb
Version bump to 1.6
2024-09-04 08:09:13 +02:00
ed7c4fbfbb
Created test version including version bump to 1.5.0
2024-08-30 11:27:10 +02:00
Max Metz
2ac2bc196c
potentially resolving the 'Unknown column ... in 'field list' issue
2024-08-28 18:44:45 +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
1be7d68f5c
participant flag also resolved
2024-08-27 21:16:49 +02:00
Max Metz
cc2a54c1c6
added extensive logging for an open, unresolved issue. The issue-log may make clear, where the issue originates
2024-08-27 21:14:30 +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
8082100b7e
using the @classmethod _missing_ function in an IntFlag creates an incorrect resolution of intflags. 127 was resolved as 0 due to the _missing_ function. Without that method, 127 becomes a proper multi-flag
2024-08-27 20:33:33 +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
c4e5764601
/ships GET no longer blocks deleted ships from being returned.
2024-08-14 15:53:37 +02:00
Max Metz
b60874cbb0
shipcall, ship, times and user verify the validity of JSON data when receiving POST/PUT requests.
2024-08-14 15:49:28 +02:00
Max Metz
e488501837
debugging the missing column '.PORT_ADMINISTRATION' issue
2024-08-14 14:58:03 +02:00
Max Metz
4f3686e00f
marshmallow.fields incorrectly resolved the 'required' field. Adapted each field to ensure that missing data properly raises an error.
2024-08-14 13:59:26 +02:00
Max Metz
0e8faf499d
GET ships no longer returns deleted ships
2024-08-12 20:35:37 +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
5769889fea
resolving the validation issue in shipcalls, which was caused by a faulty fields type in the ShipcallSchema.
2024-07-31 14:59:59 +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
d7de35236c
Version bump to 1.4
2024-07-22 10:40:08 +02:00
1bb4cc5225
Increased version to 1.3
2024-05-06 13:45:05 +02:00
8698d3a1f5
increased 1 hour comparison by 60 seconds to avoid seconds deviation
2024-05-05 11:18:35 +02:00
f07cadef80
fixed another SQL typo
2024-05-05 11:18:13 +02:00
f7604b055e
fixed schedule sql
2024-05-05 11:17:58 +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
105718e2a6
fixing: generator didn't stop after throw()
2024-04-29 16:51:41 +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
15eb7615a6
Bugfix for creating new shipcalls
2024-04-13 16:00:42 +02:00
921062e38b
fix for ship logical delete server-side
2024-04-13 15:59:51 +02:00
08dd104284
fixed POST when a null evaluation enum is sent
2024-04-08 14:00:49 +02:00
40fd77bf6c
fixed serialization in case of null values read
2024-04-08 14:00:31 +02:00
4106b9a0ef
For intervals there are now 2 fields in the times object: eta_interval_end and etd_interval_end
2024-04-03 10:39:32 +02:00
d42b3753e7
split up ata_atd in two separate fields ata and atd
2024-03-31 21:58:56 +02:00
11f72b370d
fixed a bug where shipcall id was not set on times delete
2024-03-30 21:41:03 +01:00
ac2ad3bc18
fixed bug for POST new shipcalls
2024-03-30 19:48:53 +01:00
a845135650
Bugfix for saving shipcall values
2024-03-28 09:46:23 +01:00
fb3413cac0
Version bump to 1.2.0.0
2024-03-28 08:06:49 +01:00
a5b16154c6
Fixed saving of shipcall by correctly interpreting enums now
...
The trick was to use a helper-field and a (decorated) @post_load method in the model that allows to fill the helper
fields with the values (ints) instead of strings for enums.
Trouble is: We are parsing strings from API/JSON and want to serialize as int (value in IntEnum). The helper
fields also must be skipped when setting up the query. Pretty convoluted, but gets the jon done (finally).
Also extended the database by new field 'interval_end' which is a preparation to allow not only timestamps but also
intervals when specifying times for participants.
2024-03-27 19:20:54 +01:00
f311d75c73
added ata_atd and time_point_ref fields to database, yaml and python access layer
2024-03-27 10:52:12 +01:00
862ef9fe88
Merge branch 'feature/api_enhancements' into develop
2024-03-27 10:08:48 +01:00
63b815c274
fixed enum serialization by using custom optional to_json() method
2024-02-27 07:31:04 +01:00
e88f3fa1de
synched enum fields to lower case like yaml
2024-02-26 07:23:09 +01:00
06e9c9b8ae
log incoming message
2024-02-24 10:05:43 +01:00
b47c261487
added existence check to dictionary key usage
2024-02-14 16:55:21 +01:00
e8f6a17e7f
change parameter order
2024-02-14 16:42:55 +01:00
c6bbbf94e3
do not use execute_scalar
2024-02-14 16:24:06 +01:00
77722703ac
added trace output
2024-02-14 16:12:07 +01:00
fc1b55c7b9
added remaining fields to user query
2024-02-14 15:51:12 +01:00
8a6ded2813
fixes for errors reported in server log
2024-02-14 15:41:21 +01:00
898cfdf07d
Merged current state of develop
2024-02-14 10:56:35 +01:00
6e114d15e7
Set default shipcall lookup to max 1 day in the past
2024-02-09 12:42:18 +01:00
e3017349b0
added finally statement to close pooledConnection under all circumstances
2024-02-05 09:48:34 +01:00
50b7dd8cc5
fix shipcall query to include times eta/etd
2024-02-04 11:20:32 +01:00
801c4a1383
fixed deleted in ship (was int, is now: bool)
2024-01-15 17:16:22 +01:00
708fa5ce37
fixed naming in query
2024-01-15 17:10:21 +01:00
801800df92
added missing fields in query
2024-01-15 17:04:49 +01:00
a4e51f2483
changed local path
2024-01-15 17:00:19 +01:00
c51264a55d
added new fields to evaluation object
2024-01-15 16:25:08 +01:00
c1d8b2e855
fixed notification endpoint to return real data for a shipcall
2024-01-13 19:09:50 +01:00
1ef74b51ba
added ship delete and fixed schema loading error for shipclass
2024-01-13 19:09:50 +01:00
dd4ae7def8
fixed error, but enum values are still serialized as int
2024-01-13 19:09:50 +01:00
01dda53425
Tried to create history endpoint but failed. Not working.
2024-01-13 19:09:50 +01:00
a52cc27d69
Fixed SQL and added endpoint for history data
2024-01-13 19:09:50 +01:00
ae9053bcaf
Added POST and PUT endpoint for /ship
2024-01-13 19:09:50 +01: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
db2ba28d61
Merge branch 'bugfix/ui_fixes_1.1' into develop
2023-12-26 17:15:13 +01:00
e7e9d79c5d
Version bump to 1.1.1
2023-12-26 17:13:10 +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
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
da0287ae6e
fixes
2023-10-16 17:42:45 +02:00
e5e262fd4f
improve connection handling on startup
2023-10-16 17:31:57 +02:00
6597c46a9d
removed connection data file
2023-10-16 15:36:38 +02:00
fe53c85447
made simple path change and added documentation pt 1
2023-10-16 15:34:18 +02:00
d36517f63b
merged participant type for assignment side quest
2023-10-09 18:02:02 +02:00
c1a2f78a14
saving is possible (again), fixed the nested parameter
2023-10-09 17:37:44 +02:00
dc30fe9c53
added type flag to participant assignment for ship call pt. 1
2023-10-07 14:18:00 +02:00
eb51074328
Fixed issues when editing the shipcall as BSMD
2023-10-07 14:16:38 +02:00
da8ef2f113
bugfix
2023-10-07 14:16:38 +02:00
bf54b0e9d8
database extension
2023-10-06 16:13:05 +02:00
97adf65c0c
Fixed all sorts of small bugs, should be working now
2023-10-04 10:38:08 +02:00
7d5887b29d
Korrektur fürs Passwort ändern
2023-10-04 07:34:18 +02:00
6872df4278
Increased token timeout to 2 hours, introduced a background task to refresh token at about 70 min interval
2023-10-04 07:34:14 +02:00
916beedbb8
added evaluation and evaluation_message to shipcall (für die Ampel)
2023-09-29 14:22:04 +02:00
110ff5ccce
EXTENDED TIMES TO DIFFERENTIATE BETWEEN PARTICIPANT TYPES
...
Participants can be of multiple types (e.g. agent and terminal), therefore the participant
type must be stored in the times data record in order to assign times correctly during
display and to differentiate in calculation.
2023-09-21 08:23:19 +02:00
89a6a4f726
extended times and use flags on participant, added code to have a test version of the client
2023-09-05 16:38:40 +02:00
f255b16ff4
Work in progress, edit dialog completed, saving new elements works
2023-08-23 09:38:44 +02:00
95fab27229
Edit and save a shipcall
2023-08-21 15:34:09 +02:00
411ea8135e
Changing Password is functional through API and Client
2023-08-18 15:29:20 +02:00
3d7906a9f2
Synchronizing data structures including the latest changes in Excel spec
...
Database
API (yaml)
Flask
2023-08-17 10:05:48 +02:00
84462aead4
work on shipcall control
2023-08-14 16:00:34 +02:00
7655ebe724
put and post for participants of shipcall
2023-08-14 09:15:36 +02:00