Skip to content

Commit

Permalink
Reduce size of test_pin_subpackage_benchmark
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
  • Loading branch information
mbargull committed Mar 20, 2024
1 parent 13ce323 commit 3d79e09
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 53 deletions.
103 changes: 52 additions & 51 deletions tests/test-recipes/metadata/_pin_subpackage_benchmark/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,43 @@
# https://github.com/conda-forge/arrow-cpp-feedstock/blob/e6f573674c5f9c35c6a614a1563b2fe3eeb3e72b/recipe/meta.yaml
# stripped of everything apart from the large number of inter-output
# pin_subpackage dependencies/run_exports.
# Addendum: Omit libarrow-all, pyarrow, pyarrow-tests to reduce benchmark duration.

package:
name: apache-arrow
version: 15.0.2

outputs:
- name: libarrow-all
build:
run_exports:
- {{ pin_subpackage("libarrow", max_pin="x") }}
- {{ pin_subpackage("libarrow-acero", max_pin="x") }}
- {{ pin_subpackage("libarrow-dataset", max_pin="x") }}
- {{ pin_subpackage("libarrow-flight", max_pin="x") }}
- {{ pin_subpackage("libarrow-flight-sql", max_pin="x") }}
- {{ pin_subpackage("libarrow-gandiva", max_pin="x") }}
- {{ pin_subpackage("libarrow-substrait", max_pin="x") }}
- {{ pin_subpackage("libparquet", max_pin="x") }}
requirements:
host:
- {{ pin_subpackage("libarrow", exact=True) }}
- {{ pin_subpackage("libarrow-acero", exact=True) }}
- {{ pin_subpackage("libarrow-dataset", exact=True) }}
- {{ pin_subpackage("libarrow-flight", exact=True) }}
- {{ pin_subpackage("libarrow-flight-sql", exact=True) }}
- {{ pin_subpackage("libarrow-gandiva", exact=True) }}
- {{ pin_subpackage("libarrow-substrait", exact=True) }}
- {{ pin_subpackage("libparquet", exact=True) }}
run:
- {{ pin_subpackage("libarrow", exact=True) }}
- {{ pin_subpackage("libarrow-acero", exact=True) }}
- {{ pin_subpackage("libarrow-dataset", exact=True) }}
- {{ pin_subpackage("libarrow-flight", exact=True) }}
- {{ pin_subpackage("libarrow-flight-sql", exact=True) }}
- {{ pin_subpackage("libarrow-gandiva", exact=True) }}
- {{ pin_subpackage("libarrow-substrait", exact=True) }}
- {{ pin_subpackage("libparquet", exact=True) }}
# - name: libarrow-all
# build:
# run_exports:
# - {{ pin_subpackage("libarrow", max_pin="x") }}
# - {{ pin_subpackage("libarrow-acero", max_pin="x") }}
# - {{ pin_subpackage("libarrow-dataset", max_pin="x") }}
# - {{ pin_subpackage("libarrow-flight", max_pin="x") }}
# - {{ pin_subpackage("libarrow-flight-sql", max_pin="x") }}
# - {{ pin_subpackage("libarrow-gandiva", max_pin="x") }}
# - {{ pin_subpackage("libarrow-substrait", max_pin="x") }}
# - {{ pin_subpackage("libparquet", max_pin="x") }}
# requirements:
# host:
# - {{ pin_subpackage("libarrow", exact=True) }}
# - {{ pin_subpackage("libarrow-acero", exact=True) }}
# - {{ pin_subpackage("libarrow-dataset", exact=True) }}
# - {{ pin_subpackage("libarrow-flight", exact=True) }}
# - {{ pin_subpackage("libarrow-flight-sql", exact=True) }}
# - {{ pin_subpackage("libarrow-gandiva", exact=True) }}
# - {{ pin_subpackage("libarrow-substrait", exact=True) }}
# - {{ pin_subpackage("libparquet", exact=True) }}
# run:
# - {{ pin_subpackage("libarrow", exact=True) }}
# - {{ pin_subpackage("libarrow-acero", exact=True) }}
# - {{ pin_subpackage("libarrow-dataset", exact=True) }}
# - {{ pin_subpackage("libarrow-flight", exact=True) }}
# - {{ pin_subpackage("libarrow-flight-sql", exact=True) }}
# - {{ pin_subpackage("libarrow-gandiva", exact=True) }}
# - {{ pin_subpackage("libarrow-substrait", exact=True) }}
# - {{ pin_subpackage("libparquet", exact=True) }}

