Skip to content

Conversation

jezdez
Copy link
Member

@jezdez jezdez commented May 29, 2025

Description

More on this in conda/conda-planning#52 (tickets in conda repo to follow)

Relies on #14820
Resolves #15048

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

jezdez and others added 15 commits May 9, 2025 15:19
Co-authored-by: Jonathan J. Helmus <jjhelmus@gmail.com>
…ample

- Added a new `_generate_format_help_and_examples` function to dynamically generate help text and examples for export formats.
- Enhanced the `configure_parser` function to include a `--format` argument, allowing users to specify the export format.
- Implemented environment exporters for JSON and YAML formats, enabling serialization of conda environments to these formats.
- Updated the `execute` function to handle different export formats based on user input or file extension.
- Modified tests to validate the new JSON export functionality and ensure backward compatibility with YAML exports.
@github-project-automation github-project-automation bot moved this to 🆕 New in 🔎 Review May 29, 2025
@jezdez jezdez changed the title Implement environment export functionality with JSON support as an example Implement environment export plugin hook May 29, 2025
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label May 29, 2025
@jezdez
Copy link
Member Author

jezdez commented Jun 3, 2025

pre-commit.ci autofix

@jezdez jezdez marked this pull request as ready for review June 3, 2025 08:02
@jezdez jezdez requested a review from a team as a code owner June 3, 2025 08:02
jezdez added 4 commits July 29, 2025 17:55
- Implemented error handling for exporting environments with external packages (pip) and incomplete requested packages.
- Added a new test to verify that appropriate errors are raised when invalid environments are exported in explicit format.

This improves the robustness of the environment export functionality by ensuring that only valid environments can be exported in explicit format.
- Corrected the attribute access method for `base_url` and `subdir` in the export_explicit function to use `getattr` instead of `getatter`.
- This change improves the reliability of the environment export functionality by ensuring proper attribute retrieval from package objects.
jezdez and others added 4 commits July 29, 2025 19:17
Co-authored-by: Ken Odegard <kodegard@anaconda.com>
Co-authored-by: Ken Odegard <kodegard@anaconda.com>
…uration

- Added logic to override the environment's channel config when --override-channels is used with explicit channels, ensuring only requested channels appear in the exported environment file.
- Removed unused `override_channels` parameter from the Environment class constructor for clarity and maintainability.
jezdez and others added 3 commits July 29, 2025 22:39
Co-authored-by: Ken Odegard <kodegard@anaconda.com>
- Included the channels argument in the execute function to enhance the environment export process.
- This change ensures that the specified channels are considered during the export, improving the accuracy of the exported environment file.
jezdez added 2 commits July 29, 2025 23:20
…_export.py to streamline the environment export process.
- Replaced instances of the flask package with colorama in test_create.py, test_main_export.py, and test_prefix_data.py to ensure consistency in testing.
- Adjusted assertions and comments accordingly to reflect the change in the test package.
Co-authored-by: Ken Odegard <kodegard@anaconda.com>
@jezdez jezdez merged commit e7b992c into main Jul 29, 2025
75 checks passed
@jezdez jezdez deleted the env-exporter-hook branch July 29, 2025 23:59
@github-project-automation github-project-automation bot moved this from ✅ Approved to 🏁 Done in 🔎 Review Jul 29, 2025
@jaimergp
Copy link
Contributor

Woohoo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Fix incorrect behavior of conda export with --override-channels and --ignore-channels flags
5 participants