Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Conda: Add "track_features" and "app_own_environment" to repodata.json output(s)



  • First of all; we've been using ProGet for our more-and-more internal package distribution for more than a year now, and pretty happy about it!

    I recently tried to add some more metadata to a package, but two items are not taken over by ProGet: "track_features" and "app_own_environment". The first is simply a string, the second is a boolean. Both are available in a conda package's "index.json" file.

    Can these be added? Thanks!


  • inedo-engineer

    Hi @e-rotteveel_1850,

    Glad to hear it!

    Our only exposure to the Conda ecosystem is writing a feed for it, so hope you don't mind a few "dumb" questions :)

    Are there any official/public packages (from like the anaconda repository) that have this field? I presume those would also be in their index.

    Any idea where these might be officially documented? I found a reference in the meta.yaml specs, but you said "json" and that's clearly "yaml". I figure maybe it turns into a json at some point.

    Are there any similar fields? I see we parse a bunch of fields, like constrains to dev_url.

    Cheers,
    Alana



  • A good example for "track_features" is this package: https://anaconda.org/main/_low_priority, which directly explains the idea of "track_features": packages that "activate" features (either because they have "track_features" specified themselves or because their dependencies do so) will get a lower priority. The attribute is useful when you have a GPU build and a CPU build of the same package, and you want to prioritize one over the other.

    In our case, we wish to do exactly that: use track_features to prioritize a CPU version of a certain package over a GPU version because the former runs on any PC, while the latter only works with a proper GPU available.

    Some additional reading material is here: https://docs.conda.io/projects/conda/en/stable/user-guide/concepts/packages.html#track-features

    In any case, the "track_features" attribute can be found in the index.json file that is in a conda package.

    About the meta.yaml: that is a specification/configuration when building a package. The build process then generates the index.json file (and the about.json) and puts it in the package (under the info folder) for repositories to extract useful information from. I think that for ProGet, the index.json is more important than the about.json.

    Finally, this method gives a quite complete overview of all keys that may be in the index.json. They are not all neccessarily there, though. Here is the method/code:
    https://github.com/conda/conda-build/blob/8df6493565dae517165754bd75d7d74de1522dc3/conda_build/metadata.py#L1803

    Hope this helps!


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation