question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[recipe-spec] Allow for arbitrary optional dependencies

See original GitHub issue

Proposal:

Have a single top-level requirements section as there is currently with required keys host and run and then optionally allow any other keys to specify named dependencies.

A requirements.build key would then be handled the same as currently but test dependencies would now be included as an optional requirements.test key. The specification of test dependencies under requirements.test would then be consistent with the specification of other dependencies under requirements (e.g. requirements.build rather than build.requirements)

In this way mamba/boa could provide support for the extras_require capability in setuptools/pip which is very widely used, and very useful.

Similar to setuptools, having a special-cased test requirements section could be removed in favour of treating them like any other optional dependency: image

To get the benefit of this new capability would require all the requirements to be saved in the package metadata and for mamba to allow users to install any named dependencies in the package metadata.

Currently, it’s very awkward for users to create either a build or test environment as there’s no way to tell mamba to create an environment with those specific deps.

The current recommendation to instead create separate outputs for any optional dependencies is awkward to specify and clutters up package repositories with multiple metadata-only packages for every single build.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
wolfvcommented, Feb 23, 2022

I think the multi-packages / multi-output way would be by far more backward compatible.

I see your point – if we consider having many (empty) packages to be expensive. Let’s let this ferment a bit.

1reaction
wolfvcommented, Feb 17, 2022

Regarding moving the test requirements under the requirements.test (instead of test.requires) is something I thought about today and maybe that’s the first step into this direction, actually.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Next gen conda recipe spec - HackMD
easy (or even allows) putting arbitrary content in mapping keys. ... It would be great if there was a better story for optional...
Read more >
Include all optional dependencies? · Issue #24 - GitHub
Should we include all optional dependencies in the recipe so that the proper versions of other heavy packages are installed such as PyQt...
Read more >
Dependencies Management in Setuptools
Optional dependencies #. Setuptools allows you to declare dependencies that are not installed by default. This effectively means that you can create a...
Read more >
Recipe Testing - OpenRewrite
OpenRewrite provides infrastructure that allows developers to quickly build tests to ... Optional dependencies and only needed if writing tests in Kotlin.
Read more >
Maven – Optional Dependencies and Dependency Exclusions
This section discusses optional dependencies and dependency exclusions. This will help users to understand what they are and when and how to use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found