-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump rattler for new lockfile support, fail on pypi packages #22
Conversation
see #21 |
src/pixi_lock.rs
Outdated
pypi_packages.dedup(); | ||
if !pypi_packages.is_empty() { | ||
warn!( | ||
"The following packages are not conda packages and will be ignored: {:?}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we shouldn't warn but error in this case. nobody reads warnings unless the program exits with code 1
src/pixi_lock.rs
Outdated
match package { | ||
LockedPackageRef::Conda(conda_package) => { | ||
let package_record = conda_package.record(); | ||
package_records.push(package_record.to_owned()); | ||
} | ||
LockedPackageRef::Pypi(_, _) => { | ||
pypi_packages.push(package.name().to_string()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should deduplicate this code and put it into a separate function
[project] | ||
name = "conda-metadata-app" | ||
version = "0.1.0" | ||
description = "A streamlit app to query metadata from conda packages" | ||
authors = ["jaimergp <jaimergp@users.noreply.github.com>"] | ||
channels = ["conda-forge"] | ||
platforms = ["linux-64", "win-64", "osx-arm64", "osx-64"] | ||
|
||
[tasks] | ||
dev = "streamlit run --server.runOnSave=true app.py" | ||
deploy = "streamlit run --server.headless=true --global.developmentMode=false app.py" | ||
schema = "python app_config.py" | ||
|
||
[dependencies] | ||
python = "3.12.*" | ||
pip = "23.3.2.*" | ||
pydantic-settings = ">=2.4.0,<3" | ||
pydantic = ">=2.8.2,<3" | ||
typing-extensions = ">=4.12.2,<5" | ||
zstandard = ">=0.23.0,<0.24" | ||
py-rattler = ">=0.7.0,<0.8" | ||
setuptools = "*" | ||
|
||
[feature.dev.dependencies] | ||
pixi-pycharm = ">=0.0.6,<0.0.7" | ||
|
||
[pypi-dependencies] | ||
conda-forge-metadata = ">=0.11.0,<0.12" | ||
conda-oci-mirror = { git = "https://github.com/channel-mirrors/conda-oci-mirror.git", rev = "25ea3e436f0b0bc5a9c646121efafc9c68e116cd" } # v0.1.0 | ||
streamlit = ">=1.38.0,<2" | ||
streamlit-searchbox = "==0.1.16" | ||
|
||
[environments] | ||
default = {} | ||
dev = { features = ["dev"], no-default-feature = true } | ||
|
||
[tool.conda-deny] | ||
license-whitelist = "license_whitelist.toml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's make this example smaller
[project] | |
name = "conda-metadata-app" | |
version = "0.1.0" | |
description = "A streamlit app to query metadata from conda packages" | |
authors = ["jaimergp <jaimergp@users.noreply.github.com>"] | |
channels = ["conda-forge"] | |
platforms = ["linux-64", "win-64", "osx-arm64", "osx-64"] | |
[tasks] | |
dev = "streamlit run --server.runOnSave=true app.py" | |
deploy = "streamlit run --server.headless=true --global.developmentMode=false app.py" | |
schema = "python app_config.py" | |
[dependencies] | |
python = "3.12.*" | |
pip = "23.3.2.*" | |
pydantic-settings = ">=2.4.0,<3" | |
pydantic = ">=2.8.2,<3" | |
typing-extensions = ">=4.12.2,<5" | |
zstandard = ">=0.23.0,<0.24" | |
py-rattler = ">=0.7.0,<0.8" | |
setuptools = "*" | |
[feature.dev.dependencies] | |
pixi-pycharm = ">=0.0.6,<0.0.7" | |
[pypi-dependencies] | |
conda-forge-metadata = ">=0.11.0,<0.12" | |
conda-oci-mirror = { git = "https://github.com/channel-mirrors/conda-oci-mirror.git", rev = "25ea3e436f0b0bc5a9c646121efafc9c68e116cd" } # v0.1.0 | |
streamlit = ">=1.38.0,<2" | |
streamlit-searchbox = "==0.1.16" | |
[environments] | |
default = {} | |
dev = { features = ["dev"], no-default-feature = true } | |
[tool.conda-deny] | |
license-whitelist = "license_whitelist.toml" | |
[project] | |
name = "project-with-pypi" | |
channels = ["conda-forge"] | |
platforms = ["linux-64"] | |
[dependencies] | |
python = "3.12.*" | |
[pypi-dependencies] | |
conda-forge-metadata = ">=0.11.0,<0.12" | |
[tool.conda-deny] | |
license-whitelist = "license_whitelist.toml" |
Motivation
pixi
has introduced the version 6 forpixi.lock
files.The APIs for this version are slightly different.
Changes
This PR updates both
rattler_conda_types
andrattler_lock
to the newer version capable of handling version 6 lockfiles.