GithubHelp home page GithubHelp logo

ruamel.yaml-feedstock's Introduction

About ruamel.yaml-feedstock

Feedstock license: BSD-3-Clause

Home: https://sourceforge.net/p/ruamel-yaml

Package license: MIT

Summary: A YAML package for Python. It is a derivative of Kirill Simonov's PyYAML 3.11 which supports YAML1.1

Current build status

Azure
VariantStatus
linux_64_python3.10.____cpython variant
linux_64_python3.11.____cpython variant
linux_64_python3.12.____cpython variant
linux_64_python3.8.____cpython variant
linux_64_python3.9.____73_pypy variant
linux_64_python3.9.____cpython variant
linux_aarch64_python3.10.____cpython variant
linux_aarch64_python3.11.____cpython variant
linux_aarch64_python3.12.____cpython variant
linux_aarch64_python3.8.____cpython variant
linux_aarch64_python3.9.____73_pypy variant
linux_aarch64_python3.9.____cpython variant
linux_ppc64le_python3.10.____cpython variant
linux_ppc64le_python3.11.____cpython variant
linux_ppc64le_python3.12.____cpython variant
linux_ppc64le_python3.8.____cpython variant
linux_ppc64le_python3.9.____73_pypy variant
linux_ppc64le_python3.9.____cpython variant
osx_64_python3.10.____cpython variant
osx_64_python3.11.____cpython variant
osx_64_python3.12.____cpython variant
osx_64_python3.8.____cpython variant
osx_64_python3.9.____73_pypy variant
osx_64_python3.9.____cpython variant
osx_arm64_python3.10.____cpython variant
osx_arm64_python3.11.____cpython variant
osx_arm64_python3.12.____cpython variant
osx_arm64_python3.8.____cpython variant
osx_arm64_python3.9.____cpython variant
win_64_python3.10.____cpython variant
win_64_python3.11.____cpython variant
win_64_python3.12.____cpython variant
win_64_python3.8.____cpython variant
win_64_python3.9.____73_pypy variant
win_64_python3.9.____cpython variant

Current release info

Name Downloads Version Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms

Installing ruamel.yaml

Installing ruamel.yaml from the conda-forge channel can be achieved by adding conda-forge to your channels with:

conda config --add channels conda-forge
conda config --set channel_priority strict

Once the conda-forge channel has been enabled, ruamel.yaml can be installed with conda:

conda install ruamel.yaml

or with mamba:

mamba install ruamel.yaml

It is possible to list all of the versions of ruamel.yaml available on your platform with conda:

conda search ruamel.yaml --channel conda-forge

or with mamba:

mamba search ruamel.yaml --channel conda-forge

Alternatively, mamba repoquery may provide more information:

# Search all versions available on your platform:
mamba repoquery search ruamel.yaml --channel conda-forge

# List packages depending on `ruamel.yaml`:
mamba repoquery whoneeds ruamel.yaml --channel conda-forge

# List dependencies of `ruamel.yaml`:
mamba repoquery depends ruamel.yaml --channel conda-forge

About conda-forge

Powered by NumFOCUS

conda-forge is a community-led conda channel of installable packages. In order to provide high-quality builds, the process has been automated into the conda-forge GitHub organization. The conda-forge organization contains one repository for each of the installable packages. Such a repository is known as a feedstock.

A feedstock is made up of a conda recipe (the instructions on what and how to build the package) and the necessary configurations for automatic building using freely available continuous integration services. Thanks to the awesome service provided by Azure, GitHub, CircleCI, AppVeyor, Drone, and TravisCI it is possible to build and upload installable packages to the conda-forge anaconda.org channel for Linux, Windows and OSX respectively.

To manage the continuous integration and simplify feedstock maintenance conda-smithy has been developed. Using the conda-forge.yml within this repository, it is possible to re-render all of this feedstock's supporting files (e.g. the CI configuration files) with conda smithy rerender.

For more information please check the conda-forge documentation.

Terminology

feedstock - the conda recipe (raw material), supporting scripts and CI configuration.

conda-smithy - the tool which helps orchestrate the feedstock. Its primary use is in the construction of the CI .yml files and simplify the management of many feedstocks.

conda-forge - the place where the feedstock and smithy live and work to produce the finished article (built conda distributions)

Updating ruamel.yaml-feedstock

If you would like to improve the ruamel.yaml recipe or build a new package version, please fork this repository and submit a PR. Upon submission, your changes will be run on the appropriate platforms to give the reviewer an opportunity to confirm that the changes result in a successful build. Once merged, the recipe will be re-built and uploaded automatically to the conda-forge channel, whereupon the built conda packages will be available for everybody to install and use from the conda-forge channel. Note that all branches in the conda-forge/ruamel.yaml-feedstock are immediately built and any created packages are uploaded, so PRs should be based on branches in forks and branches in the main repository should only be used to build distinct package versions.

