โ† All ACP Flashcard Decks

ACP Conda Build & Distribution Flashcards

6 cards from real ACP practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 6 ACP Conda Build & Distribution flashcards as text
  1. When uploading a package to Anaconda.org via the CLI, which command is used?

    Answer: anaconda upload

    The `anaconda upload` command (from the anaconda-client package) pushes a built .tar.bz2 or .conda file to your Anaconda.org channel.

  2. What is the purpose of the `build_number` field in a meta.yaml recipe?

    Answer: Distinguishes multiple builds of the same package version

    The `build_number` increments when a recipe is rebuilt without changing the package version, allowing conda to distinguish between different builds of the same release.

  3. To install a package from a private Anaconda.org channel owned by user `myorg`, which flag do you add to `conda install`?

    Answer: -c myorg

    The `-c myorg` (or `--channel myorg`) flag tells conda to search the `myorg` channel on Anaconda.org before the default channels.

  4. What is a `.conda` file format compared to the older `.tar.bz2` conda package format?

    Answer: A zip-based format with separate metadata and data archives for faster extraction

    The `.conda` format is a zip archive containing separate `pkg-*.tar.zst` (data) and `info-*.tar.zst` (metadata) components, enabling faster installs by extracting only needed parts.

  5. In a conda recipe, where would you add a `run_test.py` script to verify the package works after installation?

    Answer: In the test section of meta.yaml or as a run_test.py file in the recipe directory

    The `test` section in meta.yaml (or a `run_test.py` file alongside the recipe) specifies imports, commands, and scripts that conda-build runs to validate the installed package.

  6. Which conda-build feature allows you to build multiple variants of a package (e.g., different Python versions) from a single recipe?

    Answer: conda_build_config.yaml

    The `conda_build_config.yaml` file defines variant matrices (e.g., `python: [3.9, 3.10, 3.11]`) so conda-build automatically produces one package per combination.