-
Notifications
You must be signed in to change notification settings - Fork 46
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
Emitting julia objects to YAML. #29
Comments
|
Why was this closed without an answer? |
Not sure, that was my mistake. Sorry about that |
I wish I had the time/knowledge to whip this out myself, but at this point I do not -- it would be much easier for someone else with the right knowledge to do it. Yet I really would like to have this functionality, so I am willing to kick in $20 to start a bounty in hopes that it will incentivize the right person. Maybe a few others can kick in as well. |
I'll have lots of time available for open-source come mid-December and was planning to devote some of it here so I won't mind working on an implementation for this around then if no one else has done it. No need for a bounty on my end. Before that though, it would be good to clear up why no development has happened on this package in over a year even though multiple pull requests are open. |
@jdlangs that'd be great. I think the long break since this has been actively worked on is due to two main things:
|
Sounds good, and thanks for stepping up to manage the development. It provides a lot of assurance to potential contributors that there's an active maintainer, even if they aren't able to add features themself. On the same note, aren't there a few pull requests that should have been merged quite a while ago? I'll point out #32 in particular. |
@jdlangs, did you (or anyone else) make progress on this? |
Unfortunately no.
On Thu, Feb 23, 2017 at 10:30 AM dreammaker ***@***.***> wrote:
@jdlangs <https://github.com/jdlangs>, did you (or anyone else) make
progress on this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#29 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFXxeLCVuz4X82miwIlGZIr4rX4WWLe9ks5rfcI5gaJpZM4HkqsW>
.
--
-monty
|
It would be great if this could be implemented |
I've had a look at this, and I guess the amount of effort involved would be closely correlated with the level of ambition. On the one hand, a simple YAML-emitting mechanism mirroring that of JSON.jl could probably be done in a matter of hours. On the other hand, there is a spectrum of stretch-goals, here. For example, one might want to let the user determine which syntax variants are used to serialize different components, and perhaps include line wrapping as part of the pretty-printing (taking indentation, etc., into account). And, perhaps more usefully, one might want to be able to preserve metadata when parsing, so that one could emit the same syntax forms, and even include the same insignificant whitespace, comments, etc., so that round-tripping via Another thing I've thought about now and then is whether it might be useful to go the PyYAML route, and simply wrap LibYAML. Of course, that introduces a black box, which is sort of un-Julian, and the conversion to/from Julia types would still have to be there. So maybe it's not that much more useful. |
I did make a Julia implementation of writing YAML files: https://github.com/mirkobunse/ComfyCommons.jl/blob/master/src/yaml.jl If there is still interest and a maintainer willing to review, I'll prepare a pull request from this sketch. What it already does:
What is currently missing:
EDIT: Of course, the Dicts and Vectors can be nested. |
Using ordered dictionaries would be very useful, I think – even though the YAML spec specifically doesn't care about ordering, in applications it can be quite useful if a library supports it. (Specifically having round-tripping, i.e., reading and then writing, not modify things too much. Ideally, it would preserve comments etc., as well, but I guess that requires a richer internal model.) |
is there any plans or progress to implement Yaml writing, or just try to incorporate the code @mirkobunse have write? |
If @mirkobunse's code is to be used, I guess it would have to be released under some other license, or contributed directly to the YAML.jl project (by @mirkobunse)? At present, it's licensed under GPL 3, and YAML.jl is under MIT. |
Sure, I can open a PR on YAML.jl to make a direct contribution. Thank you, @mlhetland, for keeping an eye on the licenses. |
The PR is open |
And maybe maintainer of this package should bump a new release. |
@mirkobunse, regarding the ordering, TOML has an option to sort when printing. |
Thanks for the hint! However, TOML seems to sort lexicographically. The order in a YAML file can be any order. The preservation of such requires some kind of an ordered dictionary. DataStructures.jl has one, by the way. |
I think ordered dictionaries were split off into OrderedCollections.jl. |
Hi everyone, with the release v0.4.2 it is now possible to read and write arbitrary subtypes of |
Are there plans to add an option to write YAML files soon?
The text was updated successfully, but these errors were encountered: