Comments (7)
Thanks for the pointers! I will have more questions, but what does a schema URI look like?
from dkist.
what does a schema URI look like?
That's the id
property of the schema. In the case of that array container example it'll be http://dkist.nso.edu/schemas/dkist/array_container-0.2.0
.
BTW, there's a new feature coming in asdf 2.8 that's going to make the tag validator super convenient. It'll allow wildcards like this:
tag: "tag:dkist.nso.edu:dkist/array_container-*"
So any version of the array_container tag will be valid. That'll save us from having to create e.g. a dataset-0.2.0 schema just because array_container-0.3.0 was released.
from dkist.
Despite reading over the docs like 10 times, I am still struggling to work out what the difference between referencing the schema and the tag is. Especially given the standard docs say:
ASDF implementations must be able to resolve references using both id and tag attributes
That'll save us from having to create e.g. a dataset-0.2.0 schema just because array_container-0.3.0 was released.
This is also interesting given I am currently trying to work out how to update these schemas to adapt to the gwcs 1.1.0 schema (and removal of the 1.0.0 schema in 0.14). I posted something in the astropy #gwcs channel about this (not sure if you are in there).
from dkist.
ASDF implementations must be able to resolve references using both id and tag attributes
Oh wow, I didn't know that was in the standard. So that behavior is not an accident at all. I'm going to have to think about that some more.
The tag URI identifies the object's YAML "type", it lets readers know that the object is something special and not just a vanilla YAML structure. The schema URI identifies the schema content, it's the document identifier for the schema itself. Historically we've had a 1:1 correspondence between schemas and tags but it doesn't have to be that way. For example, in the schemas for modeling, we noticed that ~ 1/3 of them are exact duplicates of other schemas. If we reuse the same schema file for multiple tags then we'll significantly cut down our maintenance burden.
I'm not sure what the original motivation was for allowing tag URIs to be $ref
targets. It doesn't make sense to me, $ref
is supposed to incorporate external schema content identified by a URI. Incorporating a tag into a schema has no meaning since tags and schemas are apples and oranges.
Anyway since as you rightly point out that the standard protects referencing schemas by tag, this doesn't have to change. It may be that we strike this from the standard someday but that could happen only with a new major version.
from dkist.
heh, glad I found something in the spec which might need to be removed 😀
Am I correct in thinking that there will always be a single schema for a tag though, even if there are multiple tags for a schema?
Also the wildcard behaviour in asdf-format/asdf-standard#271 seems useful to me here, for instance in dealing with the gwcs version update, does that make sense to extend to schemas as well as tags?
from dkist.
Am I correct in thinking that there will always be a single schema for a tag though, even if there are multiple tags for a schema?
I think so. If someone needed to validate against multiple schemas, they could just combine them into one with using allOf
and $ref
.
Also the wildcard behaviour in asdf-format/asdf-standard#271 seems useful to me here, for instance in dealing with the gwcs version update, does that make sense to extend to schemas as well as tags?
I'm hesitant to modify the behavior of $ref
because it's defined by JSON schema, whereas the tag
property is something we own.
from dkist.
I'm hesitant to modify the behavior of $ref because it's defined by JSON schema, whereas the tag property is something we own.
That makes sense, but then if I am using $ref
and id's in the schemas, I am still in the situation where the schemas have to have hard versions in them?
from dkist.
Related Issues (20)
- `dkist` 1.1.0 does not have a minimum requirement of asdf-wcs-schemas matching what the latest asdf files require
- `transfer_complete_datasets` should only start one transfer job per call
- Convert the "Bounding Box" column in a Fido search result to a SkyCoord column HOT 2
- Adopt and follow the sunpy package template
- Update tutorial to use new DDT data HOT 1
- basepath what now?
- DKIST dataset load memory usage is doubled HOT 2
- Fetching local attr values can raise an exception
- Add docs on TiledDataset
- Provide an example to modify WCS of a DKIST `Dataset` HOT 2
- Make TiledDataset better
- Provide an informative repr for TiledDataset
- Expose the shape of all the tiles
- Apply same slice to all tiles in dataset
- Add a `.plot` helper which produces the tiled plot in https://docs.dkist.nso.edu/projects/python-tools/en/stable/howto_guides/reproject_vbi_mosaic.html
- Provide helpers / guide to working with all arms of visp at the same time.
- Improve dataset `__repr__`s
- Support missing tiles in `TiledDataset`
- When trying to plot quadrangles with a transform to VBI WCS there appears to be a unit error
- Port VBI / AIA overplotting example from the workshop into the docs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dkist.