- name: libarrow
build:
Expand Down Expand Up @@ -124,24 +125,24 @@ outputs:
run:
- {{ pin_subpackage("libarrow", exact=True) }}

- name: pyarrow
requirements:
host:
- {{ pin_subpackage("libarrow-all", exact=True) }}
run:
- {{ pin_subpackage("libarrow", exact=True) }}
- {{ pin_subpackage("libarrow-acero", exact=True) }}
- {{ pin_subpackage("libarrow-dataset", exact=True) }}
- {{ pin_subpackage("libarrow-flight", exact=True) }}
- {{ pin_subpackage("libarrow-flight-sql", exact=True) }}
- {{ pin_subpackage("libarrow-gandiva", exact=True) }}
- {{ pin_subpackage("libarrow-substrait", exact=True) }}
- {{ pin_subpackage("libparquet", exact=True) }}

- name: pyarrow-tests
requirements:
host:
- {{ pin_subpackage("libarrow-all", exact=True) }}
- {{ pin_subpackage('pyarrow', exact=True) }}
run:
- {{ pin_subpackage('pyarrow', exact=True) }}
# - name: pyarrow
# requirements:
# host:
# - {{ pin_subpackage("libarrow-all", exact=True) }}
# run:
# - {{ pin_subpackage("libarrow", exact=True) }}
# - {{ pin_subpackage("libarrow-acero", exact=True) }}
# - {{ pin_subpackage("libarrow-dataset", exact=True) }}
# - {{ pin_subpackage("libarrow-flight", exact=True) }}
# - {{ pin_subpackage("libarrow-flight-sql", exact=True) }}
# - {{ pin_subpackage("libarrow-gandiva", exact=True) }}
# - {{ pin_subpackage("libarrow-substrait", exact=True) }}
# - {{ pin_subpackage("libparquet", exact=True) }}
#
# - name: pyarrow-tests
# requirements:
# host:
# - {{ pin_subpackage("libarrow-all", exact=True) }}
# - {{ pin_subpackage('pyarrow', exact=True) }}
# run:
# - {{ pin_subpackage('pyarrow', exact=True) }}
6 changes: 4 additions & 2 deletions tests/test_api_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ def test_pin_subpackage_benchmark(testing_config):

# Create variant config of size comparable (for subdir linux-64) to
# https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/3c7d60f56a8cb7d1b8f5a8da0b02ae1f1f0982d7/recipe/conda_build_config.yaml
# Addendum: Changed number of single-value keys from 327 to 33 to reduce benchmark duration.
def create_variant():
# ("pkg_1, ("1.1", "1.2", ...)), ("pkg_2", ("2.1", "2.2", ...)), ...
packages = ((f"pkg_{i}", (f"{i}.{j}" for j in count(1))) for i in count(1))
Expand All @@ -321,7 +322,8 @@ def create_variant():
zipped.append(package)
variant[package] = list(islice(versions, version_count))
variant["zip_keys"].append(zipped)
for version_count, package_count in [(3, 1), (2, 4), (1, 327)]:
# for version_count, package_count in [(3, 1), (2, 4), (1, 327)]:
for version_count, package_count in [(3, 1), (2, 4), (1, 33)]:
for package, versions in islice(packages, package_count):
variant[package] = list(islice(versions, version_count))
validate_spec("<generated>", variant)
Expand All @@ -330,4 +332,4 @@ def create_variant():
ms = api.render(
recipe, config=testing_config, channels=[], variant=create_variant()
)
assert len(ms) == 11
assert len(ms) == 11 - 3 # omits libarrow-all, pyarrow, pyarrow-tests

0 comments on commit 3d79e09

Please sign in to comment.