Skip to content

Commit

Permalink
Merge branch 'main' into fix/export_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ruben-arts authored Nov 6, 2024
2 parents 5611309 + 1be5f6d commit 5950643
Show file tree
Hide file tree
Showing 174 changed files with 2,686 additions and 1,257 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/trampoline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ on:
push:
paths:
- 'crates/pixi_trampoline/**'
- '.github/workflows/trampoline.yaml'
- 'src/global/trampoline.rs'
workflow_dispatch:
pull_request:
paths:
- 'crates/pixi_trampoline/**'
- '.github/workflows/trampoline.yaml'
- 'src/global/trampoline.rs'

permissions:
contents: write # Allow write permissions for contents (like pushing to the repo)
Expand All @@ -25,6 +29,7 @@ jobs:
include:
- { name: "Linux-x86_64", target: x86_64-unknown-linux-musl, os: ubuntu-latest }
- { name: "Linux-aarch64", target: aarch64-unknown-linux-musl, os: ubuntu-latest }
- { name: "Linux-powerpc64", target: powerpc64-unknown-linux-gnu, os: ubuntu-latest }
- { name: "macOS-x86", target: x86_64-apple-darwin, os: macos-13 }
- { name: "macOS-arm", target: aarch64-apple-darwin, os: macos-14 }
- { name: "Windows", target: x86_64-pc-windows-msvc, os: windows-latest }
Expand Down
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,50 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### [0.35.0] - 2024-11-05
#### ✨ Highlights

`pixi global` now exposed binaries are not scripts anymore but actual executables.
Resulting in significant speedup and better compatibility with other tools.

#### Added

