Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    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)

    Scheduled Pinned Locked Moved Support
    6 Posts 3 Posters 26 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E Offline
      e.rotteveel_1850
      last edited by

      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!

      atrippA 1 Reply Last reply Reply Quote 0
      • atrippA Offline
        atripp inedo-engineer @e.rotteveel_1850
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • E Offline
          e.rotteveel_1850
          last edited by

          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!

          atrippA 1 Reply Last reply Reply Quote 0
          • atrippA Offline
            atripp inedo-engineer @e.rotteveel_1850
            last edited by

            Thanks @e-rotteveel_1850 !

            This is super-helpful indeed, especially the package that has that metadata.

            Do you have an example package that is emitting app_own_environment in the index repo? It looked like it was handled slightly differently in the conda-build code you found, and might be a nested property.. or something. It also seems to be a bool.

            It isn't trivial to add fields but also not terribly complicated. I added an item PG-2876 that we hope to get in the Feb 7 maintenance release, but might get pushed back.

            Let us know if you're aware of a app_own_environment package as well, that really helps to test this. We likely will not use conda, but simply verify json/index data.

            1 Reply Last reply Reply Quote 0
            • E Offline
              e.rotteveel_1850
              last edited by

              Thanks for putting this on the issue tracker!

              As for "app_own_environment": I only found it in the sourcecode of Anaconda Navigator - a GUI package manager for conda environments. It seems a useful feature but I cannot find any other package that uses it.

              So if you cannot add "app_own_environment" without having extra info, you can just leave it out. It was just a nice-to-have.

              Looking forward to a new version with "track_features" added to the index output!

              1 Reply Last reply Reply Quote 0
              • gdivisG Offline
                gdivis inedo-engineer
                last edited by

                We've added both of these properties to the index - you should see them in this week's release of 2024.26 on Friday. Thanks for the feature request!

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • 1 / 1
                • First post
                  Last post
                Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation