OTAnalytics 0.5.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- otanalytics-0.5.3/.flake8 +7 -0
- otanalytics-0.5.3/.github/dependabot.yml +25 -0
- otanalytics-0.5.3/.github/workflows/benchmark.yml +52 -0
- otanalytics-0.5.3/.github/workflows/build-nightly.yml +33 -0
- otanalytics-0.5.3/.github/workflows/build-release.yml +35 -0
- otanalytics-0.5.3/.github/workflows/linter.yml +43 -0
- otanalytics-0.5.3/.github/workflows/regression-test.yml +39 -0
- otanalytics-0.5.3/.github/workflows/release-pypi.yml +60 -0
- otanalytics-0.5.3/.github/workflows/release-testpypi.yml +60 -0
- otanalytics-0.5.3/.github/workflows/test.yml +30 -0
- otanalytics-0.5.3/.gitignore +177 -0
- otanalytics-0.5.3/.pre-commit-config.yaml +87 -0
- otanalytics-0.5.3/.run/Scalene-CLI (benchmark).run.xml +25 -0
- otanalytics-0.5.3/.run/Scalene-CLI.run.xml +26 -0
- otanalytics-0.5.3/.run/Start-CLI (benchmark files).run.xml +26 -0
- otanalytics-0.5.3/.run/Start-CLI.run.xml +24 -0
- otanalytics-0.5.3/.run/Start-GUI (mit Benchmarkdaten).run.xml +25 -0
- otanalytics-0.5.3/.run/Start-GUI (mit Testdaten).run.xml +25 -0
- otanalytics-0.5.3/.run/Start-GUI.run.xml +25 -0
- otanalytics-0.5.3/.run/pytest-in-tests.run.xml +19 -0
- otanalytics-0.5.3/.shellcheckrc +2 -0
- otanalytics-0.5.3/.vscode/launch.json +21 -0
- otanalytics-0.5.3/.vscode/settings.json +23 -0
- otanalytics-0.5.3/.yamllint.yaml +34 -0
- otanalytics-0.5.3/LICENSE +674 -0
- otanalytics-0.5.3/OTAnalytics/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/__main__.py +13 -0
- otanalytics-0.5.3/OTAnalytics/adapter_intersect/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/abstract_button_quick_save_config.py +12 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/abstract_canvas.py +25 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/abstract_frame.py +19 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/abstract_frame_canvas.py +17 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/abstract_frame_filter.py +50 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/abstract_frame_project.py +27 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/abstract_frame_remark.py +7 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/abstract_frame_track_plotting.py +11 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/abstract_frame_track_statistics.py +13 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/abstract_frame_tracks.py +29 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/abstract_main_window.py +9 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/abstract_progressbar_popup.py +38 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/abstract_treeview_interface.py +31 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/default_values.py +12 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/dto.py +6 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/flow_adapter.py +54 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/helpers.py +41 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/text_resources.py +51 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/ui_texts.py +29 -0
- otanalytics-0.5.3/OTAnalytics/adapter_ui/view_model.py +447 -0
- otanalytics-0.5.3/OTAnalytics/adapter_visualization/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/adapter_visualization/color_provider.py +87 -0
- otanalytics-0.5.3/OTAnalytics/application/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/application/analysis/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/application/analysis/intersect.py +40 -0
- otanalytics-0.5.3/OTAnalytics/application/analysis/traffic_counting.py +945 -0
- otanalytics-0.5.3/OTAnalytics/application/analysis/traffic_counting_specification.py +60 -0
- otanalytics-0.5.3/OTAnalytics/application/application.py +713 -0
- otanalytics-0.5.3/OTAnalytics/application/config.py +57 -0
- otanalytics-0.5.3/OTAnalytics/application/config_specification.py +54 -0
- otanalytics-0.5.3/OTAnalytics/application/datastore.py +456 -0
- otanalytics-0.5.3/OTAnalytics/application/eventlist.py +162 -0
- otanalytics-0.5.3/OTAnalytics/application/exception.py +31 -0
- otanalytics-0.5.3/OTAnalytics/application/export_formats/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/application/export_formats/event_list.py +23 -0
- otanalytics-0.5.3/OTAnalytics/application/export_formats/export_mode.py +41 -0
- otanalytics-0.5.3/OTAnalytics/application/export_formats/road_user_assignments.py +46 -0
- otanalytics-0.5.3/OTAnalytics/application/export_formats/track_statistics.py +17 -0
- otanalytics-0.5.3/OTAnalytics/application/geometry.py +24 -0
- otanalytics-0.5.3/OTAnalytics/application/logger.py +51 -0
- otanalytics-0.5.3/OTAnalytics/application/parser/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/application/parser/cli_parser.py +128 -0
- otanalytics-0.5.3/OTAnalytics/application/parser/config_parser.py +128 -0
- otanalytics-0.5.3/OTAnalytics/application/parser/deserializer.py +4 -0
- otanalytics-0.5.3/OTAnalytics/application/parser/flow_parser.py +41 -0
- otanalytics-0.5.3/OTAnalytics/application/playback.py +7 -0
- otanalytics-0.5.3/OTAnalytics/application/plotting.py +326 -0
- otanalytics-0.5.3/OTAnalytics/application/progress.py +95 -0
- otanalytics-0.5.3/OTAnalytics/application/project.py +161 -0
- otanalytics-0.5.3/OTAnalytics/application/run_configuration.py +225 -0
- otanalytics-0.5.3/OTAnalytics/application/state.py +711 -0
- otanalytics-0.5.3/OTAnalytics/application/track_filter.py +149 -0
- otanalytics-0.5.3/OTAnalytics/application/ui/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/application/ui/frame_control.py +152 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/add_new_remark.py +9 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/apply_cli_cuts.py +47 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/clear_repositories.py +53 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/config.py +52 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/config_has_changed.py +121 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/create_events.py +171 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/create_intersection_events.py +282 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/cut_tracks_with_sections.py +78 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/editor/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/editor/section_editor.py +138 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/event_repository.py +65 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/export_events.py +50 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/filter_visualization.py +76 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/flow_repository.py +101 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/flow_statistics.py +27 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/generate_flows.py +170 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/get_current_project.py +10 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/get_current_remark.py +9 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/get_road_user_assignments.py +23 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/highlight_intersections.py +388 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/inside_cutting_section.py +88 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/intersection_repository.py +37 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/load_otconfig.py +76 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/load_otflow.py +94 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/load_track_files.py +84 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/number_of_tracks_to_be_validated.py +7 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/preload_input_files.py +34 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/quick_save_configuration.py +37 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/reset_project_config.py +16 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/road_user_assignment_export.py +259 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/save_otflow.py +46 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/section_repository.py +198 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/start_new_project.py +39 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/suggest_save_path.py +113 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/track_export.py +57 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/track_repository.py +205 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/track_statistics.py +167 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/track_statistics_export.py +140 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/track_to_video_repository.py +16 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/update_project.py +42 -0
- otanalytics-0.5.3/OTAnalytics/application/use_cases/video_repository.py +136 -0
- otanalytics-0.5.3/OTAnalytics/assets/OpenTrafficCam_800.png +0 -0
- otanalytics-0.5.3/OTAnalytics/domain/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/domain/common.py +27 -0
- otanalytics-0.5.3/OTAnalytics/domain/date.py +85 -0
- otanalytics-0.5.3/OTAnalytics/domain/event.py +588 -0
- otanalytics-0.5.3/OTAnalytics/domain/files.py +18 -0
- otanalytics-0.5.3/OTAnalytics/domain/filter.py +256 -0
- otanalytics-0.5.3/OTAnalytics/domain/flow.py +236 -0
- otanalytics-0.5.3/OTAnalytics/domain/geometry.py +194 -0
- otanalytics-0.5.3/OTAnalytics/domain/intersect.py +155 -0
- otanalytics-0.5.3/OTAnalytics/domain/observer.py +35 -0
- otanalytics-0.5.3/OTAnalytics/domain/progress.py +68 -0
- otanalytics-0.5.3/OTAnalytics/domain/remark.py +9 -0
- otanalytics-0.5.3/OTAnalytics/domain/section.py +483 -0
- otanalytics-0.5.3/OTAnalytics/domain/track.py +348 -0
- otanalytics-0.5.3/OTAnalytics/domain/track_dataset.py +431 -0
- otanalytics-0.5.3/OTAnalytics/domain/track_repository.py +269 -0
- otanalytics-0.5.3/OTAnalytics/domain/types.py +33 -0
- otanalytics-0.5.3/OTAnalytics/domain/video.py +339 -0
- otanalytics-0.5.3/OTAnalytics/helpers/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/helpers/time_profiling.py +20 -0
- otanalytics-0.5.3/OTAnalytics/plugin_datastore/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_datastore/python_track_store.py +837 -0
- otanalytics-0.5.3/OTAnalytics/plugin_datastore/track_geometry_store/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_datastore/track_geometry_store/pygeos_store.py +402 -0
- otanalytics-0.5.3/OTAnalytics/plugin_datastore/track_store.py +803 -0
- otanalytics-0.5.3/OTAnalytics/plugin_filter/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_filter/dataframe_filter.py +324 -0
- otanalytics-0.5.3/OTAnalytics/plugin_filter/pandas_track_id.py +23 -0
- otanalytics-0.5.3/OTAnalytics/plugin_intersect/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_intersect/shapely/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_intersect/shapely/mapping.py +57 -0
- otanalytics-0.5.3/OTAnalytics/plugin_intersect/simple/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_intersect/simple/cut_tracks_with_sections.py +82 -0
- otanalytics-0.5.3/OTAnalytics/plugin_intersect/simple_intersect.py +33 -0
- otanalytics-0.5.3/OTAnalytics/plugin_intersect_parallelization/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_intersect_parallelization/multiprocessing.py +50 -0
- otanalytics-0.5.3/OTAnalytics/plugin_intersect_parallelization/sequential.py +28 -0
- otanalytics-0.5.3/OTAnalytics/plugin_number_of_tracks_to_be_validated/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_number_of_tracks_to_be_validated/calculation_strategy.py +115 -0
- otanalytics-0.5.3/OTAnalytics/plugin_number_of_tracks_to_be_validated/metric_rates_builder.py +36 -0
- otanalytics-0.5.3/OTAnalytics/plugin_number_of_tracks_to_be_validated/otc_classes.py +22 -0
- otanalytics-0.5.3/OTAnalytics/plugin_number_of_tracks_to_be_validated/svz/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_number_of_tracks_to_be_validated/svz/metric_rates.py +23 -0
- otanalytics-0.5.3/OTAnalytics/plugin_number_of_tracks_to_be_validated/svz/number_of_tracks_to_be_validated.py +69 -0
- otanalytics-0.5.3/OTAnalytics/plugin_number_of_tracks_to_be_validated/tracks_as_dataframe_provider.py +38 -0
- otanalytics-0.5.3/OTAnalytics/plugin_parser/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_parser/argparse_cli_parser.py +189 -0
- otanalytics-0.5.3/OTAnalytics/plugin_parser/dataformat_versions.py +22 -0
- otanalytics-0.5.3/OTAnalytics/plugin_parser/export.py +290 -0
- otanalytics-0.5.3/OTAnalytics/plugin_parser/json_parser.py +70 -0
- otanalytics-0.5.3/OTAnalytics/plugin_parser/otconfig_parser.py +352 -0
- otanalytics-0.5.3/OTAnalytics/plugin_parser/ottrk_dataformat.py +63 -0
- otanalytics-0.5.3/OTAnalytics/plugin_parser/otvision_parser.py +1101 -0
- otanalytics-0.5.3/OTAnalytics/plugin_parser/pandas_parser.py +125 -0
- otanalytics-0.5.3/OTAnalytics/plugin_parser/road_user_assignment_export.py +78 -0
- otanalytics-0.5.3/OTAnalytics/plugin_parser/streaming_parser.py +349 -0
- otanalytics-0.5.3/OTAnalytics/plugin_parser/track_export.py +102 -0
- otanalytics-0.5.3/OTAnalytics/plugin_parser/track_statistics_export.py +137 -0
- otanalytics-0.5.3/OTAnalytics/plugin_progress/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_progress/multiprocessing_progress.py +48 -0
- otanalytics-0.5.3/OTAnalytics/plugin_progress/tqdm_progressbar.py +35 -0
- otanalytics-0.5.3/OTAnalytics/plugin_prototypes/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_prototypes/event_visualization.py +79 -0
- otanalytics-0.5.3/OTAnalytics/plugin_prototypes/eventlist_exporter/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_prototypes/eventlist_exporter/eventlist_exporter.py +354 -0
- otanalytics-0.5.3/OTAnalytics/plugin_prototypes/track_visualization/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_prototypes/track_visualization/track_viz.py +846 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/cli.py +489 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/abstract_ctk_frame.py +51 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/button_quick_save_config.py +22 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/canvas_observer.py +26 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/constants.py +70 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/custom_containers.py +164 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/dummy_viewmodel.py +1833 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/frame_analysis.py +87 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/frame_bbox_offset.py +90 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/frame_canvas.py +223 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/frame_configuration.py +36 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/frame_date_filter_control.py +147 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/frame_files.py +124 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/frame_filter.py +860 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/frame_flows.py +149 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/frame_project.py +466 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/frame_remarks.py +30 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/frame_sections.py +171 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/frame_track_plotting.py +155 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/frame_track_statistics.py +159 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/frame_tracks.py +94 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/frame_videos.py +107 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/gui.py +345 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/helpers.py +160 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/line_section.py +700 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/messagebox.py +136 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/scrollable_xy_frame.py +200 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/state.py +25 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/style.py +110 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/toplevel_export_counts.py +162 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/toplevel_export_events.py +121 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/toplevel_flows.py +228 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/toplevel_progress.py +168 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/toplevel_sections.py +127 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/toplevel_template.py +81 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/treeview_template.py +93 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/customtkinter_gui/utility_widgets.py +38 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/intersection_repository.py +34 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/main_application.py +1373 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/visualization/__init__.py +0 -0
- otanalytics-0.5.3/OTAnalytics/plugin_ui/visualization/visualization.py +981 -0
- otanalytics-0.5.3/OTAnalytics/plugin_video_processing/video_reader.py +165 -0
- otanalytics-0.5.3/OTAnalytics/version.py +1 -0
- otanalytics-0.5.3/PKG-INFO +45 -0
- otanalytics-0.5.3/README.md +11 -0
- otanalytics-0.5.3/clean-up-repository.sh +6 -0
- otanalytics-0.5.3/config.yml +31 -0
- otanalytics-0.5.3/install.cmd +14 -0
- otanalytics-0.5.3/install.sh +24 -0
- otanalytics-0.5.3/install_dev.cmd +7 -0
- otanalytics-0.5.3/install_dev.sh +14 -0
- otanalytics-0.5.3/pyproject.toml +54 -0
- otanalytics-0.5.3/requirements-dev.txt +16 -0
- otanalytics-0.5.3/requirements.txt +14 -0
- otanalytics-0.5.3/start_gui.cmd +12 -0
- otanalytics-0.5.3/start_gui.sh +18 -0
- otanalytics-0.5.3/tests/OTAnalytics/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/adapter_intersect/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/adapter_intersect/test_mapping.py +76 -0
- otanalytics-0.5.3/tests/OTAnalytics/adapter_ui/test_helpers.py +81 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/analysis/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/analysis/test_traffic_counting.py +841 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/test_datastore.py +286 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/test_eventlist.py +291 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/test_helpers.py +105 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/test_plotting.py +175 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/test_progress.py +53 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/test_project.py +111 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/test_run_configuration.py +461 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/test_state.py +530 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/test_track_filter.py +205 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/ui/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/ui/test_frame_control.py +241 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_apply_cli_cuts.py +65 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_clear_repositories.py +43 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_config.py +53 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_config_has_changed.py +212 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_create_events.py +156 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_create_intersection_events.py +554 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_event_repository.py +50 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_filter_visualization.py +84 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_flow_repository.py +124 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_flows_statistics.py +73 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_generate_flows.py +251 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_get_current_project.py +13 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_get_road_user_assignments.py +58 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_highlight_intersections.py +558 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_inside_cutting_section.py +132 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_intersection_repository.py +63 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_load_otconfig.py +111 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_load_otflow.py +150 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_load_track_files.py +169 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_preload_input_files.py +80 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_quick_save_configuration.py +78 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_reset_project_config.py +12 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_road_user_assignment_export.py +119 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_save_otflow.py +62 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_section_repository.py +162 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_start_new_project.py +25 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_suggest_save_path.py +166 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_track_export.py +49 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_track_repository.py +229 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_track_statistics.py +167 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_track_statistics_export.py +75 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_update_project.py +126 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/test_video_repository.py +159 -0
- otanalytics-0.5.3/tests/OTAnalytics/application/use_cases/track_to_video_repository.py +14 -0
- otanalytics-0.5.3/tests/OTAnalytics/domain/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/domain/test_date.py +78 -0
- otanalytics-0.5.3/tests/OTAnalytics/domain/test_event.py +696 -0
- otanalytics-0.5.3/tests/OTAnalytics/domain/test_files.py +17 -0
- otanalytics-0.5.3/tests/OTAnalytics/domain/test_filter.py +107 -0
- otanalytics-0.5.3/tests/OTAnalytics/domain/test_flow.py +142 -0
- otanalytics-0.5.3/tests/OTAnalytics/domain/test_geometry.py +106 -0
- otanalytics-0.5.3/tests/OTAnalytics/domain/test_observer.py +31 -0
- otanalytics-0.5.3/tests/OTAnalytics/domain/test_section.py +513 -0
- otanalytics-0.5.3/tests/OTAnalytics/domain/test_track_repository.py +223 -0
- otanalytics-0.5.3/tests/OTAnalytics/domain/test_video.py +147 -0
- otanalytics-0.5.3/tests/OTAnalytics/domain/track_dataset/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/domain/track_dataset/test_track_dataset.py +445 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_datastore/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_datastore/test_python_track_storage.py +712 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_datastore/test_track_store.py +653 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_datastore/track_geometry_store/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_datastore/track_geometry_store/test_pygeos_store.py +837 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_filter/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_filter/test_dataframe_filter.py +457 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_intersect/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_intersect/shapely/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_intersect/simple/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_intersect/simple/test_cut_tracks_with_sections.py +118 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_intersect/test_intersect.py +67 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_intersect_parallelization/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_intersect_parallelization/test_multiprocessing.py +76 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_intersect_parallelization/test_sequential.py +32 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_number_of_tracks_to_be_validated/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_number_of_tracks_to_be_validated/conftest.py +67 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_number_of_tracks_to_be_validated/svz/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_number_of_tracks_to_be_validated/svz/test_number_of_tracks_to_be_validated.py +186 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_number_of_tracks_to_be_validated/test_calculation_strategy.py +105 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_number_of_tracks_to_be_validated/test_tracks_as_dataframe_provider.py +123 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_parser/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_parser/test_argparse_cli_parser.py +80 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_parser/test_export.py +239 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_parser/test_json_parser.py +59 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_parser/test_otconfig_parser.py +353 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_parser/test_otvision_parser.py +820 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_parser/test_pandas_parser.py +121 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_parser/test_road_user_assignment_export.py +81 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_parser/test_streaming_parser.py +369 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_parser/test_track_export.py +57 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_progress/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_progress/test_multiprocessing_progress.py +68 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_prototypes/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_prototypes/track_visualization/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_prototypes/track_visualization/test_track_viz.py +544 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_ui/__init__.py +0 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_ui/test_cli.py +1135 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_ui/test_intersection_repository.py +81 -0
- otanalytics-0.5.3/tests/OTAnalytics/plugin_video_processing/test_video_reader.py +105 -0
- otanalytics-0.5.3/tests/__init__.py +0 -0
- otanalytics-0.5.3/tests/benchmark_otanalytics.py +636 -0
- otanalytics-0.5.3/tests/conftest.py +387 -0
- otanalytics-0.5.3/tests/data/.gitkeep +0 -0
- otanalytics-0.5.3/tests/data/Sample_FR20_2020-01-01_00-00-00.ottrk +0 -0
- otanalytics-0.5.3/tests/data/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.mp4 +0 -0
- otanalytics-0.5.3/tests/data/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otconfig +183 -0
- otanalytics-0.5.3/tests/data/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.otflow +148 -0
- otanalytics-0.5.3/tests/data/Testvideo_Cars-Cyclist_FR20_2020-01-01_00-00-00.ottrk +0 -0
- otanalytics-0.5.3/tests/data/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.mp4 +0 -0
- otanalytics-0.5.3/tests/data/Testvideo_Cars-Truck_FR20_2020-01-01_00-00-00.ottrk +0 -0
- otanalytics-0.5.3/tests/data/section.json.bz2.otflow +25 -0
- otanalytics-0.5.3/tests/regression_otanalytics.py +316 -0
- otanalytics-0.5.3/tests/utils/__init__.py +0 -0
- otanalytics-0.5.3/tests/utils/assertions.py +100 -0
- otanalytics-0.5.3/tests/utils/builders/__init__.py +0 -0
- otanalytics-0.5.3/tests/utils/builders/constants.py +11 -0
- otanalytics-0.5.3/tests/utils/builders/event_builder.py +126 -0
- otanalytics-0.5.3/tests/utils/builders/road_user_assignment.py +43 -0
- otanalytics-0.5.3/tests/utils/builders/run_configuration.py +51 -0
- otanalytics-0.5.3/tests/utils/builders/track_builder.py +330 -0
- otanalytics-0.5.3/tests/utils/builders/track_dataset_provider.py +127 -0
- otanalytics-0.5.3/tests/utils/builders/track_segment_builder.py +133 -0
- otanalytics-0.5.3/tests/utils/state.py +31 -0
- otanalytics-0.5.3/update_precommit.py +260 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "pip" # See documentation for possible values
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "weekly"
|
|
12
|
+
day: "sunday"
|
|
13
|
+
reviewers:
|
|
14
|
+
- "briemla"
|
|
15
|
+
assignees:
|
|
16
|
+
- "briemla"
|
|
17
|
+
- package-ecosystem: "github-actions" # See documentation for possible values
|
|
18
|
+
directory: "/" # Location of package manifests
|
|
19
|
+
schedule:
|
|
20
|
+
interval: "weekly"
|
|
21
|
+
day: "sunday"
|
|
22
|
+
reviewers:
|
|
23
|
+
- "briemla"
|
|
24
|
+
assignees:
|
|
25
|
+
- "briemla"
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Benchmark Test With Pytest
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "0 0 * * *"
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
deployments: write
|
|
11
|
+
packages: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
benchmark:
|
|
15
|
+
name: Run pytest-benchmark benchmark
|
|
16
|
+
runs-on: [ubuntu-latest]
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: 3.11
|
|
22
|
+
- name: Download test data
|
|
23
|
+
run: |
|
|
24
|
+
gh release download \
|
|
25
|
+
--pattern 'OTCamera19_FR20_2023-05-24_06-00-00_11-45-00.zip' \
|
|
26
|
+
--pattern 'OTCamera19_FR20_2023-05-24_00-00-00.zip' \
|
|
27
|
+
-R platomo/OpenTrafficCam-testdata -D tests/data
|
|
28
|
+
env:
|
|
29
|
+
GH_TOKEN: ${{ secrets.PLATOMO_OTC_TESTDATA_ACCESS }}
|
|
30
|
+
- name: Unzip test data
|
|
31
|
+
run: |
|
|
32
|
+
cd tests/data
|
|
33
|
+
unzip ./\*.zip
|
|
34
|
+
rm ./*.zip
|
|
35
|
+
cd ..
|
|
36
|
+
- name: Install requirements
|
|
37
|
+
run: |
|
|
38
|
+
python -m pip install --upgrade pip
|
|
39
|
+
pip install -r requirements-dev.txt
|
|
40
|
+
- name: Run benchmark tests
|
|
41
|
+
run: pytest ./tests/benchmark_otanalytics.py --benchmark-json output.json
|
|
42
|
+
- name: Store benchmark result
|
|
43
|
+
uses: benchmark-action/github-action-benchmark@v1
|
|
44
|
+
with:
|
|
45
|
+
name: Python Benchmark with pytest-benchmark
|
|
46
|
+
tool: "pytest"
|
|
47
|
+
output-file-path: output.json
|
|
48
|
+
auto-push: true
|
|
49
|
+
alert-threshold: "200%"
|
|
50
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
51
|
+
comment-on-alert: true
|
|
52
|
+
fail-on-alert: true
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Build Nightly Version
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
# Creates Nightly Release of main
|
|
6
|
+
# Needs: secrets.PLATOMO_BUILDER_ACCESS
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
|
|
11
|
+
permissions: read-all
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
uses: "./.github/workflows/test.yml"
|
|
16
|
+
regression-test:
|
|
17
|
+
uses: "./.github/workflows/regression-test.yml"
|
|
18
|
+
secrets: inherit
|
|
19
|
+
create_nightly:
|
|
20
|
+
permissions:
|
|
21
|
+
contents: write
|
|
22
|
+
needs:
|
|
23
|
+
- test
|
|
24
|
+
- regression-test
|
|
25
|
+
uses: "platomo/GitHub-workflows/.github/workflows/reusable-create-release-with-assets.yml@main"
|
|
26
|
+
secrets:
|
|
27
|
+
PLATOMO_BUILDER_ACCESS: ${{ secrets.PLATOMO_BUILDER_ACCESS }}
|
|
28
|
+
with:
|
|
29
|
+
package-version: nightly
|
|
30
|
+
package-path: OTAnalytics
|
|
31
|
+
draft-release: false
|
|
32
|
+
pre-release: true
|
|
33
|
+
delete-existing: true
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Build Release Version
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
# Create release if tag is pushed to main.
|
|
6
|
+
# Needs: secrets.PLATOMO_BUILDER_ACCESS
|
|
7
|
+
push:
|
|
8
|
+
tags:
|
|
9
|
+
- "v*.*.*"
|
|
10
|
+
|
|
11
|
+
permissions: read-all
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
if: endsWith(github.event.base_ref, 'main')
|
|
16
|
+
uses: "./.github/workflows/test.yml"
|
|
17
|
+
regression-test:
|
|
18
|
+
if: endsWith(github.event.base_ref, 'main')
|
|
19
|
+
uses: "./.github/workflows/regression-test.yml"
|
|
20
|
+
secrets: inherit
|
|
21
|
+
create_release:
|
|
22
|
+
permissions:
|
|
23
|
+
contents: write
|
|
24
|
+
needs:
|
|
25
|
+
- test
|
|
26
|
+
- regression-test
|
|
27
|
+
uses: "platomo/GitHub-workflows/.github/workflows/reusable-create-release-with-assets.yml@main"
|
|
28
|
+
secrets:
|
|
29
|
+
PLATOMO_BUILDER_ACCESS: ${{ secrets.PLATOMO_BUILDER_ACCESS }}
|
|
30
|
+
with:
|
|
31
|
+
package-version: ${{ github.ref_name }}
|
|
32
|
+
package-path: OTAnalytics
|
|
33
|
+
draft-release: false
|
|
34
|
+
pre-release: false
|
|
35
|
+
delete-existing: false
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: super-linter
|
|
3
|
+
#
|
|
4
|
+
# Documentation:
|
|
5
|
+
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
|
6
|
+
#
|
|
7
|
+
|
|
8
|
+
on: pull_request
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
packages: read
|
|
13
|
+
# To report GitHub Actions status checks
|
|
14
|
+
statuses: write
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
lint:
|
|
18
|
+
name: Lint many languages with super-linter
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout Code
|
|
22
|
+
uses: actions/checkout@v4
|
|
23
|
+
with:
|
|
24
|
+
# super-linter needs the full git history to get the
|
|
25
|
+
# list of files that changed across commits
|
|
26
|
+
fetch-depth: 0
|
|
27
|
+
- name: Lint Code Base
|
|
28
|
+
uses: github/super-linter/slim@v7
|
|
29
|
+
env:
|
|
30
|
+
VALIDATE_ALL_CODEBASE: false
|
|
31
|
+
DEFAULT_BRANCH: main
|
|
32
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
33
|
+
VALIDATE_GO_RELEASER: false
|
|
34
|
+
VALIDATE_PYTHON_PYLINT: false
|
|
35
|
+
VALIDATE_PYTHON_MYPY: false
|
|
36
|
+
VALIDATE_JSCPD: false
|
|
37
|
+
VALIDATE_PYTHON_BLACK: false
|
|
38
|
+
VALIDATE_PYTHON_PYINK: false
|
|
39
|
+
|
|
40
|
+
LINTER_RULES_PATH: /
|
|
41
|
+
PYTHON_FLAKE8_CONFIG_FILE: .flake8
|
|
42
|
+
PYTHON_ISORT_CONFIG_FILE: pyproject.toml
|
|
43
|
+
YAML_CONFIG_FILE: .yamllint.yaml
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Regression Test With Pytest
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
workflow_call:
|
|
8
|
+
|
|
9
|
+
permissions: read-all
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
regression-test:
|
|
13
|
+
name: Run pytest regression test
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: 3.11
|
|
20
|
+
- name: Download test data
|
|
21
|
+
run: |
|
|
22
|
+
gh release download \
|
|
23
|
+
--pattern 'OTCamera19_FR20_2023-05-24_06-00-00_11-45-00.zip' \
|
|
24
|
+
--pattern 'OTCamera19_FR20_2023-05-24_00-00-00.zip' \
|
|
25
|
+
-R platomo/OpenTrafficCam-testdata -D tests/data
|
|
26
|
+
env:
|
|
27
|
+
GH_TOKEN: ${{ secrets.PLATOMO_OTC_TESTDATA_ACCESS }}
|
|
28
|
+
- name: Unzip test data
|
|
29
|
+
run: |
|
|
30
|
+
cd tests/data
|
|
31
|
+
unzip ./\*.zip
|
|
32
|
+
rm ./*.zip
|
|
33
|
+
cd ..
|
|
34
|
+
- name: Install requirements
|
|
35
|
+
run: |
|
|
36
|
+
python -m pip install --upgrade pip
|
|
37
|
+
pip install -r requirements-dev.txt
|
|
38
|
+
- name: Run regression tests
|
|
39
|
+
run: pytest ./tests/regression_otanalytics.py
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Publish to PyPI
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
tags:
|
|
7
|
+
- "v*.*.*"
|
|
8
|
+
|
|
9
|
+
permissions: read-all
|
|
10
|
+
|
|
11
|
+
env:
|
|
12
|
+
out_dir: "dist/"
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
test:
|
|
16
|
+
if: endsWith(github.event.base_ref, 'main')
|
|
17
|
+
uses: "./.github/workflows/test.yml"
|
|
18
|
+
regression-test:
|
|
19
|
+
if: endsWith(github.event.base_ref, 'main')
|
|
20
|
+
uses: "./.github/workflows/regression-test.yml"
|
|
21
|
+
secrets: inherit
|
|
22
|
+
publish-to-pypi:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
needs:
|
|
25
|
+
- test
|
|
26
|
+
- regression-test
|
|
27
|
+
environment:
|
|
28
|
+
name: pypi
|
|
29
|
+
url: https://pypi.org/p/OTAnalytics
|
|
30
|
+
permissions:
|
|
31
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
32
|
+
steps:
|
|
33
|
+
- name: Checkout code
|
|
34
|
+
uses: actions/checkout@v4
|
|
35
|
+
- name: Set up Python
|
|
36
|
+
uses: actions/setup-python@v5
|
|
37
|
+
with:
|
|
38
|
+
python-version: "3.11"
|
|
39
|
+
- name: Update Python Package Version
|
|
40
|
+
uses: platomo/update-version-py-action@v1.0.0
|
|
41
|
+
with:
|
|
42
|
+
version: ${{ github.ref_name }}
|
|
43
|
+
file-path: "OTAnalytics"
|
|
44
|
+
- name: Install pypa/build
|
|
45
|
+
shell: bash
|
|
46
|
+
run: |
|
|
47
|
+
python3 -m pip install build --user
|
|
48
|
+
|
|
49
|
+
- name: Build a binary wheel and a source tarball
|
|
50
|
+
shell: bash
|
|
51
|
+
run: python -m build --sdist --wheel --outdir ${{ env.out_dir }}
|
|
52
|
+
|
|
53
|
+
- name: Store the distribution packages
|
|
54
|
+
uses: actions/upload-artifact@v4
|
|
55
|
+
with:
|
|
56
|
+
name: python-package-distributions
|
|
57
|
+
path: ${{ env.out_dir }}
|
|
58
|
+
|
|
59
|
+
- name: Publish distribution
|
|
60
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Publish to TestPyPI
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
|
|
9
|
+
permissions: read-all
|
|
10
|
+
|
|
11
|
+
env:
|
|
12
|
+
out_dir: "dist/"
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
test:
|
|
16
|
+
uses: "./.github/workflows/test.yml"
|
|
17
|
+
regression-test:
|
|
18
|
+
uses: "./.github/workflows/regression-test.yml"
|
|
19
|
+
secrets: inherit
|
|
20
|
+
publish-to-testpypi:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
needs:
|
|
23
|
+
- test
|
|
24
|
+
- regression-test
|
|
25
|
+
environment:
|
|
26
|
+
name: testpypi
|
|
27
|
+
url: https://test.pypi.org/p/OTAnalytics
|
|
28
|
+
permissions:
|
|
29
|
+
id-token: write # IMPORTANT: mandatory for trusted publishing
|
|
30
|
+
steps:
|
|
31
|
+
- name: Checkout code
|
|
32
|
+
uses: actions/checkout@v4
|
|
33
|
+
- name: Set up Python
|
|
34
|
+
uses: actions/setup-python@v5
|
|
35
|
+
with:
|
|
36
|
+
python-version: "3.11"
|
|
37
|
+
- name: Update Python Package Version
|
|
38
|
+
uses: platomo/update-version-py-action@v1.0.1
|
|
39
|
+
with:
|
|
40
|
+
version: nightly
|
|
41
|
+
file-path: "OTAnalytics"
|
|
42
|
+
- name: Install pypa/build
|
|
43
|
+
shell: bash
|
|
44
|
+
run: |
|
|
45
|
+
python3 -m pip install build --user
|
|
46
|
+
|
|
47
|
+
- name: Build a binary wheel and a source tarball
|
|
48
|
+
shell: bash
|
|
49
|
+
run: python -m build --sdist --wheel --outdir ${{ env.out_dir }}
|
|
50
|
+
|
|
51
|
+
- name: Store the distribution packages
|
|
52
|
+
uses: actions/upload-artifact@v4
|
|
53
|
+
with:
|
|
54
|
+
name: python-package-distributions
|
|
55
|
+
path: ${{ env.out_dir }}
|
|
56
|
+
|
|
57
|
+
- name: Publish distribution
|
|
58
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
59
|
+
with:
|
|
60
|
+
repository-url: ${{ vars.PYPI_REPO_URL }}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Test
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
# Run tests each time a PR is opened or changed.
|
|
6
|
+
# Allow other Workflows (e.g., build workflows) to call this workflow.
|
|
7
|
+
pull_request:
|
|
8
|
+
workflow_call:
|
|
9
|
+
|
|
10
|
+
permissions: read-all
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
name: Execute tests across various operating systems and Python versions.
|
|
15
|
+
strategy:
|
|
16
|
+
matrix:
|
|
17
|
+
os: [ubuntu-latest, windows-latest]
|
|
18
|
+
py: ["3.11"]
|
|
19
|
+
fail-fast: true
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
steps:
|
|
22
|
+
- name: Checkout repository
|
|
23
|
+
uses: actions/checkout@v4
|
|
24
|
+
- name: Run Python Tests
|
|
25
|
+
uses: platomo/test-python-app-action@v1.0.5
|
|
26
|
+
timeout-minutes: 60
|
|
27
|
+
with:
|
|
28
|
+
py-version: ${{ matrix.py }}
|
|
29
|
+
package-path: OTAnalytics
|
|
30
|
+
test-path: tests
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# OTAnalytics
|
|
2
|
+
data/
|
|
3
|
+
!tests/data
|
|
4
|
+
tests/data/OTCamera19_FR20_2023-05-24*
|
|
5
|
+
tests/scripts/
|
|
6
|
+
|
|
7
|
+
# Byte-compiled / optimized / DLL files
|
|
8
|
+
__pycache__/
|
|
9
|
+
*.py[cod]
|
|
10
|
+
*$py.class
|
|
11
|
+
|
|
12
|
+
# C extensions
|
|
13
|
+
*.so
|
|
14
|
+
|
|
15
|
+
# Distribution / packaging
|
|
16
|
+
.Python
|
|
17
|
+
build/
|
|
18
|
+
develop-eggs/
|
|
19
|
+
dist/
|
|
20
|
+
downloads/
|
|
21
|
+
eggs/
|
|
22
|
+
.eggs/
|
|
23
|
+
lib/
|
|
24
|
+
lib64/
|
|
25
|
+
parts/
|
|
26
|
+
sdist/
|
|
27
|
+
var/
|
|
28
|
+
wheels/
|
|
29
|
+
share/python-wheels/
|
|
30
|
+
*.egg-info/
|
|
31
|
+
.installed.cfg
|
|
32
|
+
*.egg
|
|
33
|
+
MANIFEST
|
|
34
|
+
|
|
35
|
+
# PyInstaller
|
|
36
|
+
# Usually these files are written by a python script from a template
|
|
37
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
38
|
+
*.manifest
|
|
39
|
+
*.spec
|
|
40
|
+
|
|
41
|
+
# Installer logs
|
|
42
|
+
pip-log.txt
|
|
43
|
+
pip-delete-this-directory.txt
|
|
44
|
+
|
|
45
|
+
# Unit test / coverage reports
|
|
46
|
+
htmlcov/
|
|
47
|
+
.tox/
|
|
48
|
+
.nox/
|
|
49
|
+
.coverage
|
|
50
|
+
.coverage.*
|
|
51
|
+
.cache
|
|
52
|
+
nosetests.xml
|
|
53
|
+
coverage.xml
|
|
54
|
+
*.cover
|
|
55
|
+
*.py,cover
|
|
56
|
+
.hypothesis/
|
|
57
|
+
.pytest_cache/
|
|
58
|
+
cover/
|
|
59
|
+
|
|
60
|
+
# Translations
|
|
61
|
+
*.mo
|
|
62
|
+
*.pot
|
|
63
|
+
|
|
64
|
+
# Django stuff:
|
|
65
|
+
*.log
|
|
66
|
+
local_settings.py
|
|
67
|
+
db.sqlite3
|
|
68
|
+
db.sqlite3-journal
|
|
69
|
+
|
|
70
|
+
# Flask stuff:
|
|
71
|
+
instance/
|
|
72
|
+
.webassets-cache
|
|
73
|
+
|
|
74
|
+
# Scrapy stuff:
|
|
75
|
+
.scrapy
|
|
76
|
+
|
|
77
|
+
# Sphinx documentation
|
|
78
|
+
docs/_build/
|
|
79
|
+
|
|
80
|
+
# PyBuilder
|
|
81
|
+
.pybuilder/
|
|
82
|
+
target/
|
|
83
|
+
|
|
84
|
+
# Jupyter Notebook
|
|
85
|
+
.ipynb_checkpoints
|
|
86
|
+
|
|
87
|
+
# IPython
|
|
88
|
+
profile_default/
|
|
89
|
+
ipython_config.py
|
|
90
|
+
|
|
91
|
+
# pyenv
|
|
92
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
93
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
94
|
+
# .python-version
|
|
95
|
+
|
|
96
|
+
# pipenv
|
|
97
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
98
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
99
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
100
|
+
# install all needed dependencies.
|
|
101
|
+
#Pipfile.lock
|
|
102
|
+
|
|
103
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
104
|
+
__pypackages__/
|
|
105
|
+
|
|
106
|
+
# Celery stuff
|
|
107
|
+
celerybeat-schedule
|
|
108
|
+
celerybeat.pid
|
|
109
|
+
|
|
110
|
+
# SageMath parsed files
|
|
111
|
+
*.sage.py
|
|
112
|
+
|
|
113
|
+
# Environments
|
|
114
|
+
.env
|
|
115
|
+
.venv
|
|
116
|
+
env/
|
|
117
|
+
venv/
|
|
118
|
+
ENV/
|
|
119
|
+
env.bak/
|
|
120
|
+
venv.bak/
|
|
121
|
+
|
|
122
|
+
# Spyder project settings
|
|
123
|
+
.spyderproject
|
|
124
|
+
.spyproject
|
|
125
|
+
|
|
126
|
+
# Rope project settings
|
|
127
|
+
.ropeproject
|
|
128
|
+
|
|
129
|
+
# mkdocs documentation
|
|
130
|
+
/site
|
|
131
|
+
|
|
132
|
+
# mypy
|
|
133
|
+
.mypy_cache/
|
|
134
|
+
.dmypy.json
|
|
135
|
+
dmypy.json
|
|
136
|
+
|
|
137
|
+
# Pyre type checker
|
|
138
|
+
.pyre/
|
|
139
|
+
|
|
140
|
+
# pytype static type analyzer
|
|
141
|
+
.pytype/
|
|
142
|
+
|
|
143
|
+
# Cython debug symbols
|
|
144
|
+
cython_debug/
|
|
145
|
+
|
|
146
|
+
# IDEA Ignores #
|
|
147
|
+
*.iml
|
|
148
|
+
*.ipr
|
|
149
|
+
*.iws
|
|
150
|
+
.idea/
|
|
151
|
+
out/
|
|
152
|
+
local.properties
|
|
153
|
+
|
|
154
|
+
# OS generated files #
|
|
155
|
+
.DS_Store
|
|
156
|
+
.DS_Store?
|
|
157
|
+
ehthumbs.db
|
|
158
|
+
Icon?
|
|
159
|
+
Thumbs.db
|
|
160
|
+
|
|
161
|
+
# Visual Studio Code
|
|
162
|
+
.vscode/*
|
|
163
|
+
!.vscode/settings.json
|
|
164
|
+
!.vscode/tasks.json
|
|
165
|
+
!.vscode/launch.json
|
|
166
|
+
!.vscode/extensions.json
|
|
167
|
+
!.vscode/scripts
|
|
168
|
+
*.code-workspace
|
|
169
|
+
|
|
170
|
+
# Local History for Visual Studio Code
|
|
171
|
+
.history/
|
|
172
|
+
|
|
173
|
+
# Vim
|
|
174
|
+
.vim
|
|
175
|
+
|
|
176
|
+
#profiling
|
|
177
|
+
profiles/
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
repos:
|
|
3
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
4
|
+
rev: v4.6.0
|
|
5
|
+
hooks:
|
|
6
|
+
- id: check-yaml
|
|
7
|
+
- id: check-json
|
|
8
|
+
- id: end-of-file-fixer
|
|
9
|
+
exclude_types:
|
|
10
|
+
- json
|
|
11
|
+
- id: trailing-whitespace
|
|
12
|
+
- id: no-commit-to-branch
|
|
13
|
+
- id: debug-statements
|
|
14
|
+
- id: requirements-txt-fixer
|
|
15
|
+
- id: check-executables-have-shebangs
|
|
16
|
+
- id: detect-private-key
|
|
17
|
+
- repo: local
|
|
18
|
+
hooks:
|
|
19
|
+
- id: update-type-stubs
|
|
20
|
+
name: Check for Type Stubs and Update Config
|
|
21
|
+
entry: ./update_precommit.py
|
|
22
|
+
language: system
|
|
23
|
+
files: ^requirements.*\.txt$
|
|
24
|
+
stages:
|
|
25
|
+
- pre-commit
|
|
26
|
+
- repo: https://github.com/PyCQA/flake8
|
|
27
|
+
rev: 7.1.1
|
|
28
|
+
hooks:
|
|
29
|
+
- id: flake8
|
|
30
|
+
- repo: https://github.com/pycqa/isort
|
|
31
|
+
rev: 5.13.2
|
|
32
|
+
hooks:
|
|
33
|
+
- id: isort
|
|
34
|
+
args:
|
|
35
|
+
- --profile
|
|
36
|
+
- black
|
|
37
|
+
- repo: https://github.com/psf/black
|
|
38
|
+
rev: 24.8.0
|
|
39
|
+
hooks:
|
|
40
|
+
- id: black
|
|
41
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
42
|
+
rev: v1.12.1
|
|
43
|
+
hooks:
|
|
44
|
+
- id: mypy
|
|
45
|
+
entry: mypy OTAnalytics tests --config-file=pyproject.toml
|
|
46
|
+
additional_dependencies:
|
|
47
|
+
- av==13.0.0
|
|
48
|
+
- black==24.8.0
|
|
49
|
+
- customtkinter==5.2.2
|
|
50
|
+
- hatch-requirements-txt==0.4.1
|
|
51
|
+
- ijson==3.3.0
|
|
52
|
+
- interrogate==1.7.0
|
|
53
|
+
- isort==5.13.2
|
|
54
|
+
- matplotlib==3.9.0
|
|
55
|
+
- more-itertools==10.5.0
|
|
56
|
+
- mypy==1.12.1
|
|
57
|
+
- numpy==1.26.4
|
|
58
|
+
- pandas-stubs==2.2.3.241126
|
|
59
|
+
- pandas==2.2.3
|
|
60
|
+
- pre-commit==4.1.0
|
|
61
|
+
- pygeos==0.14
|
|
62
|
+
- pytest-benchmark==5.1.0
|
|
63
|
+
- pytest-cov==6.0.0
|
|
64
|
+
- pytest-lazy-fixtures==1.1.2
|
|
65
|
+
- pytest==8.3.4
|
|
66
|
+
- twine==6.1.0
|
|
67
|
+
- types-PyYAML
|
|
68
|
+
- types-flake8
|
|
69
|
+
- types-openpyxl
|
|
70
|
+
- types-pillow
|
|
71
|
+
- types-seaborn
|
|
72
|
+
- types-shapely
|
|
73
|
+
- types-tqdm
|
|
74
|
+
- types-ujson
|
|
75
|
+
- yamllint==1.35.1
|
|
76
|
+
always_run: true
|
|
77
|
+
pass_filenames: false
|
|
78
|
+
- repo: https://github.com/adrienverge/yamllint.git
|
|
79
|
+
rev: v1.35.1
|
|
80
|
+
hooks:
|
|
81
|
+
- id: yamllint
|
|
82
|
+
args:
|
|
83
|
+
- -c=./.yamllint.yaml
|
|
84
|
+
- repo: https://github.com/koalaman/shellcheck-precommit
|
|
85
|
+
rev: v0.10.0
|
|
86
|
+
hooks:
|
|
87
|
+
- id: shellcheck
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<component name="ProjectRunConfigurationManager">
|
|
2
|
+
<configuration default="false" name="Scalene-CLI (benchmark)" type="PythonConfigurationType" factoryName="Python">
|
|
3
|
+
<module name="OTAnalytics" />
|
|
4
|
+
<option name="ENV_FILES" value="" />
|
|
5
|
+
<option name="INTERPRETER_OPTIONS" value="" />
|
|
6
|
+
<option name="PARENT_ENVS" value="true" />
|
|
7
|
+
<envs>
|
|
8
|
+
<env name="PYTHONUNBUFFERED" value="1" />
|
|
9
|
+
</envs>
|
|
10
|
+
<option name="SDK_HOME" value="" />
|
|
11
|
+
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
|
12
|
+
<option name="IS_MODULE_SDK" value="true" />
|
|
13
|
+
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
14
|
+
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
15
|
+
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
|
16
|
+
<option name="SCRIPT_NAME" value="scalene" />
|
|
17
|
+
<option name="PARAMETERS" value="--- $PROJECT_DIR$/OTAnalytics/__main__.py --cli --config "tests/data/OTCamera19_FR20_2023-05-24.otconfig" --logfile_overwrite" />
|
|
18
|
+
<option name="SHOW_COMMAND_LINE" value="false" />
|
|
19
|
+
<option name="EMULATE_TERMINAL" value="false" />
|
|
20
|
+
<option name="MODULE_MODE" value="true" />
|
|
21
|
+
<option name="REDIRECT_INPUT" value="false" />
|
|
22
|
+
<option name="INPUT_FILE" value="" />
|
|
23
|
+
<method v="2" />
|
|
24
|
+
</configuration>
|
|
25
|
+
</component>
|