- Add language packages with minor pinning by default by @ruben-arts in [#2310](https://github.com/prefix-dev/pixi/pull/2310)
- Add grouping for exposing and removing by @nichmor in [#2387](https://github.com/prefix-dev/pixi/pull/2387)
- Add trampoline for pixi global by @Hofer-Julian and @nichmor in [#2381](https://github.com/prefix-dev/pixi/pull/2381)
- Adding SCM option for init command by @alvgaona in [#2342](https://github.com/prefix-dev/pixi/pull/2342)
- Create `.pixi/.gitignore` containing `*` by @maresb in [#2361](https://github.com/prefix-dev/pixi/pull/2361)

#### Changed

- Use the same package cache folder by @nichmor in [#2335](https://github.com/prefix-dev/pixi/pull/2335)zx
- Disable progress in non tty by @ruben-arts in [#2308](https://github.com/prefix-dev/pixi/pull/2308)
- Improve global install reporting by @Hofer-Julian in [#2395](https://github.com/prefix-dev/pixi/pull/2395)
- Suggest fix in platform error message by @maurosilber in [#2404](https://github.com/prefix-dev/pixi/pull/2404)
- Upgrading uv to `0.4.30` by @tdejager in [#2372](https://github.com/prefix-dev/pixi/pull/2372)

#### Documentation

- Add pybind11 example by @alvgaona in [#2324](https://github.com/prefix-dev/pixi/pull/2324)
- Replace build with uv in pybind11 example by @alvgaona in [#2341](https://github.com/prefix-dev/pixi/pull/2341)
- Fix incorrect statement about env location by @opcode81 in [#2370](https://github.com/prefix-dev/pixi/pull/2370)

#### Fixed

- Global update reporting by @Hofer-Julian in [#2352](https://github.com/prefix-dev/pixi/pull/2352)
- Correctly display unrequested environments on `task list` by @jjjermiah in [#2402](https://github.com/prefix-dev/pixi/pull/2402)

#### Refactor

- Use built in string methods by @KGrewal1 in [#2348](https://github.com/prefix-dev/pixi/pull/2348)
- Reorganize integration tests by @Hofer-Julian in [#2408](https://github.com/prefix-dev/pixi/pull/2408)
- Reimplement barrier cell on OnceLock by @KGrewal1 in [#2347](https://github.com/prefix-dev/pixi/pull/2347)

#### New Contributors
* @maurosilber made their first contribution in [#2404](https://github.com/prefix-dev/pixi/pull/2404)
* @opcode81 made their first contribution in [#2370](https://github.com/prefix-dev/pixi/pull/2370)
* @alvgaona made their first contribution in [#2342](https://github.com/prefix-dev/pixi/pull/2342)

### [0.34.0] - 2024-10-21
#### ✨ Highlights

Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ authors:
- given-names: Julian
family-names: Hofer
email: [email protected]
repository-code: 'https://github.com/prefix-dev/pixi/releases/tag/v0.34.0'
url: 'https://pixi.sh/v0.34.0'
repository-code: 'https://github.com/prefix-dev/pixi/releases/tag/v0.35.0'
url: 'https://pixi.sh/v0.35.0'
abstract: >-
A cross-platform, language agnostic, package/project
management tool for development in virtual environments.
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ license.workspace = true
name = "pixi"
readme.workspace = true
repository.workspace = true
version = "0.34.0"
version = "0.35.0"

[features]
default = ["rustls-tls"]
Expand Down
2 changes: 1 addition & 1 deletion crates/pixi_consts/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub const CONFIG_FILE: &str = "config.toml";
pub const PIXI_DIR: &str = ".pixi";
pub const PIXI_VERSION: &str = match option_env!("PIXI_VERSION") {
Some(v) => v,
None => "0.34.0",
None => "0.35.0",
};
pub const PREFIX_FILE_NAME: &str = "pixi_env_prefix";
pub const ENVIRONMENTS_DIR: &str = "envs";
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/explain_info_command.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ In that case, if pixi cannot find the `__cuda` virtual package on your machine t
### Cache dir

The directory where pixi stores its cache.
Checkout the [cache documentation](../features/environment.md#caching) for more information.
Checkout the [cache documentation](../features/environment.md#caching-packages) for more information.

### Auth storage

Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/github_actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ We created [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) to
```yaml
- uses: prefix-dev/[email protected]
with:
pixi-version: v0.34.0
pixi-version: v0.35.0
cache: true
auth-host: prefix.dev
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion docs/advanced/production_deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ It also makes use of `pixi shell-hook` to not rely on pixi being installed in th
For more examples, take a look at [pavelzw/pixi-docker-example](https://github.com/pavelzw/pixi-docker-example).

```Dockerfile
FROM ghcr.io/prefix-dev/pixi:0.34.0 AS build
FROM ghcr.io/prefix-dev/pixi:0.35.0 AS build

# copy source code, pixi.toml and pixi.lock to the container
WORKDIR /app
Expand Down
27 changes: 26 additions & 1 deletion docs/features/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,31 @@ These directories are conda environments, and you can use them as such, but you
Pixi will always make sure the environment is in sync with the `pixi.lock` file.
If this is not the case then all the commands that use the environment will automatically update the environment, e.g. `pixi run`, `pixi shell`.

### Environment Installation Metadata
On environment installation, pixi will write a small file to the environment that contains some metadata about installation.
This file is called `pixi` and is located in the `conda-meta` folder of the environment.
This file contains the following information:
- `manifest_path`: The path to the manifest file that describes the project used to create this environment
- `environment_name`: The name of the environment
- `pixi_version`: The version of pixi that was used to create this environment
- `environment_lock_file_hash`: The hash of the `pixi.lock` file that was used to create this environment

```json
{
"manifest_path": "/home/user/dev/pixi/pixi.toml",
"environment_name": "default",
"pixi_version": "0.34.0",
"environment_lock_file_hash": "4f36ee620f10329d"
}
```

The `environment_lock_file_hash` is used to check if the environment is in sync with the `pixi.lock` file.
If the hash of the `pixi.lock` file is different from the hash in the `pixi` file, pixi will update the environment.

This is used to speedup activation, in order to trigger a full revalidation pass `--revalidate` to the `pixi run` or `pixi shell` command.
A broken environment would typically not be found with a hash comparison, but a revalidation would reinstall the environment.
By default, all lock file modifying commands will always use the revalidation and on `pixi install` it always revalidates.

### Cleaning up

If you want to clean up the environments, you can simply delete the `.pixi/envs` directory, and pixi will recreate the environments when needed.
Expand Down Expand Up @@ -186,7 +211,7 @@ For the `[pypi-dependencies]`, `uv` implements `sdist` building to retrieve the
For this building step, `pixi` requires to first install `python` in the (conda)`[dependencies]` section of the `pixi.toml` file.
This will always be slower than the pure conda solves. So for the best pixi experience you should stay within the `[dependencies]` section of the `pixi.toml` file.

## Caching
## Caching packages

Pixi caches all previously downloaded packages in a cache folder.
This cache folder is shared between all pixi projects and globally installed tools.
Expand Down
2 changes: 1 addition & 1 deletion docs/ide_integration/devcontainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Then, create the following two files in the `.devcontainer` directory:
```dockerfile title=".devcontainer/Dockerfile"
FROM mcr.microsoft.com/devcontainers/base:jammy

ARG PIXI_VERSION=v0.34.0
ARG PIXI_VERSION=v0.35.0

RUN curl -L -o /usr/local/bin/pixi -fsSL --compressed "https://github.com/prefix-dev/pixi/releases/download/${PIXI_VERSION}/pixi-$(uname -m)-unknown-linux-musl" \
&& chmod +x /usr/local/bin/pixi \
Expand Down
31 changes: 31 additions & 0 deletions docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,33 @@ pixi update --dry-run
pixi update --no-install boto3
```

## `upgrade`

The `upgrade` command checks if there are newer versions of the dependencies and upgrades them in the [manifest file](project_configuration.md).
`update` updates dependencies in the lock file while still fulfilling the version requirements set in the manifest.
`upgrade` loosens the requirements for the given packages, updates the lock file and the adapts the manifest accordingly.

##### Arguments

1. `[PACKAGES]...` The packages to upgrade, space separated. If no packages are provided, all packages will be upgraded.

##### Options
- `--manifest-path <MANIFEST_PATH>`: the path to [manifest file](project_configuration.md), by default it searches for one in the parent directories.
- `--feature <FEATURE> (-e)`: The feature to upgrade, if none are provided all features are upgraded.
- `--no-install`: Don't install the (solve) environment needed for solving pypi-dependencies.
- `--json`: Output the changes in json format.
- `--dry-run (-n)`: Only show the changes that would be made, without actually updating the manifest, lock file, or environment.

```shell
pixi upgrade
pixi upgrade numpy
pixi upgrade numpy pandas
pixi upgrade --manifest-path ~/myproject/pixi.toml numpy
pixi upgrade --feature lint python
pixi upgrade --json
pixi upgrade --dry-run
```

## `run`

The `run` commands first checks if the environment is ready to use.
Expand All @@ -208,6 +235,8 @@ You cannot run `pixi run source setup.bash` as `source` is not available in the
- `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](project_configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`.
- `--environment <ENVIRONMENT> (-e)`: The environment to run the task in, if none are provided the default environment will be used or a selector will be given to select the right environment.
- `--clean-env`: Run the task in a clean environment, this will remove all environment variables of the shell environment except for the ones pixi sets. THIS DOESN't WORK ON `Windows`.
- `--revalidate`: Revalidate the full environment, instead of checking the lock file hash. [more info](../features/environment.md#environment-installation-metadata)

```shell
pixi run python
pixi run cowpy "Hey pixi user"
Expand Down Expand Up @@ -636,6 +665,7 @@ To exit the pixi shell, simply run `exit`.
- `--frozen`: install the environment as defined in the lock file, doesn't update `pixi.lock` if it isn't up-to-date with [manifest file](project_configuration.md). It can also be controlled by the `PIXI_FROZEN` environment variable (example: `PIXI_FROZEN=true`).
- `--locked`: only install if the `pixi.lock` is up-to-date with the [manifest file](project_configuration.md)[^1]. It can also be controlled by the `PIXI_LOCKED` environment variable (example: `PIXI_LOCKED=true`). Conflicts with `--frozen`.
- `--environment <ENVIRONMENT> (-e)`: The environment to activate the shell in, if none are provided the default environment will be used or a selector will be given to select the right environment.
- `--revalidate`: Revalidate the full environment, instead of checking lock file hash. [more info](../features/environment.md#environment-installation-metadata)

```shell
pixi shell
Expand Down Expand Up @@ -664,6 +694,7 @@ This command prints the activation script of an environment.
- `--environment <ENVIRONMENT> (-e)`: The environment to activate, if none are provided the default environment will be used or a selector will be given to select the right environment.
- `--json`: Print all environment variables that are exported by running the activation script as JSON. When specifying
this option, `--shell` is ignored.
- `--revalidate`: Revalidate the full environment, instead of checking lock file hash. [more info](../features/environment.md#environment-installation-metadata)

```shell
pixi shell-hook
Expand Down
2 changes: 1 addition & 1 deletion install/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
.LINK
https://github.com/prefix-dev/pixi
.NOTES
Version: v0.34.0
Version: v0.35.0
#>
param (
[string] $PixiVersion = 'latest',
Expand Down
2 changes: 1 addition & 1 deletion install/install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
# Version: v0.34.0
# Version: v0.35.0

__wrap__() {

Expand Down
2 changes: 1 addition & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ test-integration-fast = { cmd = "pytest -m 'not slow' --pixi-build=debug --numpr
# you can also pass a specific test function, like this:
# /path/to/test.py::test_function
test-specific-test = { cmd = "pytest", depends-on = ["build"] }
update-integration-test-channels = { cmd = "python update-channels.py", cwd = "tests/integration/test_data" }
update-test-channels = { cmd = "python update-channels.py", cwd = "tests/data/channels" }

[feature.dev.dependencies]
# Needed for the citation
Expand Down
4 changes: 2 additions & 2 deletions schema/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://pixi.sh/v0.34.0/schema/manifest/schema.json",
"$id": "https://pixi.sh/v0.35.0/schema/manifest/schema.json",
"title": "`pixi.toml` manifest file",
"description": "The configuration for a [`pixi`](https://pixi.sh) project.",
"type": "object",
Expand All @@ -13,7 +13,7 @@
"title": "Schema",
"description": "The schema identifier for the project's configuration",
"type": "string",
"default": "https://pixi.sh/v0.34.0/schema/manifest/schema.json",
"default": "https://pixi.sh/v0.35.0/schema/manifest/schema.json",
"format": "uri-reference"
},
"activation": {
Expand Down
Loading

0 comments on commit 5950643

Please sign in to comment.