In order to produce a uniquely identifiable distribution:

  • If the version of a package is not being increased, please add or increase the build/number.
  • If the version of a package is being increased, please remember to return the build/number back to 0.

Feedstock Maintainers

ruamel.yaml-feedstock's People

Contributors

bgruening avatar conda-forge-admin avatar conda-forge-curator[bot] avatar davidbrochart avatar github-actions[bot] avatar ipoddar-ibm avatar jakirkham avatar kszucs avatar mariusvniekerk avatar mbargull avatar mwcraig avatar ocefpaf avatar pelson avatar regro-cf-autotick-bot avatar wolfv avatar xhochy avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ruamel.yaml-feedstock's Issues

Publish a `ruamel-yaml` output/metapackage

Comment:

...which just installs the ruamel.yaml package.

This would ease automated pip-interop as the package may be referred by it's canonicalized name:

In [5]: from packaging.utils import canonicalize_name

In [6]: canonicalize_name('ruamel.yaml')
Out[6]: 'ruamel-yaml'

ruamel.yaml breaks rhythmbox??

Here is the error I'm getting. From what I can tell rhythmbox does not import ruamel.yaml, but the error goes away if I uninstall. (This means that I can't listen to music and package at the same time ๐Ÿ˜ข )

christopher@christopher-ubuntu ~ $ rhythmbox

(rhythmbox:12799): Gtk-WARNING **: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
Error processing line 1 of /home/christopher/mc/lib/python3.5/site-packages/ruamel.yaml-0.15.18-py3.5-nspkg.pth:

