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

try to fix Ti error #337

Merged
merged 4 commits into from
Oct 1, 2023
Merged

try to fix Ti error #337

merged 4 commits into from
Oct 1, 2023

Conversation

kongdd
Copy link
Contributor

@kongdd kongdd commented Oct 1, 2023

try to fix #336, #330, #320, might also works for #301

This issue is related to DD.dim2key(ti) and DD.name(ti). They return different values.

using DimensionalData
using DimensionalData: DimensionalData as DD
using Dates

ti = Ti(DateTime(2001):Month(1):DateTime(2002))

@show DD.dim2key(ti);
@show DD.name(ti);
DD.dim2key(ti) = :Ti
DD.name(ti) = :Time

@lazarusA
Copy link
Collaborator

lazarusA commented Oct 1, 2023

Thanks for this PR, could you please try to include a test example. For now, I approved CI to check if nothing breaks as it is.

@kongdd
Copy link
Contributor Author

kongdd commented Oct 1, 2023

Thank you. After all tests passed, I will add new.

@codecov
Copy link

codecov bot commented Oct 1, 2023

Codecov Report

All modified lines are covered by tests ✅

Files Coverage Δ
src/DatasetAPI/Datasets.jl 76.92% <100.00%> (+41.77%) ⬆️

... and 2 files with indirect coverage changes

📢 Thoughts on this report? Let us know!.

@kongdd
Copy link
Contributor Author

kongdd commented Oct 1, 2023

@lazarusA, do you know about the Broken in tests?

It shows that 9 broken. But I can't found out which test failed.

image

https://github.com/JuliaDataCubes/YAXArrays.jl/actions/runs/6368945266/job/17288790299?pr=337

@kongdd
Copy link
Contributor Author

kongdd commented Oct 1, 2023

The test of Datasets is commented. I am not sure whether should I uncomment this line.

#include("Datasets/datasets.jl")

@kongdd
Copy link
Contributor Author

kongdd commented Oct 1, 2023

#336, #330 are solved now. #320 should also be. But I have no data to test.

@lazarusA
Copy link
Collaborator

lazarusA commented Oct 1, 2023

I'm doing another CI run. Let's see, I cannot do much today, only things from my phone. I could take a deeper look once I'm at my computer

@kongdd
Copy link
Contributor Author

kongdd commented Oct 1, 2023

Thank you @lazarusA.
An ugly test was added here. All tests in datasets.jl are uncommented and passsed now.
image

@lazarusA
Copy link
Collaborator

lazarusA commented Oct 1, 2023

Could you use https://juliadatacubes.github.io/YAXArrays.jl/dev/examples/generated/UserGuide/openNetCDF/ ? It's Ti still appearing when reading the files?

@kongdd
Copy link
Contributor Author

kongdd commented Oct 1, 2023

Sure. New test Added and Passed.
image

@kongdd
Copy link
Contributor Author

kongdd commented Oct 1, 2023

I found both of DD.dim2key and DD.name are used in YAXArrays.jl. Their different return values might lead to bugs unexpectedly.

@lazarusA lazarusA merged commit 6160721 into JuliaDataCubes:master Oct 1, 2023
11 checks passed
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.

key :Ti not found
2 participants