-
Notifications
You must be signed in to change notification settings - Fork 30
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
docs/asdf-website-changes #446
Open
alphasentaurii
wants to merge
26
commits into
asdf-format:main
Choose a base branch
from
alphasentaurii:asdf-website
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
4660cb4
use furo theme, draft home page design
alphasentaurii 0593eae
fix incompatible sidebar config
alphasentaurii e9c9873
toc tree changes, home page css and image updates
alphasentaurii f46dbf7
adjustments to page hierarchy and toctree
alphasentaurii 5f39620
remove intro page (moved to asdf website overview
alphasentaurii 55e286a
remove png
alphasentaurii d528887
minor formatting fixes and ruff checks
alphasentaurii 01ae68c
update changelog
alphasentaurii afe4205
correct pr number
alphasentaurii 7d78ea0
add blank line
alphasentaurii 1d45761
update intersphinx mapping
alphasentaurii 483cf4d
isort and black formatting
alphasentaurii 8bf6eea
precommit fixes
alphasentaurii e20789f
update doc schema paths
alphasentaurii b92029f
precommit fixes
alphasentaurii 9d8e598
add asdf.rst to doc schemas test
alphasentaurii 4f7dd98
use asdf autoschemas
alphasentaurii 8df39f7
update doc test for asdf.rst
alphasentaurii 7e17639
remove yaml_schema from doc check
alphasentaurii dc3f811
use monokai for syntax highlighting in light mode also
alphasentaurii e51a3d5
force white background for graphviz objects
alphasentaurii 037be52
add blankline
alphasentaurii 6108ce0
custom style for graphviz output in darkmode
alphasentaurii 93799b9
fix typo
alphasentaurii a86e730
explicitly set dark mode pygments
alphasentaurii 4979acc
rerun precommit checks
alphasentaurii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,3 +132,6 @@ dmypy.json | |
|
||
# Ignore generated Sphinx documentation | ||
docs/source/generated/ | ||
|
||
# Mac OS | ||
.DS_STORE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
.. _asdf-schemas: | ||
|
||
ASDF Schemas | ||
============ | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:hidden: | ||
|
||
Schema Definitions <definitions.rst> | ||
Meta Schemas <meta-schemas.rst> | ||
Manifests <manifest.rst> | ||
Schema Implementation <implementation.rst> | ||
Schema Design and Editing <extending-asdf.rst> | ||
Default Annotation <default-annotation.rst> | ||
|
||
|
||
ASDF uses `JSON Schema`_ to perform validation of ASDF files. Schema validation | ||
of ASDF files serves the following purposes: | ||
|
||
* Ensures conformity with core data types defined by the ASDF Standard. ASDF | ||
readers can detect whether an ASDF file has been modified in a way that would | ||
render it unreadable or unrecognizable. | ||
* Enables interoperability between ASDF implementations. Implementations that | ||
recognize the same schema definitions should be able to interpret files | ||
containing instances of data types that conform to those schemas. | ||
* Allows for the definition of custom data types. External software packages | ||
can provide ASDF schemas that correspond to types provided by that package, | ||
and then serialize instances of those types in a way that is standardized | ||
and portable. | ||
|
||
All ASDF implementations must implement the types defined by the `core schemas | ||
<core-schema>` and validate against them when reading files. [#]_ | ||
|
||
.. note:: | ||
.. [#] | ||
|
||
Implementations may expose the control of validation on reading to the | ||
user (e.g. to disable it on demand). However, validation on reading should | ||
be the default behavior. | ||
|
||
|
||
The ASDF | ||
Standard also defines other schemas, which are optional for ASDF implementations | ||
and maintained as part of the standard (mainly for historical reasons): | ||
|
||
* :ref:`astronomy <astronomy-schema>` | ||
|
||
More information on the schemas defined by ASDF can be found in :ref:`schema`. | ||
|
||
The ASDF Standard also defines two metaschemas which are used to validate the | ||
ASDF schemas themselves: | ||
|
||
* :doc:`YAML schema <yaml_schema>` | ||
* :doc:`ASDF Schema <asdf>` | ||
|
||
The ASDF tags (described by schemas) available under each ASDF standard version are all described | ||
by a single :doc:`manifest <manifest>` document for that ASDF standard version. | ||
|
||
|
||
.. Links | ||
|
||
.. _JSON Schema: http://json-schema.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.. _asdf: | ||
|
||
ASDF Schema | ||
=========== | ||
|
||
.. _asdf-schema-1.1.0: | ||
|
||
|
||
.. asdf-schema:: | ||
:schema_root: ../../resources/schemas/stsci.edu | ||
:standard_prefix: | ||
|
||
asdf/asdf-schema-1.1.0 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.. _default-annotation: | ||
|
||
Default annotation | ||
================== | ||
|
||
The JSON Schema spec includes a schema annotation attribute called ``default`` that | ||
can be used to describe the default value of a data attribute when that attribute | ||
is missing. Recent versions of the spec `point out <http://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.7.7.1.1>`__ | ||
that there is no single correct way to choose an annotation value when multiple | ||
are available due to references and combiners. This presents a problem when | ||
trying to fill in missing data in a file based on the schema ``default``: if | ||
multiple conflicting values are available, the software does not know how to choose. | ||
|
||
Previous versions of the ASDF Standard did not offer guidance on how | ||
to use ``default``. The Python reference implementation read the first default | ||
that it encountered as a literal value and inserted that value into the tree when | ||
the corresponding attribute was otherwise missing. Until version 2.8, it also | ||
removed attributes on write whose values matched their schema defaults. The | ||
resulting files would appear to the casual viewer to be missing data, and may in | ||
fact be invalid against their schemas if the any of the removed attributes were required. | ||
|
||
Implementations **must not** remove attributes with default values from the tree. | ||
Beginning with ASDF Standard 1.6.0, implementations also must not fill default values | ||
directly from the schema. This will avoid ambiguity when multiple schema defaults | ||
are present, and also permit the ``default`` attribute to contain a description | ||
that is not appropriate to use as a literal default value. For example:: | ||
|
||
default: An array of zeros matching the dimensions of the data array. | ||
|
||
For ASDF Standard < 1.6.0, filling default values from the schema is required. This is | ||
necessary to support files written by older versions of the Python implementation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.. _schema: | ||
|
||
Schema Definitions | ||
================== | ||
|
||
ASDF schemas are arranged into "modules". All ASDF implementations | ||
must support the "core" module, but the other modules are optional. | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
core <core.rst> | ||
astronomy <astronomy.rst> | ||
legacy <legacy.rst> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The manifests aren't schemas. I'm in favor of keeping the old heading:
"ASDF Standard Resources"