Activity for ruamel.yaml.cmd

  • Anthon van der Neut Anthon van der Neut modified ticket #11

    Merge key with multiple levels, invalid merge-expand output

  • Denys Fedoryshchenko Denys Fedoryshchenko posted a comment on ticket #11

    To remove unnecessary noise, here is a bit different example that can be compared same way:

  • Denys Fedoryshchenko Denys Fedoryshchenko posted a comment on ticket #11

    import yaml with open("1.yaml") as f: y = yaml.safe_load(f) # print(y) with open(r'merged.yaml', 'w') as file: yaml.dump(y, file) python yaml have different opinion: you can just run that and view merged result, which does replace values such as "cros://chromeos-5.10/x86_64/chromeos-amd-stoneyridge.flavour.config+x86-chromebook" to "cros://chromeos-5.10/x86_64/chromeos-amd-stoneyridge.flavour.config+x86-chromebook+CONFIG_MODULE_COMPRESS=n" and compare it with result your tool is generating on yaml...

  • Anthon van der Neut Anthon van der Neut modified ticket #11

    Merge key with multiple levels, invalid merge-expand output

  • Denys Fedoryshchenko Denys Fedoryshchenko modified a comment on ticket #11

    It generate wrong data, here is example what is in output: chromeos_nocompress_variants: <skipped some lines> x86_64: base_defconfig: cros://chromeos-5.10/x86_64/chromiumos-x86_64.flavour.config fragments: [x86-chromebook] extra_configs: - cros://chromeos-5.10/x86_64/chromeos-amd-stoneyridge.flavour.config+x86-chromebook - cros://chromeos-5.10/x86_64/chromeos-intel-denverton.flavour.config+x86-chromebook - cros://chromeos-5.10/x86_64/chromeos-intel-pineview.flavour.config+x86-chromebook - cros://chromeos-5.10/x86_64/chromiumos-x86_64.flavour.config+x86-chromebook...

  • Denys Fedoryshchenko Denys Fedoryshchenko posted a comment on ticket #11

    It gets wrong data, here is example what is in output: chromeos_nocompress_variants: <skipped some lines> x86_64: base_defconfig: cros://chromeos-5.10/x86_64/chromiumos-x86_64.flavour.config fragments: [x86-chromebook] extra_configs: - cros://chromeos-5.10/x86_64/chromeos-amd-stoneyridge.flavour.config+x86-chromebook - cros://chromeos-5.10/x86_64/chromeos-intel-denverton.flavour.config+x86-chromebook - cros://chromeos-5.10/x86_64/chromeos-intel-pineview.flavour.config+x86-chromebook - cros://chromeos-5.10/x86_64/chromiumos-x86_64.flavour.config+x86-chromebook...

  • Anthon van der Neut Anthon van der Neut modified ticket #11

    Merge key with multiple levels, invalid merge-expand output

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #11

    Any indication of what is incorrect and/or a program to reproduce that? Doesn't it load, do you get wrong data, do you get wrong output when dumped?

  • Denys Fedoryshchenko Denys Fedoryshchenko created ticket #11

    Merge key with multiple levels, invalid merge-expand output

  • Anthon van der Neut Anthon van der Neut modified ticket #10

    roundtrip does not preserve escape newlines in double-quoted flow scalars

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #10

    This is unlikely going to be added. You should look into using folded scalars if you want newlines in your documents that are preserved on roundtrip but not in the loaded data: foo: >- bar, baz, qux The - after > is necessary to strip the trailing newline, as that is not in your double-quoted flow scalar.

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #10

    Ticket moved from /p/ruamel-yaml/tickets/401/

  • Lucas Cimon Lucas Cimon posted a comment on ticket #9

    Thank you! I confirm that the latest ruamel.yaml.cmd-0.5.7 version works fine for me

  • Anthon van der Neut Anthon van der Neut modified ticket #9

    ImportError: cannot import name 'text_type' from 'ruamel.yaml.compat'

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #9

    This was a result of ruamel.yaml no longer supporting py27 and ruamel.yaml.cmd relying on some compatibility code in the former. I had already made all the necessary changes in ruamel.yaml.cmd (so it worked for me localy) but forgot to push a new version to pypi. There is 0.5.7 now on pypi which should have this fixed. Thanks for reporting

  • Anthon van der Neut Anthon van der Neut committed [6f18b8]

    Added tag 0.5.7 for changeset 26d64a3b38da

  • Anthon van der Neut Anthon van der Neut committed [26d64a]

    removed support for 2.7 as per ruamel.yaml

  • Lucas Cimon Lucas Cimon created ticket #9

    ImportError: cannot import name 'text_type' from 'ruamel.yaml.compat'

  • Anthon van der Neut Anthon van der Neut committed [dc9773]

    added --width option to rt subcommand

  • Anthon van der Neut Anthon van der Neut committed [a0f2d3]

    Added tag 0.5.6 for changeset dc9773c7de1c

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #8

    You might be right. But if you would present it as a YAML transformation, showing what you wanted to do it should be right. Have you tried yaml rt --help resp. yaml rt --save <filename>?

  • Gabriel P Gabriel P posted a comment on ticket #8

    Are you sure question regarding CLI tool won't get down? Stackoverflow is primarily for code questions. but I am not writing a code here hence can not provide code snippet. I'm afraid such question might be just taken down and I would be redirected to e.g. superuser forum.

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #8

    Essentially a round trip is where you get back to where you were: you have YAML document in a file; load the document into data; make some changes; dump the data back into a file as YAML document. At the end you are back where you started. Using its round-trip mode ruamel.yaml tries to preserve comments, tags and other things during such a round-trip. (A bit of googling would show you that the documentation for the ruamel.yaml package underlying this commandline utility uses that term repeatedly)....

  • Gabriel P Gabriel P created ticket #8

    Please improve documentation. How do I use this thing?

  • ruamel.yaml.cmd ruamel.yaml.cmd released /ruamel.yaml.cmd-0.5.5.tar.xz

  • ruamel.yaml.cmd ruamel.yaml.cmd released /ruamel.yaml.cmd-0.5.4.tar.xz

  • Anthon van der Neut committed [df3388]

    Added tag 0.4.0 for changeset 253f0dd25950

  • Anthon van der Neut committed [27f161]

    new version

  • Anthon van der Neut committed [f4f0fd]

    new setup

  • Anthon van der Neut committed [a8839b]

    - _package_data converted from JSON to PON

  • Anthon van der Neut committed [5d2d21]

    update on metadata and wheel

  • Anthon van der Neut committed [115519]

    adapt to changes in pip/setuptools that prevented correct install

  • Anthon van der Neut committed [af4ccb]

    Added tag 0.2.3 for changeset 5d2d21f7a2a1

  • Anthon van der Neut committed [e88578]

    updated setup.py dependency on new ruamel.yaml.convert

  • Anthon van der Neut committed [c7ca64]

    update wheel

  • Anthon van der Neut committed [fca9b1]

    old version number

  • Anthon van der Neut committed [0d94d1]

    version number

  • Anthon van der Neut committed [901e2e]

    tox update for nested packages

  • Anthon van der Neut committed [6750e0]

    added mapping command

  • Anthon van der Neut committed [f103ca]

    Added tag 0.4.2 for changeset 0a92dfc02312

  • Anthon van der Neut committed [b05e9e]

    first release

  • Anthon van der Neut committed [0a92df]

    by default suppress "normal" anchors/aliases in merge_expand

  • Anthon van der Neut committed [442e92]

    Added tag 0.2.4 for changeset c7ca643f6bb7

  • Anthon van der Neut committed [7ccde3]

    Added tag 0.3.1 for changeset e88578022a24

  • Anthon van der Neut committed [253f0d]

    added merge_expand option

  • Anthon van der Neut committed [58739b]

    new version

  • Anthon van der Neut committed [fd07aa]

    Added tag 0.4.1 for changeset 5428cffcd523

  • Anthon van der Neut committed [5428cf]

    add option to smarten multiline strings and quotes

  • Anthon van der Neut committed [139c95]

    Added tag 0.2.0 for changeset a8839b09c406

  • Anthon van der Neut committed [11318a]

    Added tag 0.2.2 for changeset 11551932b389

  • Anthon van der Neut committed [f9422e]

    new setup.py, suppressing -nspkg.pth

  • Anthon van der Neut committed [ddc3e9]

    Added tag 0.5.5 for changeset f9422e267082

  • Anthon van der Neut committed [67684f]

    using YAML class, fixes issue #4

  • Anthon van der Neut committed [719ad8]

    Added tag 0.5.4 for changeset 67684f236e78

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #5

    status set to resolved (originally posted on 2018-10-15 at 06:34:31)

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #5

    Sorry for that, I had only tested with yaml -h. 0.5.3 should now have that fixed (and tox based testing works as well again) (originally posted on 2018-10-15 at 05:31:02)

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #5

    After upgrading to 0.5.1: Traceback (most recent call last): File "f:\portableapps\python\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "f:\portableapps\python\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "F:\PortableApps\Python\Scripts\yaml.exe\__main__.py", line 9, in <module> File "f:\portableapps\python\lib\site-packages\ruamel\yaml\cmd\__main__.py", line 212, in main sys.exit(n.run()) File "f:\portableapps\python\lib\site-packages\ruamel\yaml\cmd\__main__.py",...

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #5

    I uploaded a new version of ruamel.yaml.cmd (0.5.1), can you try that one, and if that works close this issue? (originally posted on 2018-10-14 at 12:38:36)

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #5

    Those .pth files extend the paths from which python imports, which is only important if you install next to each other. (originally posted on 2018-10-14 at 11:45:35)

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #5

    It looks like pip/distutils/setuptools once more screw up installing and handling namespace packages properly. If you install ruamel.yaml separately things work fine. If you remove the ruamel.yaml.cmd-0.5.0* info from site-packages things work so that metadata interferes in some way. (originally posted on 2018-10-14 at 11:42:25)

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #5

    .Confirmed on Windows: after removing the pth file for yaml.cmd, I can run "from ruamel.yaml import YAML" again. But yaml(.exe) still doesn't work because of the missing pth file. Why are those even needed?! The only other package on my machine that uses a pth file is pywin32. (originally posted on 2018-10-14 at 11:41:39 by Thorsten Kampe <thorstenkampe@bitbucket>)

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #5

    The issue is the .pth file for yaml.cmd: sudo rm /usr/local/lib/python3.6/dist-packages/ruamel.yaml.cmd-0.5.0-py3.6-nspkg.pth python3 -c 'from ruamel.yaml import YAML' [no error] (originally posted on 2018-10-14 at 11:34:27 by Thorsten Kampe <thorstenkampe@bitbucket>)

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #5

    it actually is a problem with yaml.cmd. Uninstalling yaml.cmd removes the yaml error: sudo --set-home pip3 uninstall ruamel.yaml.cmd Uninstalling ruamel.yaml.cmd-0.5.0: Would remove: /usr/local/bin/yaml /usr/local/lib/python3.6/dist-packages/ruamel.yaml.cmd-0.5.0-py3.6-nspkg.pth /usr/local/lib/python3.6/dist-packages/ruamel.yaml.cmd-0.5.0.dist-info/* /usr/local/lib/python3.6/dist-packages/ruamel/yaml/cmd/* Proceed (y/n)? y Successfully uninstalled ruamel.yaml.cmd-0.5.0 python3 -c 'from ruamel.yaml...

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #5

    it looks like yaml.cmd pulls in the wrong(?) dependencies: Installing ruamel.yaml directly: sudo --set-home pip3 install ruamel.yaml Collecting ruamel.yaml Downloading https://files.pythonhosted.org/packages/e0/5b/1e2fe3c00e0ecf37bebeb0a7c7eab24bbcc0cb0d7fab8e7ab3e41eaf788c/ruamel.yaml-0.15.72-cp36-cp36m-manylinux1_x86_64.whl (659kB) 100% |████████████████████████████████| 665kB 122kB/s Installing collected packages: ruamel.yaml Successfully installed ruamel.yaml-0.15.72 python3 -c 'from ruamel.yaml...

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #5

    Older versions of ruamel.yaml ( < 0.15 ) don't have YAML imported into ruamel.yaml.__init__.py, so ruamel.yaml.cmd cannot find that. That is why I asked for the version, but I realise it was not clear that I needed the ruamel.yaml version number on your windows installation, not the ruamel.yaml.cmd version. You are not using anaconda do you (their stuff is broken). (originally posted on 2018-10-14 at 11:04:12)

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #5

    The Ubuntu package (python3-ruamel.yaml) works. I'm trying to figure out the difference between the pip version and the apt-get package. (originally posted on 2018-10-14 at 10:57:32 by Thorsten Kampe <thorstenkampe@bitbucket>)

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #5

    This is not a yaml.cmd issue but a yaml issue. I tested it on Linux going back to 1.4.12 and Python 2.7: all show the same error. (originally posted on 2018-10-14 at 10:54:25 by Thorsten Kampe <thorstenkampe@bitbucket>)

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #5

    status set to on hold How did you install ruamel.yaml.cmd? Which version is this? If you install using pip it will install/upgrade ruamel.yaml to version 0.15.72 (https://bitbucket.org/ruamel/yaml.cmd/src/6750e051d2f24dffc97e1e9192928268b536d79a/init.py#lines-19) (originally posted on 2018-10-14 at 10:36:58)

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #4

    status set to resolved using YAML class, fixes issue #4 When this change indeed resolves your problem, please Close this issue. (You can do so using the WorkFlow pull-down (close to the top right of this page)) → <<cset 67684f236e78="">></cset> (originally posted on 2019-07-14 at 07:38:30)

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #4

    I also get this, with and without the --indent arg (originally posted on 2019-07-12 at 08:56:47 by John Vandenberg <John Vandenberg@bitbucket>)

  • Anthon van der Neut Anthon van der Neut posted a comment on ticket #2

    status set to closed (originally posted on 2017-01-13 at 19:07:56)

1 >