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

remove use of _get_yaml_content #87

Merged
merged 1 commit into from
May 9, 2024

Conversation

braingram
Copy link
Contributor

@braingram braingram commented Dec 9, 2023

This PR removes use of the _get_yaml_content argument passed to asdf.open. It is replaced by using asdf.generic_io.GenericFile.reader_until to read the file bytes until the yaml end-of-document marker.

The previous code did not read the asdf-standard nor the file version from the file using the call to asdf.open where _get_yaml_content was passed and instead opened the file a second time to read these values. The updated code does not require this second file opening and reads these versions with the same code block using reader_until.

I don't entirely trust the CI here as testing these changes requires some downstream library to use the asdf directive. I am opening this for review but will check and update this PR once I find and manually build documentation for a project that uses the updated directive.

@braingram braingram marked this pull request as ready for review December 9, 2023 15:02
@braingram braingram requested a review from eslavich December 9, 2023 15:02
@braingram
Copy link
Contributor Author

The asdf documentation here:
https://asdf.readthedocs.io/en/latest/asdf/overview.html#hello-world
rendered with this PR looks identical:
Screen Shot 2023-12-11 at 9 33 17 AM

@braingram braingram closed this May 9, 2024
@braingram braingram reopened this May 9, 2024
@braingram braingram force-pushed the get_yaml_content branch from b81dc08 to 467fe93 Compare May 9, 2024 20:49
@braingram braingram merged commit 3530e22 into asdf-format:main May 9, 2024
18 of 19 checks passed
@braingram braingram deleted the get_yaml_content branch May 9, 2024 21:00
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.

1 participant