-
-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: read feedstock name from rattler-build feedstock #2003
Merged
beckermr
merged 17 commits into
conda-forge:main
from
nichmor:fix/use-right-feedstock-name
Aug 5, 2024
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
df43fa3
fix: use right feedstock name
nichmor 2a22c1d
misc: add news entry
nichmor 72fdbe0
misc: change imports
nichmor 79f19cf
misc: remove comment
nichmor 4cb789b
Update conda_smithy/utils.py
nichmor 77f9779
misc: update doc comments
nichmor f3f494f
misc: add tests that will fail
nichmor 2cc1c34
misc: add test and update version bound
nichmor a60d716
misc: put upper bound to <2
nichmor fb4440a
misc: change upperbound
nichmor 0afac05
Update environment.yml
nichmor 1927c5b
misc: revert files as in old way
nichmor d354d99
Merge branch 'main' into fix/use-right-feedstock-name
nichmor 5f877d1
Merge branch 'main' into fix/use-right-feedstock-name
beckermr 7f226ae
misc: remove indirection
nichmor 9ed6b9b
Update conda_smithy/utils.py
nichmor c901838
Merge branch 'main' into fix/use-right-feedstock-name
beckermr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
from conda_build.metadata import MetaData | ||
from rattler_build_conda_compat.render import MetaData as RatlerBuildMetadata | ||
|
||
from conda_smithy.utils import ( | ||
RATTLER_BUILD, | ||
_get_metadata_from_feedstock_dir, | ||
get_feedstock_name_from_meta, | ||
) | ||
|
||
|
||
def test_get_metadata_from_feedstock_dir(noarch_recipe): | ||
feedstock_dir = noarch_recipe[0] | ||
|
||
build_tool = noarch_recipe[1]["conda_build_tool"] | ||
metadata = _get_metadata_from_feedstock_dir( | ||
feedstock_dir, noarch_recipe[1] | ||
) | ||
|
||
expected_metadata_type = ( | ||
RatlerBuildMetadata if build_tool == RATTLER_BUILD else MetaData | ||
) | ||
|
||
assert isinstance(metadata, expected_metadata_type) | ||
|
||
|
||
def test_get_feedstock_name_from_metadata(noarch_recipe): | ||
feedstock_dir = noarch_recipe[0] | ||
metadata = _get_metadata_from_feedstock_dir( | ||
feedstock_dir, noarch_recipe[1] | ||
) | ||
|
||
feedstock_name = get_feedstock_name_from_meta(metadata) | ||
|
||
assert feedstock_name == "python-noarch-test" | ||
|
||
|
||
def test_get_feedstock_name_from_rattler_metadata( | ||
rattler_noarch_recipe_with_context, | ||
): | ||
feedstock_dir = rattler_noarch_recipe_with_context[0] | ||
metadata = _get_metadata_from_feedstock_dir( | ||
feedstock_dir, rattler_noarch_recipe_with_context[1] | ||
) | ||
|
||
feedstock_name = get_feedstock_name_from_meta(metadata) | ||
|
||
assert feedstock_name == "python-noarch-test-from-context" | ||
|
||
|
||
def test_get_feedstock_name_from_rattler_metadata_multiple_outputs( | ||
rattler_recipe_with_multiple_outputs, | ||
): | ||
feedstock_dir = rattler_recipe_with_multiple_outputs[0] | ||
metadata = _get_metadata_from_feedstock_dir( | ||
feedstock_dir, rattler_recipe_with_multiple_outputs[1] | ||
) | ||
|
||
feedstock_name = get_feedstock_name_from_meta(metadata) | ||
|
||
assert feedstock_name == "mamba-split" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this work with a fresh feedstock? Because I am not sure if we will have the right
forge_config
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nichmor did you see this comment?