Skip to content

Conversation

@Jrice1317
Copy link
Contributor

@Jrice1317 Jrice1317 commented Jan 13, 2026

Description

Overview

This PR adds frozen environment metadata support across all installer types, enabling users to easily protect their environments.

Changes

  • Implemented metadata schema and validation
  • Added support for shell (SH) installers
  • Added support for macOS package (PKG) installers
  • Added support for Windows executable (EXE) installers
  • Extended integration test coverage across all installer types
  • Updated documentation and examples

Related Links

https://conda.org/learn/ceps/cep-0022/

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?

@github-project-automation github-project-automation bot moved this to 🆕 New in 🔎 Review Jan 13, 2026
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Jan 13, 2026
@Jrice1317 Jrice1317 changed the title Metadata Provide metadata to easily protect environments Jan 13, 2026
- Add version check for frozen environments
- Implement comprehensive testing for base and extra environments
- Handle different datatypes for frozen file specifications
- Add helper functions for version range validation
- Refine schema design for freeze_base and freeze_env
- Add validation models to catch configuration errors early
- Update examples and documentation
- Separate base environment vs extra_env freezing logic
@Jrice1317 Jrice1317 marked this pull request as ready for review January 14, 2026 14:19
@Jrice1317 Jrice1317 requested a review from a team as a code owner January 14, 2026 14:19
Copy link
Contributor

@lrandersson lrandersson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

- Conda-standalone version if frozen environments exist
"""

def get_frozen_env(path) -> str | None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def get_frozen_env(path) -> str | None:
def get_frozen_env(path: str) -> str | None:

(I'm assuming it's of type str so feel free to ignore)

fh.write("\n".join(builder))


def write_frozen(freeze_info, dst_dir):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any type annotations needed?



def write_index_cache(info, dst_dir, used_packages):
def write_index_cache(info: dict, dst_dir: str, used_packages):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def write_index_cache(info: dict, dst_dir: str, used_packages):
def write_index_cache(info: dict, dst_dir: str, used_packages: list[str]):

I think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure myself, which is why I left it hoping someone else would. 😅



def write_conda_meta(info, dst_dir, final_urls_md5s, user_requested_specs=None):
def write_conda_meta(info: dict, dst_dir: str, final_urls_md5s: tuple, user_requested_specs=None):
Copy link
Contributor

@marcoesters marcoesters Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def write_conda_meta(info: dict, dst_dir: str, final_urls_md5s: tuple, user_requested_specs=None):
def write_conda_meta(info: dict, dst_dir: str, final_urls_md5s: tuple[str, str], user_requested_specs: list[str] | None = None):



def write_initial_state_explicit_txt(info, dst_dir, urls):
def write_initial_state_explicit_txt(info: dict, dst_dir: str, urls: tuple):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just like with the md5 example above, you may want to add the types of the elements in the tuple

Jrice1317 and others added 3 commits January 23, 2026 10:40
Also added suggested type annotations for preconda.py

Co-authored-by: Marco Esters <mesters@anaconda.com>
@Jrice1317 Jrice1317 requested a review from marcoesters January 23, 2026 19:11
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

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

4 participants