pywats-api 0.1.0b2__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.
- pywats_api-0.1.0b2/CHANGELOG.md +72 -0
- pywats_api-0.1.0b2/LICENSE +21 -0
- pywats_api-0.1.0b2/MANIFEST.in +53 -0
- pywats_api-0.1.0b2/PKG-INFO +316 -0
- pywats_api-0.1.0b2/README.md +240 -0
- pywats_api-0.1.0b2/pyproject.toml +130 -0
- pywats_api-0.1.0b2/setup.cfg +4 -0
- pywats_api-0.1.0b2/src/main.py +11 -0
- pywats_api-0.1.0b2/src/pywats/__init__.py +120 -0
- pywats_api-0.1.0b2/src/pywats/core/__init__.py +83 -0
- pywats_api-0.1.0b2/src/pywats/core/client.py +291 -0
- pywats_api-0.1.0b2/src/pywats/core/config.py +282 -0
- pywats_api-0.1.0b2/src/pywats/core/exceptions.py +401 -0
- pywats_api-0.1.0b2/src/pywats/core/logging.py +70 -0
- pywats_api-0.1.0b2/src/pywats/core/station.py +458 -0
- pywats_api-0.1.0b2/src/pywats/domains/__init__.py +31 -0
- pywats_api-0.1.0b2/src/pywats/domains/app/__init__.py +23 -0
- pywats_api-0.1.0b2/src/pywats/domains/app/enums.py +29 -0
- pywats_api-0.1.0b2/src/pywats/domains/app/models.py +115 -0
- pywats_api-0.1.0b2/src/pywats/domains/app/repository.py +624 -0
- pywats_api-0.1.0b2/src/pywats/domains/app/service.py +420 -0
- pywats_api-0.1.0b2/src/pywats/domains/asset/__init__.py +27 -0
- pywats_api-0.1.0b2/src/pywats/domains/asset/enums.py +67 -0
- pywats_api-0.1.0b2/src/pywats/domains/asset/models.py +245 -0
- pywats_api-0.1.0b2/src/pywats/domains/asset/repository.py +650 -0
- pywats_api-0.1.0b2/src/pywats/domains/asset/repository_internal.py +212 -0
- pywats_api-0.1.0b2/src/pywats/domains/asset/service.py +748 -0
- pywats_api-0.1.0b2/src/pywats/domains/asset/service_internal.py +182 -0
- pywats_api-0.1.0b2/src/pywats/domains/process/__init__.py +29 -0
- pywats_api-0.1.0b2/src/pywats/domains/process/models.py +86 -0
- pywats_api-0.1.0b2/src/pywats/domains/process/repository.py +57 -0
- pywats_api-0.1.0b2/src/pywats/domains/process/repository_internal.py +169 -0
- pywats_api-0.1.0b2/src/pywats/domains/process/service.py +295 -0
- pywats_api-0.1.0b2/src/pywats/domains/process/service_internal.py +210 -0
- pywats_api-0.1.0b2/src/pywats/domains/product/__init__.py +42 -0
- pywats_api-0.1.0b2/src/pywats/domains/product/box_build.py +502 -0
- pywats_api-0.1.0b2/src/pywats/domains/product/enums.py +8 -0
- pywats_api-0.1.0b2/src/pywats/domains/product/models.py +366 -0
- pywats_api-0.1.0b2/src/pywats/domains/product/repository.py +536 -0
- pywats_api-0.1.0b2/src/pywats/domains/product/repository_internal.py +355 -0
- pywats_api-0.1.0b2/src/pywats/domains/product/service.py +576 -0
- pywats_api-0.1.0b2/src/pywats/domains/product/service_internal.py +352 -0
- pywats_api-0.1.0b2/src/pywats/domains/production/__init__.py +37 -0
- pywats_api-0.1.0b2/src/pywats/domains/production/enums.py +38 -0
- pywats_api-0.1.0b2/src/pywats/domains/production/models.py +366 -0
- pywats_api-0.1.0b2/src/pywats/domains/production/repository.py +646 -0
- pywats_api-0.1.0b2/src/pywats/domains/production/repository_internal.py +76 -0
- pywats_api-0.1.0b2/src/pywats/domains/production/service.py +645 -0
- pywats_api-0.1.0b2/src/pywats/domains/production/service_internal.py +87 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/__init__.py +70 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/enums.py +13 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/models.py +235 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/__init__.py +38 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/additional_data.py +96 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/asset.py +63 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/attachment.py +25 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/binary_data.py +35 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/chart.py +97 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/common_types.py +7 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/constants.py +3 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/deserialization_context.py +11 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/misc_info.py +36 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/report.py +164 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/report_info.py +19 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/sub_unit.py +29 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uur/UUR_IMPLEMENTATION_INSTRUCTIONS.md +255 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uur/__init__.py +41 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uur/fail_code.py +232 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uur/failure.py +422 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uur/misc_uur_info.py +323 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uur/sub_repair.py +31 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uur/uur_attachment.py +274 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uur/uur_info.py +291 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uur/uur_part_info.py +269 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uur/uur_report.py +653 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uur/uur_sub_unit.py +169 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uut/__init__.py +17 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uut/step.py +153 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uut/steps/__init__.py +29 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uut/steps/action_step.py +29 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uut/steps/boolean_step.py +94 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uut/steps/callexe_step.py +31 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uut/steps/chart_step.py +29 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uut/steps/comp_operator.py +77 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uut/steps/generic_step.py +97 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uut/steps/measurement.py +62 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uut/steps/message_popup_step.py +31 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uut/steps/numeric_step.py +162 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uut/steps/sequence_call.py +333 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uut/steps/string_step.py +92 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uut/uut_info.py +43 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/uut/uut_report.py +30 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/report_models/wats_base.py +56 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/repository.py +325 -0
- pywats_api-0.1.0b2/src/pywats/domains/report/service.py +781 -0
- pywats_api-0.1.0b2/src/pywats/domains/rootcause/__init__.py +28 -0
- pywats_api-0.1.0b2/src/pywats/domains/rootcause/enums.py +45 -0
- pywats_api-0.1.0b2/src/pywats/domains/rootcause/models.py +130 -0
- pywats_api-0.1.0b2/src/pywats/domains/rootcause/repository.py +205 -0
- pywats_api-0.1.0b2/src/pywats/domains/rootcause/service.py +282 -0
- pywats_api-0.1.0b2/src/pywats/domains/software/__init__.py +21 -0
- pywats_api-0.1.0b2/src/pywats/domains/software/enums.py +14 -0
- pywats_api-0.1.0b2/src/pywats/domains/software/models.py +150 -0
- pywats_api-0.1.0b2/src/pywats/domains/software/repository.py +363 -0
- pywats_api-0.1.0b2/src/pywats/domains/software/service.py +362 -0
- pywats_api-0.1.0b2/src/pywats/exceptions.py +70 -0
- pywats_api-0.1.0b2/src/pywats/models/__init__.py +52 -0
- pywats_api-0.1.0b2/src/pywats/pywats.py +518 -0
- pywats_api-0.1.0b2/src/pywats/shared/__init__.py +12 -0
- pywats_api-0.1.0b2/src/pywats/shared/base_model.py +20 -0
- pywats_api-0.1.0b2/src/pywats/shared/common_types.py +31 -0
- pywats_api-0.1.0b2/src/pywats/tools/__init__.py +7 -0
- pywats_api-0.1.0b2/src/pywats/tools/test_uut.py +506 -0
- pywats_api-0.1.0b2/src/pywats_api.egg-info/PKG-INFO +316 -0
- pywats_api-0.1.0b2/src/pywats_api.egg-info/SOURCES.txt +193 -0
- pywats_api-0.1.0b2/src/pywats_api.egg-info/dependency_links.txt +1 -0
- pywats_api-0.1.0b2/src/pywats_api.egg-info/entry_points.txt +3 -0
- pywats_api-0.1.0b2/src/pywats_api.egg-info/requires.txt +28 -0
- pywats_api-0.1.0b2/src/pywats_api.egg-info/top_level.txt +3 -0
- pywats_api-0.1.0b2/src/pywats_client/GUI_CONFIGURATION.md +267 -0
- pywats_api-0.1.0b2/src/pywats_client/GUI_REDESIGN.md +2 -0
- pywats_api-0.1.0b2/src/pywats_client/__init__.py +115 -0
- pywats_api-0.1.0b2/src/pywats_client/__main__.py +195 -0
- pywats_api-0.1.0b2/src/pywats_client/app.py +431 -0
- pywats_api-0.1.0b2/src/pywats_client/control/HEADLESS_GUIDE.md +295 -0
- pywats_api-0.1.0b2/src/pywats_client/control/__init__.py +31 -0
- pywats_api-0.1.0b2/src/pywats_client/control/cli.py +536 -0
- pywats_api-0.1.0b2/src/pywats_client/control/http_api.py +458 -0
- pywats_api-0.1.0b2/src/pywats_client/control/service.py +477 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/WATS Standard Converters/Data/WATS - WSJF UUR Example file.json +137 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/WATS Standard Converters/Data/WATS - WSJF UUT Example file Bare Minimum.json +242 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/__init__.py +109 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/base.py +828 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/context.py +374 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/example_csv.py +147 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/example_csv_v2.py +289 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/file_converter.py +481 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/folder_converter.py +523 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/models.py +632 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/scheduled_converter.py +530 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/standard/__init__.py +30 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/standard/kitron_seica_xml_converter.py +438 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/standard/kitron_seica_xml_converter_v2.py +401 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/standard/teradyne_ict_converter.py +813 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/standard/teradyne_ict_converter_v2.py +805 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/standard/teradyne_spectrum_ict_converter.py +794 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/standard/teradyne_spectrum_ict_converter_v2.py +757 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/standard/wats_standard_json_converter.py +463 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/standard/wats_standard_text_converter.py +693 -0
- pywats_api-0.1.0b2/src/pywats_client/converters/standard/wats_standard_xml_converter.py +597 -0
- pywats_api-0.1.0b2/src/pywats_client/core/__init__.py +14 -0
- pywats_api-0.1.0b2/src/pywats_client/core/client.py +346 -0
- pywats_api-0.1.0b2/src/pywats_client/core/config.py +613 -0
- pywats_api-0.1.0b2/src/pywats_client/core/connection_config.py +213 -0
- pywats_api-0.1.0b2/src/pywats_client/core/encryption.py +186 -0
- pywats_api-0.1.0b2/src/pywats_client/core/instance_manager.py +226 -0
- pywats_api-0.1.0b2/src/pywats_client/examples/service_application.py +404 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/__init__.py +15 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/app.py +132 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/login_window.py +404 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/main_window.py +819 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/pages/__init__.py +37 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/pages/about.py +146 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/pages/asset.py +540 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/pages/base.py +64 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/pages/connection.py +298 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/pages/converters.py +853 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/pages/general.py +147 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/pages/location.py +99 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/pages/log.py +206 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/pages/product.py +1003 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/pages/production.py +563 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/pages/proxy_settings.py +177 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/pages/rootcause.py +648 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/pages/setup.py +768 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/pages/sn_handler.py +508 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/pages/software.py +671 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/settings_dialog.py +1458 -0
- pywats_api-0.1.0b2/src/pywats_client/gui/styles.py +376 -0
- pywats_api-0.1.0b2/src/pywats_client/services/__init__.py +16 -0
- pywats_api-0.1.0b2/src/pywats_client/services/connection.py +425 -0
- pywats_api-0.1.0b2/src/pywats_client/services/converter_manager.py +305 -0
- pywats_api-0.1.0b2/src/pywats_client/services/converter_manager_v2.py +840 -0
- pywats_api-0.1.0b2/src/pywats_client/services/converter_processor.py +493 -0
- pywats_api-0.1.0b2/src/pywats_client/services/converter_processor_v2.py +847 -0
- pywats_api-0.1.0b2/src/pywats_client/services/file_monitor.py +358 -0
- pywats_api-0.1.0b2/src/pywats_client/services/process_sync.py +231 -0
- pywats_api-0.1.0b2/src/pywats_client/services/report_queue.py +362 -0
- pywats_api-0.1.0b2/src/pywats_client/services/serial_manager.py +329 -0
- pywats_api-0.1.0b2/src/pywats_client/services/settings_manager.py +398 -0
- pywats_api-0.1.0b2/src/pywats_client/services/windows_service.py +232 -0
- pywats_api-0.1.0b2/src/pywats_mcp/README.md +170 -0
- pywats_api-0.1.0b2/src/pywats_mcp/__init__.py +7 -0
- pywats_api-0.1.0b2/src/pywats_mcp/__main__.py +16 -0
- pywats_api-0.1.0b2/src/pywats_mcp/server.py +1147 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to pyWATS will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.0b2] - 2025-12-15
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **Architecture Refactoring** - Internal API separation
|
|
15
|
+
- All internal endpoint implementations now in separate `_internal` files
|
|
16
|
+
- New `AssetRepositoryInternal` and `AssetServiceInternal` for file operations
|
|
17
|
+
- New `ProductionRepositoryInternal` and `ProductionServiceInternal` for MES operations
|
|
18
|
+
- Public repositories delegate to internal repositories for internal endpoints
|
|
19
|
+
- Added `api.asset_internal` for asset file operations (upload, download, list, delete)
|
|
20
|
+
- Added `api.production_internal` for MES unit phases
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- CompOp export path handling for None values
|
|
25
|
+
- TestInstanceConfig field mapping for process_code/test_operation
|
|
26
|
+
|
|
27
|
+
## [0.1.0b1] - 2025-12-14
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- **pyWATS API Library** (`pywats`)
|
|
32
|
+
- Product management (get, create, update products and revisions)
|
|
33
|
+
- Asset management (equipment tracking, calibration, maintenance)
|
|
34
|
+
- Report submission and querying (UUT/UUR reports in WSJF format)
|
|
35
|
+
- Production/serial number management (units, batches, assemblies)
|
|
36
|
+
- RootCause ticket system (issue tracking and resolution)
|
|
37
|
+
- Software distribution (package management, releases)
|
|
38
|
+
- Statistics and analytics endpoints
|
|
39
|
+
- Station concept for multi-station deployments
|
|
40
|
+
|
|
41
|
+
- **pyWATS Client Application** (`pywats_client`)
|
|
42
|
+
- Desktop GUI mode (PySide6/Qt)
|
|
43
|
+
- Headless mode for servers and embedded systems (Raspberry Pi)
|
|
44
|
+
- Connection management with encrypted token storage
|
|
45
|
+
- Converter framework for custom file format processing
|
|
46
|
+
- Report queue with offline support
|
|
47
|
+
- HTTP control API for remote management
|
|
48
|
+
|
|
49
|
+
- **Developer Features**
|
|
50
|
+
- Comprehensive type hints throughout
|
|
51
|
+
- Pydantic models for data validation
|
|
52
|
+
- Structured logging with debug mode
|
|
53
|
+
- Async-ready architecture
|
|
54
|
+
|
|
55
|
+
### Requirements
|
|
56
|
+
|
|
57
|
+
- Python 3.8 or later
|
|
58
|
+
- **WATS Server 2025.3.9.824 or later**
|
|
59
|
+
|
|
60
|
+
### Notes
|
|
61
|
+
|
|
62
|
+
This is a **beta release**. The API is stabilizing but may have breaking changes
|
|
63
|
+
before the 1.0 release. Please report issues on GitHub.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Version History
|
|
68
|
+
|
|
69
|
+
| Version | Date | Status |
|
|
70
|
+
|---------|------|--------|
|
|
71
|
+
| 0.1.0b2 | 2025-12-15 | Beta - Architecture refactoring |
|
|
72
|
+
| 0.1.0b1 | 2025-12-14 | Beta - Initial public release |
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-2025 Virinco AS
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# MANIFEST.in - Controls what goes into source distribution (sdist)
|
|
2
|
+
|
|
3
|
+
# Include essential files
|
|
4
|
+
include LICENSE
|
|
5
|
+
include README.md
|
|
6
|
+
include CHANGELOG.md
|
|
7
|
+
include pyproject.toml
|
|
8
|
+
|
|
9
|
+
# Include all source code
|
|
10
|
+
recursive-include src *.py
|
|
11
|
+
recursive-include src *.pyi
|
|
12
|
+
recursive-include src *.typed
|
|
13
|
+
|
|
14
|
+
# Include package data
|
|
15
|
+
recursive-include src *.json
|
|
16
|
+
recursive-include src *.md
|
|
17
|
+
|
|
18
|
+
# Exclude tests and development files
|
|
19
|
+
prune tests
|
|
20
|
+
prune converters
|
|
21
|
+
prune scripts
|
|
22
|
+
prune docs
|
|
23
|
+
prune .github
|
|
24
|
+
prune examples
|
|
25
|
+
|
|
26
|
+
# Exclude specific files
|
|
27
|
+
exclude .env
|
|
28
|
+
exclude .env.template
|
|
29
|
+
exclude .flake8
|
|
30
|
+
exclude pytest.ini
|
|
31
|
+
exclude .coverage
|
|
32
|
+
exclude pywats.log
|
|
33
|
+
|
|
34
|
+
# Exclude all markdown files in root except README and CHANGELOG
|
|
35
|
+
exclude ARCHITECTURE_*.md
|
|
36
|
+
exclude CLIENT_*.md
|
|
37
|
+
exclude CLOUD_*.md
|
|
38
|
+
exclude CONVERTER_*.md
|
|
39
|
+
exclude CRITICAL_*.md
|
|
40
|
+
exclude ENVIRONMENT_*.md
|
|
41
|
+
exclude LOGGING_*.md
|
|
42
|
+
exclude PRODUCTION_*.md
|
|
43
|
+
exclude QUICK_REFERENCE.md
|
|
44
|
+
exclude RELEASE_PREPARATION.md
|
|
45
|
+
exclude TIMEZONE_*.md
|
|
46
|
+
|
|
47
|
+
# Exclude build artifacts
|
|
48
|
+
global-exclude *.pyc
|
|
49
|
+
global-exclude *.pyo
|
|
50
|
+
global-exclude __pycache__
|
|
51
|
+
global-exclude *.so
|
|
52
|
+
global-exclude .DS_Store
|
|
53
|
+
global-exclude *.egg-info
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pywats-api
|
|
3
|
+
Version: 0.1.0b2
|
|
4
|
+
Summary: Python API library for WATS (Web-based Automated Test System) - manufacturing test data management
|
|
5
|
+
Author-email: Virinco AS <support@virinco.com>
|
|
6
|
+
Maintainer-email: Virinco AS <support@virinco.com>
|
|
7
|
+
License: MIT License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2024-2025 Virinco AS
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
|
28
|
+
|
|
29
|
+
Project-URL: Homepage, https://github.com/olreppe/pyWATS
|
|
30
|
+
Project-URL: Documentation, https://github.com/olreppe/pyWATS#readme
|
|
31
|
+
Project-URL: Repository, https://github.com/olreppe/pyWATS
|
|
32
|
+
Project-URL: Issues, https://github.com/olreppe/pyWATS/issues
|
|
33
|
+
Project-URL: Changelog, https://github.com/olreppe/pyWATS/blob/main/CHANGELOG.md
|
|
34
|
+
Keywords: wats,test-automation,manufacturing,test-data,api,virinco
|
|
35
|
+
Classifier: Development Status :: 4 - Beta
|
|
36
|
+
Classifier: Intended Audience :: Developers
|
|
37
|
+
Classifier: Intended Audience :: Manufacturing
|
|
38
|
+
Classifier: Topic :: Software Development :: Testing
|
|
39
|
+
Classifier: Topic :: Scientific/Engineering
|
|
40
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
41
|
+
Classifier: Programming Language :: Python :: 3
|
|
42
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
43
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
44
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
45
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
46
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
47
|
+
Classifier: Operating System :: OS Independent
|
|
48
|
+
Classifier: Typing :: Typed
|
|
49
|
+
Requires-Python: >=3.8
|
|
50
|
+
Description-Content-Type: text/markdown
|
|
51
|
+
License-File: LICENSE
|
|
52
|
+
Requires-Dist: httpx>=0.24.0
|
|
53
|
+
Requires-Dist: pydantic>=2.0.0
|
|
54
|
+
Requires-Dist: python-dateutil>=2.8.0
|
|
55
|
+
Requires-Dist: attrs>=22.0.0
|
|
56
|
+
Provides-Extra: client
|
|
57
|
+
Requires-Dist: PySide6>=6.4.0; extra == "client"
|
|
58
|
+
Requires-Dist: watchdog>=3.0.0; extra == "client"
|
|
59
|
+
Requires-Dist: aiofiles>=23.0.0; extra == "client"
|
|
60
|
+
Provides-Extra: client-headless
|
|
61
|
+
Requires-Dist: watchdog>=3.0.0; extra == "client-headless"
|
|
62
|
+
Requires-Dist: aiofiles>=23.0.0; extra == "client-headless"
|
|
63
|
+
Provides-Extra: mcp
|
|
64
|
+
Requires-Dist: mcp>=1.0.0; extra == "mcp"
|
|
65
|
+
Provides-Extra: dev
|
|
66
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
67
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
68
|
+
Requires-Dist: black>=22.0; extra == "dev"
|
|
69
|
+
Requires-Dist: isort>=5.0; extra == "dev"
|
|
70
|
+
Requires-Dist: flake8>=5.0; extra == "dev"
|
|
71
|
+
Requires-Dist: mypy>=1.0; extra == "dev"
|
|
72
|
+
Provides-Extra: docs
|
|
73
|
+
Requires-Dist: sphinx>=5.0; extra == "docs"
|
|
74
|
+
Requires-Dist: sphinx-rtd-theme>=1.0; extra == "docs"
|
|
75
|
+
Dynamic: license-file
|
|
76
|
+
|
|
77
|
+
# pyWATS
|
|
78
|
+
|
|
79
|
+
[](https://badge.fury.io/py/pywats-api)
|
|
80
|
+
[](https://www.python.org/downloads/)
|
|
81
|
+
[](https://opensource.org/licenses/MIT)
|
|
82
|
+
|
|
83
|
+
A Python library for interacting with the [WATS](https://wats.com) (Web-based Automated Test System) API.
|
|
84
|
+
|
|
85
|
+
> **⚠️ Beta Release**: This is a beta version. The API is stabilizing but may have changes before 1.0.
|
|
86
|
+
|
|
87
|
+
## Requirements
|
|
88
|
+
|
|
89
|
+
- **Python 3.8** or later
|
|
90
|
+
- **WATS Server 2025.3.9.824** or later
|
|
91
|
+
|
|
92
|
+
## Features
|
|
93
|
+
|
|
94
|
+
- **pyWATS Library** - Core API library for WATS integration
|
|
95
|
+
- Product management
|
|
96
|
+
- Asset management
|
|
97
|
+
- Report creation and submission
|
|
98
|
+
- Production/serial number management
|
|
99
|
+
- RootCause ticket system
|
|
100
|
+
- Software distribution
|
|
101
|
+
- Statistics and analytics
|
|
102
|
+
|
|
103
|
+
- **pyWATS Client** - Desktop and headless client application
|
|
104
|
+
- Connection management
|
|
105
|
+
- Converter configuration
|
|
106
|
+
- Report queue management
|
|
107
|
+
- **GUI Mode**: Qt-based desktop application (Windows, macOS, Linux)
|
|
108
|
+
- **Headless Mode**: CLI and HTTP API for servers, Raspberry Pi, embedded systems
|
|
109
|
+
|
|
110
|
+
## Installation
|
|
111
|
+
|
|
112
|
+
### From PyPI (Recommended)
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Install core API library only
|
|
116
|
+
pip install pywats-api
|
|
117
|
+
|
|
118
|
+
# Install with GUI client (requires Qt)
|
|
119
|
+
pip install pywats-api[client]
|
|
120
|
+
|
|
121
|
+
# Install headless client (no Qt - for Raspberry Pi, servers)
|
|
122
|
+
pip install pywats-api[client-headless]
|
|
123
|
+
|
|
124
|
+
# Install with MCP server (for AI assistant integration)
|
|
125
|
+
pip install pywats-api[mcp]
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### From Source (Development)
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Clone the repository
|
|
132
|
+
git clone https://github.com/olreppe/pyWATS.git
|
|
133
|
+
cd pyWATS
|
|
134
|
+
|
|
135
|
+
# Create virtual environment
|
|
136
|
+
python -m venv .venv
|
|
137
|
+
.venv\Scripts\activate # Windows
|
|
138
|
+
source .venv/bin/activate # Linux/Mac
|
|
139
|
+
|
|
140
|
+
# Install in development mode
|
|
141
|
+
pip install -e ".[dev]"
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Configuration
|
|
145
|
+
|
|
146
|
+
Create a configuration with your WATS credentials:
|
|
147
|
+
|
|
148
|
+
```python
|
|
149
|
+
from pywats import pyWATS
|
|
150
|
+
|
|
151
|
+
api = pyWATS(
|
|
152
|
+
base_url="https://your-server.wats.com",
|
|
153
|
+
token="your_base64_encoded_token"
|
|
154
|
+
)
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Or use environment variables:
|
|
158
|
+
|
|
159
|
+
```env
|
|
160
|
+
WATS_BASE_URL=https://your-server.wats.com
|
|
161
|
+
WATS_AUTH_TOKEN=your_base64_encoded_token
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Quick Start
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
from pywats import pyWATS, WATSFilter
|
|
168
|
+
|
|
169
|
+
# Initialize API
|
|
170
|
+
api = pyWATS(
|
|
171
|
+
base_url="https://your-server.wats.com",
|
|
172
|
+
token="your_token"
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
# Test connection
|
|
176
|
+
if api.test_connection():
|
|
177
|
+
print(f"Connected! Server version: {api.get_version()}")
|
|
178
|
+
|
|
179
|
+
# Get products
|
|
180
|
+
products = api.product.get_products()
|
|
181
|
+
for p in products:
|
|
182
|
+
print(f"{p.part_number}: {p.name}")
|
|
183
|
+
|
|
184
|
+
# Query recent reports
|
|
185
|
+
filter = WATSFilter(top_count=10)
|
|
186
|
+
headers = api.report.query_uut_headers(filter)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Enable Debug Logging
|
|
190
|
+
|
|
191
|
+
```python
|
|
192
|
+
from pywats import pyWATS, enable_debug_logging
|
|
193
|
+
|
|
194
|
+
# Quick debug mode - shows all library operations
|
|
195
|
+
enable_debug_logging()
|
|
196
|
+
|
|
197
|
+
# Or configure logging your way
|
|
198
|
+
import logging
|
|
199
|
+
logging.basicConfig(level=logging.INFO)
|
|
200
|
+
logging.getLogger('pywats').setLevel(logging.DEBUG)
|
|
201
|
+
|
|
202
|
+
# Now use the API with detailed logging
|
|
203
|
+
api = pyWATS(base_url="...", token="...")
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
See [LOGGING_STRATEGY.md](LOGGING_STRATEGY.md) for comprehensive logging documentation.
|
|
207
|
+
|
|
208
|
+
## Running the GUI Client
|
|
209
|
+
|
|
210
|
+
```bash
|
|
211
|
+
python -m pywats_client
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### GUI Configuration
|
|
215
|
+
|
|
216
|
+
The GUI supports modular tab configuration and logging control:
|
|
217
|
+
|
|
218
|
+
- **Tab Visibility**: Show/hide tabs (Software, SN Handler, etc.) based on your needs
|
|
219
|
+
- **Logging Integration**: Automatic pyWATS library logging when debug mode is enabled
|
|
220
|
+
- **Multiple Instances**: Run multiple client instances with separate configurations
|
|
221
|
+
|
|
222
|
+
See [GUI Configuration Guide](src/pywats_client/GUI_CONFIGURATION.md) for detailed setup instructions.
|
|
223
|
+
|
|
224
|
+
## Running Headless (Raspberry Pi, Servers)
|
|
225
|
+
|
|
226
|
+
For systems without display or Qt support:
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
# Initialize configuration
|
|
230
|
+
pywats-client config init
|
|
231
|
+
|
|
232
|
+
# Test connection
|
|
233
|
+
pywats-client test-connection
|
|
234
|
+
|
|
235
|
+
# Run service with HTTP control API
|
|
236
|
+
pywats-client start --api --api-port 8765
|
|
237
|
+
|
|
238
|
+
# Run as daemon (Linux)
|
|
239
|
+
pywats-client start --daemon
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### CLI Commands
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
pywats-client config show # Show configuration
|
|
246
|
+
pywats-client config set key value # Set config value
|
|
247
|
+
pywats-client status # Show service status
|
|
248
|
+
pywats-client converters list # List converters
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### HTTP Control API
|
|
252
|
+
|
|
253
|
+
When running with `--api`, manage the service remotely:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
curl http://localhost:8765/status # Get status
|
|
257
|
+
curl http://localhost:8765/config # Get configuration
|
|
258
|
+
curl -X POST http://localhost:8765/restart # Restart services
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
See [Headless Operation Guide](src/pywats_client/control/HEADLESS_GUIDE.md) for complete documentation.
|
|
262
|
+
|
|
263
|
+
## Project Structure
|
|
264
|
+
|
|
265
|
+
```
|
|
266
|
+
pyWATS/
|
|
267
|
+
├── src/
|
|
268
|
+
│ ├── pywats/ # Core library
|
|
269
|
+
│ │ ├── models/ # Pydantic data models
|
|
270
|
+
│ │ ├── modules/ # High-level API modules
|
|
271
|
+
│ │ └── rest_api/ # REST API wrappers
|
|
272
|
+
│ └── pywats_client/ # Client application
|
|
273
|
+
│ ├── core/ # Core client functionality
|
|
274
|
+
│ ├── gui/ # Qt GUI components (optional)
|
|
275
|
+
│ ├── control/ # Headless control (CLI, HTTP API)
|
|
276
|
+
│ └── services/ # Background services
|
|
277
|
+
├── converters/ # User converter plugins
|
|
278
|
+
├── docs/ # Documentation
|
|
279
|
+
│ ├── api_specs/ # OpenAPI specifications
|
|
280
|
+
│ ├── examples/ # Usage examples
|
|
281
|
+
│ └── gui_screens/ # GUI screenshots
|
|
282
|
+
├── pyproject.toml # Project configuration
|
|
283
|
+
└── requirements.txt # Dependencies
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## Documentation
|
|
287
|
+
|
|
288
|
+
- [Architecture Overview](docs/ARCHITECTURE.md) - System design and layered architecture
|
|
289
|
+
- [Report Module](docs/usage/REPORT_MODULE.md) - Test reports and factory methods
|
|
290
|
+
- [Product Module](docs/usage/PRODUCT_MODULE.md) - Product/BOM management
|
|
291
|
+
- [Production Module](docs/usage/PRODUCTION_MODULE.md) - Serial number and unit tracking
|
|
292
|
+
|
|
293
|
+
## Testing
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
# Run all tests
|
|
297
|
+
pytest
|
|
298
|
+
|
|
299
|
+
# Run with coverage
|
|
300
|
+
pytest --cov=src --cov-report=html
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
## Contributing
|
|
304
|
+
|
|
305
|
+
This project is maintained by [Virinco AS](https://virinco.com).
|
|
306
|
+
|
|
307
|
+
## License
|
|
308
|
+
|
|
309
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
310
|
+
|
|
311
|
+
## Links
|
|
312
|
+
|
|
313
|
+
- [WATS Website](https://wats.com)
|
|
314
|
+
- [Virinco](https://virinco.com)
|
|
315
|
+
- [GitHub Repository](https://github.com/olreppe/pyWATS)
|
|
316
|
+
- [Changelog](CHANGELOG.md)
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
# pyWATS
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/py/pywats-api)
|
|
4
|
+
[](https://www.python.org/downloads/)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
7
|
+
A Python library for interacting with the [WATS](https://wats.com) (Web-based Automated Test System) API.
|
|
8
|
+
|
|
9
|
+
> **⚠️ Beta Release**: This is a beta version. The API is stabilizing but may have changes before 1.0.
|
|
10
|
+
|
|
11
|
+
## Requirements
|
|
12
|
+
|
|
13
|
+
- **Python 3.8** or later
|
|
14
|
+
- **WATS Server 2025.3.9.824** or later
|
|
15
|
+
|
|
16
|
+
## Features
|
|
17
|
+
|
|
18
|
+
- **pyWATS Library** - Core API library for WATS integration
|
|
19
|
+
- Product management
|
|
20
|
+
- Asset management
|
|
21
|
+
- Report creation and submission
|
|
22
|
+
- Production/serial number management
|
|
23
|
+
- RootCause ticket system
|
|
24
|
+
- Software distribution
|
|
25
|
+
- Statistics and analytics
|
|
26
|
+
|
|
27
|
+
- **pyWATS Client** - Desktop and headless client application
|
|
28
|
+
- Connection management
|
|
29
|
+
- Converter configuration
|
|
30
|
+
- Report queue management
|
|
31
|
+
- **GUI Mode**: Qt-based desktop application (Windows, macOS, Linux)
|
|
32
|
+
- **Headless Mode**: CLI and HTTP API for servers, Raspberry Pi, embedded systems
|
|
33
|
+
|
|
34
|
+
## Installation
|
|
35
|
+
|
|
36
|
+
### From PyPI (Recommended)
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Install core API library only
|
|
40
|
+
pip install pywats-api
|
|
41
|
+
|
|
42
|
+
# Install with GUI client (requires Qt)
|
|
43
|
+
pip install pywats-api[client]
|
|
44
|
+
|
|
45
|
+
# Install headless client (no Qt - for Raspberry Pi, servers)
|
|
46
|
+
pip install pywats-api[client-headless]
|
|
47
|
+
|
|
48
|
+
# Install with MCP server (for AI assistant integration)
|
|
49
|
+
pip install pywats-api[mcp]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### From Source (Development)
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# Clone the repository
|
|
56
|
+
git clone https://github.com/olreppe/pyWATS.git
|
|
57
|
+
cd pyWATS
|
|
58
|
+
|
|
59
|
+
# Create virtual environment
|
|
60
|
+
python -m venv .venv
|
|
61
|
+
.venv\Scripts\activate # Windows
|
|
62
|
+
source .venv/bin/activate # Linux/Mac
|
|
63
|
+
|
|
64
|
+
# Install in development mode
|
|
65
|
+
pip install -e ".[dev]"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Configuration
|
|
69
|
+
|
|
70
|
+
Create a configuration with your WATS credentials:
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
from pywats import pyWATS
|
|
74
|
+
|
|
75
|
+
api = pyWATS(
|
|
76
|
+
base_url="https://your-server.wats.com",
|
|
77
|
+
token="your_base64_encoded_token"
|
|
78
|
+
)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Or use environment variables:
|
|
82
|
+
|
|
83
|
+
```env
|
|
84
|
+
WATS_BASE_URL=https://your-server.wats.com
|
|
85
|
+
WATS_AUTH_TOKEN=your_base64_encoded_token
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Quick Start
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
from pywats import pyWATS, WATSFilter
|
|
92
|
+
|
|
93
|
+
# Initialize API
|
|
94
|
+
api = pyWATS(
|
|
95
|
+
base_url="https://your-server.wats.com",
|
|
96
|
+
token="your_token"
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
# Test connection
|
|
100
|
+
if api.test_connection():
|
|
101
|
+
print(f"Connected! Server version: {api.get_version()}")
|
|
102
|
+
|
|
103
|
+
# Get products
|
|
104
|
+
products = api.product.get_products()
|
|
105
|
+
for p in products:
|
|
106
|
+
print(f"{p.part_number}: {p.name}")
|
|
107
|
+
|
|
108
|
+
# Query recent reports
|
|
109
|
+
filter = WATSFilter(top_count=10)
|
|
110
|
+
headers = api.report.query_uut_headers(filter)
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Enable Debug Logging
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
from pywats import pyWATS, enable_debug_logging
|
|
117
|
+
|
|
118
|
+
# Quick debug mode - shows all library operations
|
|
119
|
+
enable_debug_logging()
|
|
120
|
+
|
|
121
|
+
# Or configure logging your way
|
|
122
|
+
import logging
|
|
123
|
+
logging.basicConfig(level=logging.INFO)
|
|
124
|
+
logging.getLogger('pywats').setLevel(logging.DEBUG)
|
|
125
|
+
|
|
126
|
+
# Now use the API with detailed logging
|
|
127
|
+
api = pyWATS(base_url="...", token="...")
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
See [LOGGING_STRATEGY.md](LOGGING_STRATEGY.md) for comprehensive logging documentation.
|
|
131
|
+
|
|
132
|
+
## Running the GUI Client
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
python -m pywats_client
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### GUI Configuration
|
|
139
|
+
|
|
140
|
+
The GUI supports modular tab configuration and logging control:
|
|
141
|
+
|
|
142
|
+
- **Tab Visibility**: Show/hide tabs (Software, SN Handler, etc.) based on your needs
|
|
143
|
+
- **Logging Integration**: Automatic pyWATS library logging when debug mode is enabled
|
|
144
|
+
- **Multiple Instances**: Run multiple client instances with separate configurations
|
|
145
|
+
|
|
146
|
+
See [GUI Configuration Guide](src/pywats_client/GUI_CONFIGURATION.md) for detailed setup instructions.
|
|
147
|
+
|
|
148
|
+
## Running Headless (Raspberry Pi, Servers)
|
|
149
|
+
|
|
150
|
+
For systems without display or Qt support:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Initialize configuration
|
|
154
|
+
pywats-client config init
|
|
155
|
+
|
|
156
|
+
# Test connection
|
|
157
|
+
pywats-client test-connection
|
|
158
|
+
|
|
159
|
+
# Run service with HTTP control API
|
|
160
|
+
pywats-client start --api --api-port 8765
|
|
161
|
+
|
|
162
|
+
# Run as daemon (Linux)
|
|
163
|
+
pywats-client start --daemon
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### CLI Commands
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
pywats-client config show # Show configuration
|
|
170
|
+
pywats-client config set key value # Set config value
|
|
171
|
+
pywats-client status # Show service status
|
|
172
|
+
pywats-client converters list # List converters
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### HTTP Control API
|
|
176
|
+
|
|
177
|
+
When running with `--api`, manage the service remotely:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
curl http://localhost:8765/status # Get status
|
|
181
|
+
curl http://localhost:8765/config # Get configuration
|
|
182
|
+
curl -X POST http://localhost:8765/restart # Restart services
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
See [Headless Operation Guide](src/pywats_client/control/HEADLESS_GUIDE.md) for complete documentation.
|
|
186
|
+
|
|
187
|
+
## Project Structure
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
pyWATS/
|
|
191
|
+
├── src/
|
|
192
|
+
│ ├── pywats/ # Core library
|
|
193
|
+
│ │ ├── models/ # Pydantic data models
|
|
194
|
+
│ │ ├── modules/ # High-level API modules
|
|
195
|
+
│ │ └── rest_api/ # REST API wrappers
|
|
196
|
+
│ └── pywats_client/ # Client application
|
|
197
|
+
│ ├── core/ # Core client functionality
|
|
198
|
+
│ ├── gui/ # Qt GUI components (optional)
|
|
199
|
+
│ ├── control/ # Headless control (CLI, HTTP API)
|
|
200
|
+
│ └── services/ # Background services
|
|
201
|
+
├── converters/ # User converter plugins
|
|
202
|
+
├── docs/ # Documentation
|
|
203
|
+
│ ├── api_specs/ # OpenAPI specifications
|
|
204
|
+
│ ├── examples/ # Usage examples
|
|
205
|
+
│ └── gui_screens/ # GUI screenshots
|
|
206
|
+
├── pyproject.toml # Project configuration
|
|
207
|
+
└── requirements.txt # Dependencies
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Documentation
|
|
211
|
+
|
|
212
|
+
- [Architecture Overview](docs/ARCHITECTURE.md) - System design and layered architecture
|
|
213
|
+
- [Report Module](docs/usage/REPORT_MODULE.md) - Test reports and factory methods
|
|
214
|
+
- [Product Module](docs/usage/PRODUCT_MODULE.md) - Product/BOM management
|
|
215
|
+
- [Production Module](docs/usage/PRODUCTION_MODULE.md) - Serial number and unit tracking
|
|
216
|
+
|
|
217
|
+
## Testing
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Run all tests
|
|
221
|
+
pytest
|
|
222
|
+
|
|
223
|
+
# Run with coverage
|
|
224
|
+
pytest --cov=src --cov-report=html
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## Contributing
|
|
228
|
+
|
|
229
|
+
This project is maintained by [Virinco AS](https://virinco.com).
|
|
230
|
+
|
|
231
|
+
## License
|
|
232
|
+
|
|
233
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
234
|
+
|
|
235
|
+
## Links
|
|
236
|
+
|
|
237
|
+
- [WATS Website](https://wats.com)
|
|
238
|
+
- [Virinco](https://virinco.com)
|
|
239
|
+
- [GitHub Repository](https://github.com/olreppe/pyWATS)
|
|
240
|
+
- [Changelog](CHANGELOG.md)
|