Results extension for OWI Metadatabase SDK
Project description
OWI-metadatabase Results Extension
Results extension for OWI Metadatabase SDK
Overview
This package extends owi-metadatabase SDK under the owi.metadatabase.* namespace so it behaves like the existing extension packages.
Installation
Install as extension package (owi-metadatabase-results)
pip install owi-metadatabase-results
Using uv:
uv pip install owi-metadatabase-results
Install from core package extra (owi-metadatabase[results])
If you prefer installing from the base package extras:
pip install "owi-metadatabase[results]"
Using uv:
uv pip install "owi-metadatabase[results]"
Quick Start
from owi.metadatabase.results import ResultsAPI
api = ResultsAPI(token="your-api-token")
print(api.ping())
Architecture At A Glance
The diagram below shows how the package is structured, which parts are core, and how data moves from domain payloads to backend persistence and plots. Colour legend: green = core orchestration, blue = domain models and analyses, amber = infrastructure / HTTP, yellow = protocol contracts, grey = external packages.
flowchart TD
User[User Code / Notebooks / Scripts] --> Service[services/core.py\nResultsService\nHigh-level facade]
User --> API[io.py\nResultsAPI\nLow-level HTTP client]
Service --> Repo[services/core.py\nApiResultsRepository]
Repo --> API
API -. routes .-> Endpoints[endpoints.py\nResultsEndpoints]
Service --> Serializers[serializers.py\nDjangoAnalysisSerializer\nDjangoResultSerializer]
Service --> Registry[registry.py\nAnalysisRegistry]
Serializers --> Models
Registry --> BaseAnalysis[analyses/base.py\nBaseAnalysis mixin]
BaseAnalysis --> Freq[analyses/lifetime_design_frequencies.py\nComparison + location + geo frequencies]
BaseAnalysis --> Verify[analyses/lifetime_design_verification.py\nTime-series verification]
BaseAnalysis --> Hist[analyses/wind_speed_histogram.py\nHistogram analysis]
BaseAnalysis --> CEIT[analyses/ceit.py\nCEIT corrosion monitoring]
Freq --> Models[models.py\nAnalysisDefinition · ResultSeries\nResultVector · ResultQuery\nPlotRequest · PlotResponse]
Verify --> Models
Hist --> Models
CEIT --> Models
Protocols[protocols.py\nAnalysisProtocol · PlotStrategyProtocol\nResultsRepositoryProtocol\nSerializerProtocol] -. structural contracts .-> Service
Protocols -. structural contracts .-> BaseAnalysis
Protocols -. structural contracts .-> Repo
BaseAnalysis --> GenericPlots[plotting/strategies.py\nHistogramPlotStrategy\nTimeSeriesPlotStrategy]
Freq --> FreqPlots[plotting/frequency.py\nComparison / location / geo plots]
Verify --> VerifyPlots[plotting/verification.py\nTime-series metric charts]
CEIT --> CeitPlots[plotting/ceit.py\nSensor dropdown charts]
GenericPlots --> PlotWidgets[plotting/response.py + theme.py\nDropdown builders + monospace theme]
FreqPlots --> PlotWidgets
VerifyPlots --> PlotWidgets
CeitPlots --> PlotWidgets
Repo -. location metadata .-> Locations[owi.metadatabase.locations\nLocationsAPI]
Geometry[owi.metadatabase.geometry\nOWT / subassembly context] -. joined by site/location .-> User
classDef core fill:#d9f2e6,stroke:#2c7a4b,color:#143d28;
classDef domain fill:#e8eefc,stroke:#3559b7,color:#1e2f63;
classDef infra fill:#f7ead9,stroke:#b7791f,color:#5a3d0c;
classDef external fill:#f3f4f6,stroke:#6b7280,color:#374151;
classDef contract fill:#fef3c7,stroke:#d97706,color:#78350f;
class Service,Repo,Registry,BaseAnalysis core;
class GenericPlots,FreqPlots,VerifyPlots,CeitPlots,PlotWidgets core;
class Freq,Verify,Hist,CEIT,Models,Serializers domain;
class API,Endpoints infra;
class User,Locations,Geometry external;
class Protocols contract;
Data Model At A Glance
The results extension stores analysis metadata separately from persisted result rows. Result rows link back to site and location metadata, while geometry stays adjacent and is usually joined through location-aware identifiers.
erDiagram
ANALYSIS {
int id PK
string name
string source_type
string source
string description
json additional_data
}
RESULT {
int id PK
int analysis_id FK
int site FK
int location FK
string short_description
string description
json additional_data
json related_object
string name_col1
string units_col1
float_array value_col1
string name_col2
string units_col2
float_array value_col2
string name_col3
string units_col3
float_array value_col3
}
PROJECTSITE {
int id PK
string title
}
ASSETLOCATION {
int id PK
int projectsite_id FK
string title
float northing
float easting
}
OWT {
int id PK
int assetlocation_id FK
string title
}
SUBASSEMBLY {
int id PK
int owt_id FK
string type
}
ANALYSIS ||--o{ RESULT : owns
PROJECTSITE ||--o{ ASSETLOCATION : contains
PROJECTSITE ||--o{ RESULT : site_scope
ASSETLOCATION ||--o{ RESULT : location_scope
ASSETLOCATION ||--|| OWT : anchors
OWT ||--o{ SUBASSEMBLY : contains
Interpretation:
ANALYSISstores one logical analysis definition, such asLifetimeDesignVerificationorWindSpeedHistogram.RESULTstores one persisted series row with 2 to 3 aligned numeric vectors plus JSON metadata.PROJECTSITEandASSETLOCATIONcome from the locations package and provide the site and asset identifiers used by result queries.northingandeastingonASSETLOCATIONare what make geo-oriented result plots possible.- Geometry objects like
OWTandSUBASSEMBLYare not owned by the results package, but they are the physical context users typically join onto result rows through location/site relationships.
Development
uv sync --dev
uv run invoke test
uv run invoke qa
uv run invoke docs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file owi_metadatabase_results-0.2.1.tar.gz.
File metadata
- Download URL: owi_metadatabase_results-0.2.1.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a83b127132640cbbf13dba730589cf1bd29b821097075812545e285f01b7b31b
|
|
| MD5 |
7ae0ff8c6ef888a7707138ca4d8ce8bc
|
|
| BLAKE2b-256 |
f6532cf75ce7700d01ddfb3d4ba3ef467de8582e940c47dd15bcced09c7d11dd
|
Provenance
The following attestation bundles were made for owi_metadatabase_results-0.2.1.tar.gz:
Publisher:
publish.yml on OWI-Lab/owi-metadatabase-results-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
owi_metadatabase_results-0.2.1.tar.gz -
Subject digest:
a83b127132640cbbf13dba730589cf1bd29b821097075812545e285f01b7b31b - Sigstore transparency entry: 1409719967
- Sigstore integration time:
-
Permalink:
OWI-Lab/owi-metadatabase-results-sdk@8304e026706f0cb06417880609d8feb4f9f8981c -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/OWI-Lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8304e026706f0cb06417880609d8feb4f9f8981c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file owi_metadatabase_results-0.2.1-py3-none-any.whl.
File metadata
- Download URL: owi_metadatabase_results-0.2.1-py3-none-any.whl
- Upload date:
- Size: 70.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
502217c8c2fbef9bcfc002abe54835f79d58b0d76700b0f4e2849d7c6bca5f3a
|
|
| MD5 |
74d7e7a7ba0c2ee338603fbd4063f15e
|
|
| BLAKE2b-256 |
54746529b09c8373e8d50267d70479f7d8684899d421ac5a4618756d2e410d31
|
Provenance
The following attestation bundles were made for owi_metadatabase_results-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on OWI-Lab/owi-metadatabase-results-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
owi_metadatabase_results-0.2.1-py3-none-any.whl -
Subject digest:
502217c8c2fbef9bcfc002abe54835f79d58b0d76700b0f4e2849d7c6bca5f3a - Sigstore transparency entry: 1409719974
- Sigstore integration time:
-
Permalink:
OWI-Lab/owi-metadatabase-results-sdk@8304e026706f0cb06417880609d8feb4f9f8981c -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/OWI-Lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8304e026706f0cb06417880609d8feb4f9f8981c -
Trigger Event:
workflow_dispatch
-
Statement type: