Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add time_series-0.1.1.yaml #677

Merged
merged 5 commits into from
Jan 13, 2022

Conversation

CagtayFabry
Copy link
Member

@CagtayFabry CagtayFabry commented Jan 12, 2022

Changes

  • serialization of TimeSeries is now based on Time with support for absolute times (only serialized timedeltas before)
  • added small test for absolute times
  • added shape validation to Time

Related Issues

Closes #671

Checks

  • updated CHANGELOG.rst
  • updated tests
  • update manifest file

@github-actions
Copy link

github-actions bot commented Jan 12, 2022

Unit Test Results

       1 files  ±0         1 suites  ±0   2m 10s ⏱️ +37s
2 101 tests +8  2 101 ✔️ +8  0 💤 ±0  0 ±0 

Results for commit 59cac2f. ± Comparison against base commit f9c9c23.

♻️ This comment has been updated with latest results.

@codecov
Copy link

codecov bot commented Jan 12, 2022

Codecov Report

Merging #677 (59cac2f) into master (f9c9c23) will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #677      +/-   ##
==========================================
+ Coverage   95.86%   95.89%   +0.03%     
==========================================
  Files          92       92              
  Lines        6307     6310       +3     
==========================================
+ Hits         6046     6051       +5     
+ Misses        261      259       -2     
Impacted Files Coverage Δ
weldx/tags/core/time_series.py 96.96% <100.00%> (+2.85%) ⬆️
weldx/tags/time/time.py 100.00% <100.00%> (ø)
weldx/tags/time/datetimeindex.py 100.00% <0.00%> (+3.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9c9c23...59cac2f. Read the comment docs.

@CagtayFabry
Copy link
Member Author

When creating a test file with the following code

import pandas as pd

from weldx import Q_, TimeSeries, WeldxFile

data = Q_([1, 2, 3, 8], "m")
t = pd.date_range(start="2020-01-01", freq="1D", periods=4)
ts = TimeSeries(data, t)

WeldxFile("ts_debug.weldx", tree={"ts": ts}, mode="rw")

I get this strange double referenced properties in asdf:

#ASDF 1.0.0
#ASDF_STANDARD 1.5.0
%YAML 1.1
%TAG ! tag:stsci.edu:asdf/
%TAG !weldx! asdf://weldx.bam.de/weldx/tags/
--- !core/asdf-1.1.0
asdf_library: !core/software-1.0.0 {author: The ASDF Developers, homepage: 'http://github.com/asdf-format/asdf',
  name: asdf, version: 2.8.3}
history:
  extensions:
  - !core/extension_metadata-1.0.0
    extension_class: asdf.extension.BuiltinExtension
    software: !core/software-1.0.0 {name: asdf, version: 2.8.3}
  - !core/extension_metadata-1.0.0
    extension_class: weldx.asdf.extension.WeldxExtension
    extension_uri: asdf://weldx.bam.de/weldx/extensions/weldx-0.1.1
    software: !core/software-1.0.0 {name: weldx, version: 0.5.3.dev23+g12b85957}
ts: !weldx!core/time_series-0.1.1
  &id001 values: &id002 !core/ndarray-1.0.0
    data: [1, 2, 3, 8]
    datatype: int32
    shape: [4]
  time: !weldx!time/time-0.1.0
    values: !weldx!time/datetimeindex-0.1.0 {start: !weldx!time/timestamp-0.1.0 '2020-01-01T00:00:00',
      end: !weldx!time/timestamp-0.1.0 '2020-01-04T00:00:00', freq: D, min: !weldx!time/timestamp-0.1.0 '2020-01-01T00:00:00',
      max: !weldx!time/timestamp-0.1.0 '2020-01-04T00:00:00'}
    reference_time: !weldx!time/timestamp-0.1.0 2020-01-01T00:00:00
  units: !weldx!units/units-0.1.0 meter
  shape: [4]
  interpolation: step
  *id001 : *id002
...

@CagtayFabry CagtayFabry added ASDF everything ASDF related (python + schemas) validation custom ASDF validators labels Jan 12, 2022
@CagtayFabry CagtayFabry marked this pull request as ready for review January 12, 2022 14:46
@CagtayFabry CagtayFabry requested a review from vhirtham January 12, 2022 14:47
Co-authored-by: vhirtham <volker.hirthammer@gmail.com>
@CagtayFabry CagtayFabry merged commit 0d25896 into BAMWelDX:master Jan 13, 2022
@CagtayFabry CagtayFabry deleted the fix_timeseries_schema branch January 13, 2022 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASDF everything ASDF related (python + schemas) validation custom ASDF validators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not all valid TimeSeries objects can be serialized
2 participants