Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 10, 2025

The codebase uses two SQLite databases to track associations between components and their time series/supplemental attributes, but the schemas were undocumented.

Changes

New Documentation Page: docs/src/dev_guide/associations_database.md

Comprehensive reference for maintainers covering:

  • TimeSeriesMetadataStore schema

    • time_series_associations table: 17 columns tracking owner UUID, time series UUID, metadata (timestamps, resolution, features), with indexes optimized for component lookups and deduplication
    • key_value_store table: format version tracking
    • Migration paths from v2.3/v2.4 schemas
  • SupplementalAttributeAssociations schema

    • supplemental_attributes table: 4 columns (attribute UUID/type, component UUID/type) with bidirectional indexes
  • Design rationale: Why separate databases (serialization constraints: time series metadata → HDF5, supplemental attributes → JSON when no time series present)

  • Implementation details: statement caching (3-4μs savings), query patterns, debugging utilities

Build Configuration

Added page to Developer Guide section in docs/make.jl after "Time Series Data" documentation.

Target Audience

This documentation is explicitly scoped for maintainers and contributors working on the internal database implementation, not end users.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • docs.julialang.org
    • Triggering command: julia --project make.jl (dns block)
    • Triggering command: julia --project=docs docs/make.jl (dns block)
  • documenter.juliadocs.org
    • Triggering command: julia --project make.jl (dns block)
    • Triggering command: julia --project=docs docs/make.jl (dns block)
  • domluna.github.io
    • Triggering command: julia --project make.jl (dns block)
    • Triggering command: julia --project=docs docs/make.jl (dns block)
  • https://api.github.com/repos/FluxML/MacroTools.jl/tarball/1e0228a030642014fe5cfe68c2c0a818f9e3f522
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/GunnarFarneback/RegistryInstances.jl/tarball/ffd19052caf598b8653b99404058fce14828be51
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/Blosc_jll.jl/tarball/535c80f1c0847a4c967ea945fca21becc9de1522
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/Expat_jll.jl/tarball/27af30de8b5445644e8ffe3bcb0d72049c089cf1
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/Git_LFS_jll.jl/tarball/bb8471f313ed941f299aa53d32a94ab3bee08844
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/Git_jll.jl/tarball/b6a684587ebe896d9f68ae777f648205940f0f70
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/HDF5_jll.jl/tarball/e94f84da9af7ce9c6be049e9067e511e17ff89ec
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/Hwloc_jll.jl/tarball/3d468106a05408f9f7b6f161d9e7715159af247b
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/Libiconv_jll.jl/tarball/be484f5c92fad0bd8acfef35fe017900b0b73809
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/Lz4_jll.jl/tarball/191686b1ac1ea9c89fc52e996ad15d1d241d1e33
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/MPICH_jll.jl/tarball/9341048b9f723f2ae2a72a5269ac2f15f80534dc
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/MPItrampoline_jll.jl/tarball/e214f2a20bdd64c04cd3e4ff62d3c9be7e969a59
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/MicrosoftMPI_jll.jl/tarball/bc95bf4149bf535c09602e3acdf950d9b4376227
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/OpenMPI_jll.jl/tarball/ec764453819f802fc1e144bfe750c454181bd66d
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/OpenSSH_jll.jl/tarball/301412a644646fdc0ad67d0a87487466b491e53d
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/SQLite_jll.jl/tarball/9a325057cdb9b066f1f96dc77218df60fe3007cb
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/XML2_jll.jl/tarball/80d3930c6347cfce7ccf96bd3bafdf079d9c0390
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/Xorg_libpciaccess_jll.jl/tarball/4909eb8f1cbf6bd4b1c30dd18b2ead9019ef2fad
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/Zstd_jll.jl/tarball/446b23e73536f84e8037f5dce465e92275f6a308
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaBinaryWrappers/libaec_jll.jl/tarball/1aa23f01927b2dac46db77a56b31088feee0a491
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaCollections/AbstractTrees.jl/tarball/2d9c9a55f9c93e8887ad391fbae72f8ef55e1177
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaCollections/DataStructures.jl/tarball/e357641bb3e0638d353c4b29ea0e40ea644066a6
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaCollections/LeftChildRightSiblingTrees.jl/tarball/95ba48564903b43b2462318aa243ee79d81135ff
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaCollections/OrderedCollections.jl/tarball/05868e21324cede2207c6f0f466b4bfef6d5e7ee
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaCollections/SortingAlgorithms.jl/tarball/64d974c2e6fdf07f8155b5b2ca2ffa9069b608d9
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaData/CSV.jl/tarball/deddd8725e5e1cc49ee205a1964256043720a6c3
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaData/DataAPI.jl/tarball/abe83f3a2f1b857aac70ef8b269080af17764bbe
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaData/DataFrames.jl/tarball/d8928e9169ff76c6281f39a659f9bca3a573f24c
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaData/DataFramesMeta.jl/tarball/b0652fb7f3c094cf453bf22e699712a0bed9fc83
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaData/DelimitedFiles.jl/tarball/9e2f36d3c96a820c678f2f1f1782582fcf685bae
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaData/InvertedIndices.jl/tarball/6da3c4316095de0f5ee2ebd875df8721e7e0bdbe
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaData/Missings.jl/tarball/ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaData/Parsers.jl/tarball/7d2f8f21da5db6a806faf7b9b292296da42b2810
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaData/PooledArrays.jl/tarball/36d8b4b899628fb92c2749eb488d884a926614d3
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaData/SentinelArrays.jl/tarball/712fb0231ee6f9120e005ccd56297abbc053e7e0
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaData/StructTypes.jl/tarball/159331b30e94d7b11379037feeb9b690950cace8
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaData/TableMetadataTools.jl/tarball/c0405d3f8189bb9a9755e429c6ea2138fca7e31f
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaData/Tables.jl/tarball/f2c1efbc8f3a609aadf318094f8fc5204bdaf344
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaData/WeakRefStrings.jl/tarball/b1be2855ed9ed8eac54e5caff2afcdb442d52c23
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaData/YAML.jl/tarball/ed87adf5041ca93203093b03e0d78b6a9d987290
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaDatabases/DBInterface.jl/tarball/a444404b3f94deaa43ca2a58e18153a82695282b
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaDatabases/SQLite.jl/tarball/38b82dbc52b7db40bea182688c7a1103d06948a4
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaDocs/ANSIColoredPrinters.jl/tarball/574baf8110975760d391c710b6341da1afa48d8c
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaDocs/DocInventories.jl/tarball/e97cfa8680a39396924dcdca4b7ff1014ed5c499
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaDocs/DocStringExtensions.jl/tarball/7442a5dfe1ebb773c29cc2962a8980f47221d76c
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaDocs/Documenter.jl/tarball/352b9a04e74edd16429aec79f033620cf8e780d4
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaDocs/DocumenterInterLinks.jl/tarball/d8a8cb2d5b0181fbbd41861016b221b0202c9bc5
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaDocs/IOCapture.jl/tarball/b6d6bfdd7ce25b0f9b2f6b3dd56b2673a66c8770
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaDocs/MarkdownAST.jl/tarball/465a70f0fc7d443a00dcdc3267a497397b8a3899
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaIO/Blosc.jl/tarball/310b77648d38c223d947ff3f50f511d08690b8d5
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaIO/CodecZlib.jl/tarball/962834c22b66e32aa10f7611c08c8ca4e20749a9
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaIO/HDF5.jl/tarball/d778420e524bcf56066e8c63c7aa315ae7269da2
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaIO/HDF5.jl/tarball/e856eef26cf5bf2b0f95f8f4fc37553c72c8641c
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaIO/JSON.jl/tarball/eb04df293213df64ddd720c86de3c431f5f8ccf1
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaIO/TranscodingStreams.jl/tarball/0c45878dcfdcfa8480052b6ab162cdd138781742
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaLang/Compat.jl/tarball/9d8a54ce4b17aa5bdce0ea5c34bc5e7c340d16ad
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaLang/PrecompileTools.jl/tarball/07a921781cab75691315adc645096ed5e370cb77
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaLogging/ProgressLogging.jl/tarball/d95ed0324b0799843ac6f7a6a85e65fe4e5173f0
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaLogging/TerminalLoggers.jl/tarball/f133fab380933d042f6796eda4e130272ba520ca
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaPackaging/JLLWrappers.jl/tarball/0533e564aae234aff59ab625543145446d8b6ec2
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaPackaging/Preferences.jl/tarball/0f27480397253da18fe2c12a4ba4eb9eb208bf3d
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaPackaging/Requires.jl/tarball/62389eeff14780bfe55195b7204c0d8738436d64
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaParallel/MPI.jl/tarball/c105fe467859e7f6e9a852cb15cb4301126fac07
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaPhysics/Unitful.jl/tarball/83360bda12f61c250835830cc40b64f487cc2230
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaPlots/Plots.jl/tarball/5c3d09cc4f31f5fc6af001c250bf1278733100ff
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaServices/StructUtils.jl/tarball/79529b493a44927dd5b13dde1c7ce957c2d049e4
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaServices/WorkerUtilities.jl/tarball/cd1659ba0d57b71a464a29e64dbc67cfe83d54e7
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaStats/Statistics.jl/tarball/ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaStats/TimeSeries.jl/tarball/f4d78e050e6734625bdecf386775bde88f77a9cd
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaStrings/InlineStrings.jl/tarball/8f3d257792a522b4601c24a577954b0a8cd7334d
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaStrings/LaTeXStrings.jl/tarball/dda21b8cbd6a6c40d9d02a73230f9d70fed6918c
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaStrings/StringEncodings.jl/tarball/b765e46ba27ecf6b44faf70df40c57aa3a547dcb
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaTesting/ExprTools.jl/tarball/27415f162e6028e81c72b82ef756bf321213b6ec
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/JuliaVersionControl/Git.jl/tarball/824a1890086880696fc908fe12a17bcf61738bd8
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/KristofferC/Crayons.jl/tarball/249fe38abf76d48563e2f4556bebd215aa317e15
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/KristofferC/LazilyInitializedFields.jl/tarball/0f2da712350b020bc3957f269c9caad516383ee0
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/KristofferC/TimerOutputs.jl/tarball/3748bd928e68c7c346b52125cf41fff0de6937d0
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/NREL-Sienna/InfrastructureSystems.jl/tarball/ff907b5ea6e833a372a2e23f7562958cdbb63bc8
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/fredrikekre/Literate.jl/tarball/da046be6d63304f7ba9c1bb04820fb306ba1ab12
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/jkrumbiegel/Chain.jl/tarball/765487f32aeece2cf28aa7038e29c31060cb5a69
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/joshday/StringTemplates.jl/tarball/d78012ad7c6c22aba229a6363ec83ebc9ce5c135
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/jverzani/Mustache.jl/tarball/3cbd5dda543bc59f2e482607ccf84b633724fc32
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/queryverse/DataValueInterfaces.jl/tarball/bfc1187b79289637fa0ef6d4436ebdfe6905cbd6
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/queryverse/IteratorInterfaceExtensions.jl/tarball/a3f24677c21f5bbe9d2a714f95dcd58337fb2856
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/queryverse/TableTraits.jl/tarball/c06b2f539df1c6efa794486abfb6ed2022561a39
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/quinnj/JSON3.jl/tarball/411eccfe8aba0814ffa0fdf4860913ed09c34975
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/rofinn/FilePathsBase.jl/tarball/3bab2c5aa25e7840a4b065805c0cdfc01f3068d2
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/ronisbr/PrettyTables.jl/tarball/1101cd475833706e4d0e7b122218257178f48f34
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/ronisbr/StringManipulation.jl/tarball/725421ae8e530ec29bcbdddbe91ff8053421d023
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • https://api.github.com/repos/simonster/Reexport.jl/tarball/45e428421666073eab6f2da5c9d310d99bb12f9b
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (http block)
  • juliadocs.org
    • Triggering command: julia --project make.jl (dns block)
    • Triggering command: julia --project=docs docs/make.jl (dns block)
  • nrel-sienna.github.io
    • Triggering command: julia --project make.jl (dns block)
    • Triggering command: julia --project=docs docs/make.jl (dns block)
  • pkg.julialang.org
    • Triggering command: julia --project -e using Pkg; Pkg.instantiate() (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>document better the table formats in the underlying associations db.</issue_title>
<issue_description>Currently there is no reference in the documentation to the schema and design of the associations databases. </issue_description>

<agent_instructions>Document the data models in the associations db defined in this repository and used throughout the organization. Explain in the page that these associations are used to keep track of the time series and supplemental attributes under the hood and it isn't meant for direct access from the users. The page is geared towards future maintainers and contributors to the repository </agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Document table formats in associations database Document associations database schemas for time series and supplemental attributes Nov 10, 2025
Copilot AI requested a review from jd-lara November 10, 2025 00:26
Copilot finished work on behalf of jd-lara November 10, 2025 00:26
@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.37%. Comparing base (5eab57e) to head (d86c0ae).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #508      +/-   ##
==========================================
+ Coverage   79.40%   80.37%   +0.97%     
==========================================
  Files          71       71              
  Lines        6141     6065      -76     
==========================================
- Hits         4876     4875       -1     
+ Misses       1265     1190      -75     
Flag Coverage Δ
unittests 80.37% <ø> (+0.97%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 27 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jd-lara jd-lara marked this pull request as ready for review November 10, 2025 05:46
Copy link
Contributor

@daniel-thom daniel-thom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Consider adding links to ISO 8601 duration strings because not everyone is familiar with them.

jd-lara and others added 2 commits November 10, 2025 15:41
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

!!! note "For Maintainers and Contributors"


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

@jd-lara jd-lara merged commit 0459c83 into main Nov 10, 2025
7 checks passed
Comment on lines +58 to +76
| Column Name | Type | Description |
|:--------------------------- |:------- |:------------------------------------------------------------------------ |
| `id` | INTEGER | Primary key, auto-incremented |
| `time_series_uuid` | TEXT | UUID of the time series data array |
| `time_series_type` | TEXT | Type name of the time series (e.g., "SingleTimeSeries", "Deterministic") |
| `initial_timestamp` | TEXT | ISO 8601 formatted initial timestamp |
| `resolution` | TEXT | Resolution encoded as [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations) |
| `horizon` | TEXT | ISO 8601 formatted forecast horizon (NULL for static time series) |
| `interval` | TEXT | ISO 8601 formatted forecast interval (NULL for static time series) |
| `window_count` | INTEGER | Number of forecast windows (NULL for static time series) |
| `length` | INTEGER | Length of static time series (NULL for forecasts) |
| `name` | TEXT | User-defined name for the time series |
| `owner_uuid` | TEXT | UUID of the component or supplemental attribute that owns this |
| `owner_type` | TEXT | Type name of the owner |
| `owner_category` | TEXT | Either "Component" or "SupplementalAttribute" |
| `features` | TEXT | JSON string of feature key-value pairs for filtering |
| `scaling_factor_multiplier` | JSON | Optional function for scaling (NULL if not used) |
| `metadata_uuid` | TEXT | UUID of the metadata object |
| `units` | TEXT | Optional units specification (NULL if not used) |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
| Column Name | Type | Description |
|:--------------------------- |:------- |:------------------------------------------------------------------------ |
| `id` | INTEGER | Primary key, auto-incremented |
| `time_series_uuid` | TEXT | UUID of the time series data array |
| `time_series_type` | TEXT | Type name of the time series (e.g., "SingleTimeSeries", "Deterministic") |
| `initial_timestamp` | TEXT | ISO 8601 formatted initial timestamp |
| `resolution` | TEXT | Resolution encoded as [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations) |
| `horizon` | TEXT | ISO 8601 formatted forecast horizon (NULL for static time series) |
| `interval` | TEXT | ISO 8601 formatted forecast interval (NULL for static time series) |
| `window_count` | INTEGER | Number of forecast windows (NULL for static time series) |
| `length` | INTEGER | Length of static time series (NULL for forecasts) |
| `name` | TEXT | User-defined name for the time series |
| `owner_uuid` | TEXT | UUID of the component or supplemental attribute that owns this |
| `owner_type` | TEXT | Type name of the owner |
| `owner_category` | TEXT | Either "Component" or "SupplementalAttribute" |
| `features` | TEXT | JSON string of feature key-value pairs for filtering |
| `scaling_factor_multiplier` | JSON | Optional function for scaling (NULL if not used) |
| `metadata_uuid` | TEXT | UUID of the metadata object |
| `units` | TEXT | Optional units specification (NULL if not used) |
| Column Name | Type | Description |
|:--------------------------- |:------- |:------------------------------------------------------------------------------------------- |
| `id` | INTEGER | Primary key, auto-incremented |
| `time_series_uuid` | TEXT | UUID of the time series data array |
| `time_series_type` | TEXT | Type name of the time series (e.g., "SingleTimeSeries", "Deterministic") |
| `initial_timestamp` | TEXT | ISO 8601 formatted initial timestamp |
| `resolution` | TEXT | Resolution encoded as [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations) |
| `horizon` | TEXT | ISO 8601 formatted forecast horizon (NULL for static time series) |
| `interval` | TEXT | ISO 8601 formatted forecast interval (NULL for static time series) |
| `window_count` | INTEGER | Number of forecast windows (NULL for static time series) |
| `length` | INTEGER | Length of static time series (NULL for forecasts) |
| `name` | TEXT | User-defined name for the time series |
| `owner_uuid` | TEXT | UUID of the component or supplemental attribute that owns this |
| `owner_type` | TEXT | Type name of the owner |
| `owner_category` | TEXT | Either "Component" or "SupplementalAttribute" |
| `features` | TEXT | JSON string of feature key-value pairs for filtering |
| `scaling_factor_multiplier` | JSON | Optional function for scaling (NULL if not used) |
| `metadata_uuid` | TEXT | UUID of the metadata object |
| `units` | TEXT | Optional units specification (NULL if not used) |

jd-lara added a commit that referenced this pull request Nov 11, 2025
…ent types (#504)

* Initial plan

* Add informative error messages for transform_array_for_hdf with non-concrete types

Co-authored-by: jd-lara <[email protected]>

* Fix test for error messages with non-concrete types

Co-authored-by: jd-lara <[email protected]>

* Improve tests to use mixed types for better illustration

Co-authored-by: jd-lara <[email protected]>

* Add constant for supported types and improve error messages

- Added TRANSFORM_ARRAY_FOR_HDF_SUPPORTED_ELTYPES constant listing all supported element types
- Updated error messages to reference this constant
- Enhanced second error message to explicitly mention that users need to implement a specific method for unsupported types
- Updated tests to verify new error message content

Co-authored-by: jd-lara <[email protected]>

* Add early validation of time series data types in Deterministic constructor

- Added is_transform_array_for_hdf_supported() function to check if element types are supported
- Added validate_time_series_data_for_hdf() function to validate data before creating Deterministic
- Modified Deterministic constructor to call validation after convert_data() to catch unsupported types early
- Added comprehensive tests in test_time_series.jl to verify early validation catches errors
- This provides better error messages earlier in the workflow, before serialization attempts

Co-authored-by: jd-lara <[email protected]>

* Refactor is_transform_array_for_hdf_supported to use multiple dispatch

- Replaced if-else chain with multiple dispatch methods
- Each supported type (Real, Tuple, Vector{Tuple}, Matrix, FunctionData subtypes) has its own method
- Catchall method returns false for unsupported types
- More Julian approach that's cleaner and more maintainable

Co-authored-by: jd-lara <[email protected]>

* Make fallback validate_time_series_data_for_hdf throw error for unsupported SortedDict types

- Changed fallback method from returning nothing to throwing an informative ArgumentError
- Deterministic only supports SortedDict{Dates.DateTime, Vector{T}} where T is a supported type
- Added test to verify arbitrary SortedDict types are rejected with clear error message

Co-authored-by: jd-lara <[email protected]>

* update check implementation

* Adjust tests to match updated error messages in utils.jl

- Removed check for "you need to implement" text in Deterministic constructor test
- This text was removed from validate_time_series_data_for_hdf error message
- The transform_array_for_hdf catchall still has this text, so that test remains unchanged

Co-authored-by: jd-lara <[email protected]>

* Document associations database schemas for time series and supplemental attributes (#508)

* Initial plan

* Add associations database documentation page

Co-authored-by: jd-lara <[email protected]>

* formatter

* Update docs/src/dev_guide/associations_database.md

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update docs/src/dev_guide/associations_database.md

Co-authored-by: Daniel Thom <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jd-lara <[email protected]>
Co-authored-by: Jose Daniel Lara <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Daniel Thom <[email protected]>

* Initial plan

* Add informative error messages for transform_array_for_hdf with non-concrete types

Co-authored-by: jd-lara <[email protected]>

* Fix test for error messages with non-concrete types

Co-authored-by: jd-lara <[email protected]>

* Improve tests to use mixed types for better illustration

Co-authored-by: jd-lara <[email protected]>

* Add constant for supported types and improve error messages

- Added TRANSFORM_ARRAY_FOR_HDF_SUPPORTED_ELTYPES constant listing all supported element types
- Updated error messages to reference this constant
- Enhanced second error message to explicitly mention that users need to implement a specific method for unsupported types
- Updated tests to verify new error message content

Co-authored-by: jd-lara <[email protected]>

* Add early validation of time series data types in Deterministic constructor

- Added is_transform_array_for_hdf_supported() function to check if element types are supported
- Added validate_time_series_data_for_hdf() function to validate data before creating Deterministic
- Modified Deterministic constructor to call validation after convert_data() to catch unsupported types early
- Added comprehensive tests in test_time_series.jl to verify early validation catches errors
- This provides better error messages earlier in the workflow, before serialization attempts

Co-authored-by: jd-lara <[email protected]>

* Refactor is_transform_array_for_hdf_supported to use multiple dispatch

- Replaced if-else chain with multiple dispatch methods
- Each supported type (Real, Tuple, Vector{Tuple}, Matrix, FunctionData subtypes) has its own method
- Catchall method returns false for unsupported types
- More Julian approach that's cleaner and more maintainable

Co-authored-by: jd-lara <[email protected]>

* Make fallback validate_time_series_data_for_hdf throw error for unsupported SortedDict types

- Changed fallback method from returning nothing to throwing an informative ArgumentError
- Deterministic only supports SortedDict{Dates.DateTime, Vector{T}} where T is a supported type
- Added test to verify arbitrary SortedDict types are rejected with clear error message

Co-authored-by: jd-lara <[email protected]>

* update check implementation

* Adjust tests to match updated error messages in utils.jl

- Removed check for "you need to implement" text in Deterministic constructor test
- This text was removed from validate_time_series_data_for_hdf error message
- The transform_array_for_hdf catchall still has this text, so that test remains unchanged

Co-authored-by: jd-lara <[email protected]>

* small formatter fix

* move validation to inner constructor

* fix inner constructor call

* add correct typing

* improve tests

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jd-lara <[email protected]>
Co-authored-by: Jose Daniel Lara <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Daniel Thom <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

document better the table formats in the underlying associations db.

3 participants