feat(env): use miniconda and uv to install environments#50
Merged
Conversation
Refactor code structure for improved readability and maintainability
Closed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This standardizes the installation process, using miniconda and uv to create the following environments:
The base environment is a uv environment installed to /.venv, configured in /pyproject.toml, and extended with /Scripts/manage_envs/emme.pth. The tbm-r environment is a conda environment installed to LOCALAPPDATA/miniconda3/envs/tbm-r and configured in /Scripts/manage_envs/tbm-r/tbm-r.yml. The cmap-modedest environment is a hybrid environment created by installing uv into a conda environment, to support dependencies only available on conda-forge while getting some of the performance benefits from uv. It is installed to LOCALAPPDATA/miniconda3/envs/tbm-r
and configured in /Scripts/manage_envs/cmap-modedest/cmap-modedest.yml for conda-forge dependencies and /Scripts/manage_envs/cmap-modedest/requirements.txt for PyPI dependencies.
The lock file feature is currently only implemented for the base environment. This can be revisited once the
larchdependency of the cmap_modedest package is updated to a version available on PyPI.Previously, the CMAP-TRIP2 environment functioned as the base environment and the emme-plus environment was used when the EMME API is needed. Now, the base environment includes the EMME API. This also means that the base environment has been updated from python 3.9 to python 3.11 and from pandas 1.2 to pandas 2.0.