Failed to import the site module
Traceback (most recent call last):
  File "/home/christopher/mc/lib/python3.5/site.py", line 167, in addpackage
    exec(line)
  File "<string>", line 1, in <module>
  File "/home/christopher/mc/lib/python3.5/types.py", line 166, in <module>
    import functools as _functools
  File "/home/christopher/mc/lib/python3.5/functools.py", line 23, in <module>
    from weakref import WeakKeyDictionary
  File "/home/christopher/mc/lib/python3.5/weakref.py", line 12, in <module>
    from _weakref import (
ImportError: cannot import name '_remove_dead_weakref'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/christopher/mc/lib/python3.5/site.py", line 563, in <module>
    main()
  File "/home/christopher/mc/lib/python3.5/site.py", line 550, in main
    known_paths = addsitepackages(known_paths)
  File "/home/christopher/mc/lib/python3.5/site.py", line 327, in addsitepackages
    addsitedir(sitedir, known_paths)
  File "/home/christopher/mc/lib/python3.5/site.py", line 206, in addsitedir
    addpackage(sitedir, name, known_paths)
  File "/home/christopher/mc/lib/python3.5/site.py", line 177, in addpackage
    import traceback
  File "/home/christopher/mc/lib/python3.5/traceback.py", line 5, in <module>
    import linecache
  File "/home/christopher/mc/lib/python3.5/linecache.py", line 8, in <module>
    import functools
  File "/home/christopher/mc/lib/python3.5/functools.py", line 23, in <module>
    from weakref import WeakKeyDictionary
  File "/home/christopher/mc/lib/python3.5/weakref.py", line 12, in <module>
    from _weakref import (
ImportError: cannot import name '_remove_dead_weakref'

Inconsistent naming with defaults

@msarahan & @kalefranz - please be aware that conda-forge packaged ruamel.yaml several months ago and it appears that you guys have recently added it to defaults, but with an inconsistent name ruamel_yaml. In the interests of maintaining consistent naming schemes (currently a requirement to ensure we don't blow different versions over the top of one another) would you be willing to consider renaming your package? If it means anything, it is worth noting that the name that you have chosen in defaults is inconsistent with the experience on pip also.

Thanks!

ModuleNotFoundError: No module named 'ruamel.yaml'

Issue:

after installing ruamel.yaml package, there is still no ruamel.yaml module:

from bash history:

 2144  conda create -c conda-forge -n dandi-ruamel-troubleshoot -y ruamel.yaml
 2145  conda activate dandi-ruamel-troubleshoot

results in

(dandi-ruamel-troubleshoot) $ python -c 'import ruamel.yaml'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'ruamel.yaml'

Environment (conda list):
(dandi-ruamel-troubleshoot) $ conda list
# packages in environment at /home/dandi/miniconda3/envs/dandi-ruamel-troubleshoot:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
ca-certificates           2021.10.8            ha878542_0    conda-forge
ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
libffi                    3.4.2                h9c3ff4c_4    conda-forge
libgcc-ng                 11.2.0              h1d223b6_11    conda-forge
libgomp                   11.2.0              h1d223b6_11    conda-forge
libstdcxx-ng              11.2.0              he4da1e4_11    conda-forge
libzlib                   1.2.11            h36c2ea0_1013    conda-forge
ncurses                   6.2                  h58526e2_4    conda-forge
openssl                   3.0.0                h7f98852_1    conda-forge
pip                       21.3               pyhd8ed1ab_0    conda-forge
python                    3.9.7           hf930737_3_cpython    conda-forge
python_abi                3.9                      2_cp39    conda-forge
readline                  8.1                  h46c0cb4_0    conda-forge
ruamel.yaml               0.17.16          py39h3811e60_0    conda-forge
ruamel.yaml.clib          0.2.2            py39h3811e60_2    conda-forge
setuptools                58.2.0           py39hf3d152e_0    conda-forge
sqlite                    3.36.0               h9cd32fc_2    conda-forge
tk                        8.6.11               h27826a3_1    conda-forge
tzdata                    2021d                he74cb21_0    conda-forge
wheel                     0.37.0             pyhd8ed1ab_1    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
zlib                      1.2.11            h36c2ea0_1013    conda-forge


Details about conda and system ( conda info ):
(dandi-ruamel-troubleshoot) $ conda info

     active environment : dandi-ruamel-troubleshoot
    active env location : /home/dandi/miniconda3/envs/dandi-ruamel-troubleshoot
            shell level : 3
       user config file : /home/dandi/.condarc
 populated config files : 
          conda version : 4.9.2
    conda-build version : not installed
         python version : 3.8.3.final.0
       virtual packages : __glibc=2.24=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /home/dandi/miniconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/dandi/miniconda3/pkgs
                          /home/dandi/.conda/pkgs
       envs directories : /home/dandi/miniconda3/envs
                          /home/dandi/.conda/envs
               platform : linux-64
             user-agent : conda/4.9.2 requests/2.24.0 CPython/3.8.3 Linux/4.19.0-0.bpo.9-amd64 debian/9.13 glibc/2.24
                UID:GID : 1001:1015
             netrc file : /home/dandi/.netrc
           offline mode : False

Resolving "cyclic" dependency with ruamel.yaml.clib

I gave the awkward "circular dependency" mentioned in conda-forge/ruamel.yaml.clib-feedstock#3 (comment) a look this morning.

Here is what we've got:

  • The Python package ruamel.yaml itself has an optional dependency on ruamel.yaml.clib:
    Guarded by :
    • try: ... from _ruamel_yaml import ... except: in ruamel.yaml.main
    • try: ... from .cyaml import ... except: in ruamel.yaml.__init__.py (ruamel.yaml.cyaml has the unconditional from _ruamel_yaml import ...)
  • The distribution ruamel.yaml has a hard* dependency on ruamel.yaml.clib:
    It is in extras_require but with an empty "extra" plus platform specifier which makes it a platform-dependent hard dependency, AFAIK.
    (* except for python >=3.8 for which ruamel.yaml.clib is not built for PyPI)
  • The Python module (or rather C/Cython extension ) _ruamel_yaml has a hard dependency on ruamel.yaml:
    Has a bunch of from ruamel.yaml... imports.
  • The distribution ruamel.yaml.clib has no dependencies.
    Which means its actual content, i.e., _ruamel_yaml, is simply broken if one pip/conda installs ruamel.yaml.clib (:tada: ... /s).

So, to cleanly resolve this messy situation (and assuming upstream doesn't change things in the foreseeable future), we can create yet another ruamel.yaml.* package that hosts only the Python code for ruamel.yaml (since the Python package has only an optional dependency on the C extension, as noted above).
My proposal for the ruamel packages is thus:

  • ruamel:
    • no changes (i.e., empty ruamel/__init__.py and nothing else).
  • ruamel.yaml:
    • convert to noarch: generic package which is itself empty and only has
      requirements:
        run:
          - ruamel.yaml.pylib {{ version }}
          - ruamel.yaml.clib >=0.1.2
  • ruamel.yaml.clib:
  • ruamel.yaml.pylib:

Now, a slight issue/decision remains:
We could make the current recipe have multiple outputs and create the proposed ruamel.yaml and ruamel.yaml.pylib packages from this repo. However, this would introduce a dependency cycle not in the actual package builds but between ruamel.yaml-feedstock and ruamel.yaml.clib-feedstock:

  • ruamel.yaml.clib-feedstock would depend on ruamel.yaml-feedstock due to ruamel.yaml.clib needing ruamel.yaml.pylib
  • ruamel.yaml-feedstock would depend on ruamel.yaml.clib-feedstock due to ruamel.yaml needing ruamel.yaml.clib

So, to avoid this "conda(-forge)-build-system-only" dependency, we'd need to not use outputs here, but

  1. Submit a new package ruamel.yaml.pylib to staged-recipes to create ruamel.yaml.pylib-feedstock.
  2. Change this repo's recipe to be noarch: generic and depend on ruamel.yaml.pylib and ruamel.yaml.clib
    (Even though this package will be "empty", we should retain the source: to continue getting updates via the bot and stay in-sync with the new ruamel.yaml.pylib.)
  3. Fix/update ruamel.yaml.clib's recipe to depend on ruamel.yaml.pylib.

Thoughts, @conda-forge/ruamel, @conda-forge/ruamel-yaml, @conda-forge/ruamel-yaml-clib, @jjhelmus, @mingwandroid, @msarahan?

Using ruemal.yaml to deal with rasa

Comment:

The following is yaml configuration file from rasa. I do not know how to append part 2 into part 1, especially meeting vartical bar | after examples.

# part 1
version: "3.1"
nlu:
- intent: greet
  examples: |
    - Hey
    - Hi
    - hey there [Sara](name)

# part 2
- intent: greet2
  examples: |
    - aaa
    - bbb

MNT: The ruamel.yaml recipe has some lint :(

This is the friendly conda-forge-admin automated user.

I've ran the conda-smithy linter and found some lint in this feedstock ๐Ÿ˜ข.

Here is what I have got:

  • The recipe must have a build/number section.

Thanks!

add ruamel.yaml.clib feedstock (distributions >= 0.16 breaks entry point loading)

As of v0.16 you split off C source to ruamel.yaml.clib, and added it as a dependency. However, this dependency has not been added as a dependency of this feedstock.
This is particularly an issue for any conda-forge feedstocks with a ruamel.yaml dependency, that have entry points. Because ruamel.yaml.clib is listed as an install requirement, an error is raised when trying to load entry points from packages that depend on ruamel.yaml.

For example, if I create a conda environment:

conda create -n ruamel_test python=3.6 ruamel.yaml

I can execute simple dump/load functionality without issue (I assume because it defaults to the non-C dumper/loader):

import ruamel.yaml as yaml
yaml.dump({"a": 1})
with open("myfile.yaml") as handle:
    yaml.load(handle)

However, if I create a simple package, that requires ruamel.yaml and has entry points:

from setuptools import setup
setup(
    name="ruamel_test",
    install_requires=["ruamel.yaml"],
    entry_points={
        "mygroup": [
            "myplugin = ruamel.yaml.dump"
        ]
    }   
)

Then install it with pip install --no-deps ., I can no longer load the entry points:

import pkg_resources
pkg_resources.load_entry_point("ruamel_test", "mygroup", "myplugin") 
---------------------------------------------------------------------------
DistributionNotFound                      Traceback (most recent call last)
<ipython-input-8-a0d548bef04d> in <module>
----> 1 pkg_resources.load_entry_point("ruamel_test", "mygroup", "myplugin")

//anaconda/envs/test_ruamel/lib/python3.6/site-packages/pkg_resources/__init__.py in load_entry_point(dist, group, name)
    487 def load_entry_point(dist, group, name):
    488     """Return `name` entry point of `group` for `dist` or raise ImportError"""
--> 489     return get_distribution(dist).load_entry_point(group, name)
    490 
    491 

//anaconda/envs/test_ruamel/lib/python3.6/site-packages/pkg_resources/__init__.py in load_entry_point(self, group, name)
   2850         if ep is None:
   2851             raise ImportError("Entry point %r not found" % ((group, name),))
-> 2852         return ep.load()
   2853 
   2854     def get_entry_map(self, group=None):

//anaconda/envs/test_ruamel/lib/python3.6/site-packages/pkg_resources/__init__.py in load(self, require, *args, **kwargs)
   2440             )
   2441         if require:
-> 2442             self.require(*args, **kwargs)
   2443         return self.resolve()
   2444 

//anaconda/envs/test_ruamel/lib/python3.6/site-packages/pkg_resources/__init__.py in require(self, env, installer)
   2463         # requirements for that extra are purely optional and skip over them.
   2464         reqs = self.dist.requires(self.extras)
-> 2465         items = working_set.resolve(reqs, env, installer, extras=self.extras)
   2466         list(map(working_set.add, items))
   2467 

//anaconda/envs/test_ruamel/lib/python3.6/site-packages/pkg_resources/__init__.py in resolve(self, requirements, env, installer, replace_conflicting, extras)
    784                     if dist is None:
    785                         requirers = required_by.get(req, None)
--> 786                         raise DistributionNotFound(req, requirers)
    787                 to_activate.append(dist)
    788             if dist not in req:

DistributionNotFound: The 'ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.8"' distribution was not found and is required by ruamel.yaml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.