Skip to content
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

chore: version to 0.30.0 #2085

Merged
merged 3 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,66 @@ 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.30.0] - 2024-09-19
#### ✨ Highlights
I want to thank @synapticarbors and @abkfenris for starting the work on `pixi project export`.
Pixi now supports the export of a conda `environment.yml` file and a conda explicit specification file.
This is a great addition to the project and will help users to share their projects with other non pixi users.

#### Added
- Export conda explicit specification file from project by @synapticarbors in [#1873](https://github.com/prefix-dev/pixi/pull/1873)
- Add flag to `pixi search` by @Hofer-Julian in [#2018](https://github.com/prefix-dev/pixi/pull/2018)
- Adds the ability to set the index strategy by @tdejager in [#1986](https://github.com/prefix-dev/pixi/pull/1986)
- Export conda `environment.yml` by @abkfenris in [#2003](https://github.com/prefix-dev/pixi/pull/2003)

#### Changed
- Improve examples/docker by @jennydaman in [#1965](https://github.com/prefix-dev/pixi/pull/1965)
- Minimal pre-commit tasks by @Hofer-Julian in [#1984](https://github.com/prefix-dev/pixi/pull/1984)
- Improve error and feedback when target does not exist by @tdejager in [#1961](https://github.com/prefix-dev/pixi/pull/1961)
- Move the rectangle using a mouse in SDL by @certik in [#2069](https://github.com/prefix-dev/pixi/pull/2069)

#### Documentation
- Update cli.md by @xela-95 in [#2047](https://github.com/prefix-dev/pixi/pull/2047)
- Update `system-requirements` information by @ruben-arts in [#2079](https://github.com/prefix-dev/pixi/pull/2079)
- Append to file syntax in task docs by @nicornk in [#2013](https://github.com/prefix-dev/pixi/pull/2013)
- Change documentation of pixi upload to refer to correct API endpoint by @traversaro in [#2074](https://github.com/prefix-dev/pixi/pull/2074)

#### Testing
- Add downstream nerfstudio test by @tdejager in [#1996](https://github.com/prefix-dev/pixi/pull/1996)
- Run pytests in parallel by @tdejager in [#2027](https://github.com/prefix-dev/pixi/pull/2027)
- Testing common wheels by @tdejager in [#2031](https://github.com/prefix-dev/pixi/pull/2031)

#### Fixed
- Lock file is always outdated for pypi path dependencies by @nichmor in [#2039](https://github.com/prefix-dev/pixi/pull/2039)
- Fix error message for export conda explicit spec by @synapticarbors in [#2048](https://github.com/prefix-dev/pixi/pull/2048)
- Use `conda-pypi-map` for feature channels by @nichmor in [#2038](https://github.com/prefix-dev/pixi/pull/2038)
- Constrain feature platforms in schema by @bollwyvl in [#2055](https://github.com/prefix-dev/pixi/pull/2055)
- Split tag creation functions by @tdejager in [#2062](https://github.com/prefix-dev/pixi/pull/2062)
- Tree print to pipe by @ruben-arts in [#2064](https://github.com/prefix-dev/pixi/pull/2064)
- `subdirectory` in pypi url by @ruben-arts in [#2065](https://github.com/prefix-dev/pixi/pull/2065)
- Create a GUI application on Windows, not Console by @certik in [#2067](https://github.com/prefix-dev/pixi/pull/2067)
- Make dashes underscores in python package names by @ruben-arts in [#2073](https://github.com/prefix-dev/pixi/pull/2073)
- Give better errors on broken `pyproject.toml` by @ruben-arts in [#2075](https://github.com/prefix-dev/pixi/pull/2075)

#### Refactor
- Stop duplicating `strip_channel_alias` from rattler by @Hofer-Julian in [#2017](https://github.com/prefix-dev/pixi/pull/2017)
- Follow-up wheels tests by @Hofer-Julian in [#2063](https://github.com/prefix-dev/pixi/pull/2063)
- Integration test suite by @Hofer-Julian in [#2081](https://github.com/prefix-dev/pixi/pull/2081)
- Remove `psutils` by @Hofer-Julian in [#2083](https://github.com/prefix-dev/pixi/pull/2083)
- Add back older caching method by @tdejager in [#2046](https://github.com/prefix-dev/pixi/pull/2046)
- Release script by @Hofer-Julian in [#1978](https://github.com/prefix-dev/pixi/pull/1978)
- Activation script by @Hofer-Julian in [#2014](https://github.com/prefix-dev/pixi/pull/2014)
- Pins python version in add_pypi_functionality by @tdejager in [#2040](https://github.com/prefix-dev/pixi/pull/2040)
- Improve the lock_file_usage flags and behavior. by @ruben-arts in [#2078](https://github.com/prefix-dev/pixi/pull/2078)
- Move matrix to workflow that it is used in by @tdejager in [#1987](https://github.com/prefix-dev/pixi/pull/1987)
- Refactor manifest into more generic approach by @nichmor in [#2015](https://github.com/prefix-dev/pixi/pull/2015)

#### New Contributors
* @certik made their first contribution in [#2069](https://github.com/prefix-dev/pixi/pull/2069)
* @xela-95 made their first contribution in [#2047](https://github.com/prefix-dev/pixi/pull/2047)
* @nicornk made their first contribution in [#2013](https://github.com/prefix-dev/pixi/pull/2013)
* @jennydaman made their first contribution in [#1965](https://github.com/prefix-dev/pixi/pull/1965)

### [0.29.0] - 2024-09-04
#### ✨ Highlights

Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ authors:
name-particle: de
family-names: Jager
email: tdejager89@gmail.com
repository-code: 'https://github.com/prefix-dev/pixi/releases/tag/v0.29.0'
url: 'https://pixi.sh/v0.29.0'
repository-code: 'https://github.com/prefix-dev/pixi/releases/tag/v0.30.0'
url: 'https://pixi.sh/v0.30.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 @@ -141,7 +141,7 @@ license.workspace = true
name = "pixi"
readme.workspace = true
repository.workspace = true
version = "0.29.0"
version = "0.30.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 @@ -12,7 +12,7 @@ pub const PYPROJECT_MANIFEST: &str = "pyproject.toml";
pub const PROJECT_LOCK_FILE: &str = "pixi.lock";
pub const CONFIG_FILE: &str = "config.toml";
pub const PIXI_DIR: &str = ".pixi";
pub const PIXI_VERSION: &str = "0.29.0";
pub const PIXI_VERSION: &str = "0.30.0";
pub const PREFIX_FILE_NAME: &str = "pixi_env_prefix";
pub const ENVIRONMENTS_DIR: &str = "envs";
pub const SOLVE_GROUP_ENVIRONMENTS_DIR: &str = "solve-group-envs";
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/setup-pixi@v0.8.0
with:
pixi-version: v0.29.0
pixi-version: v0.30.0
cache: true
auth-host: prefix.dev
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
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.29.0
Version: v0.30.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.29.0
# Version: v0.30.0

__wrap__() {

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.29.0/schema/manifest/schema.json",
"$id": "https://pixi.sh/v0.30.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.29.0/schema/manifest/schema.json",
"default": "https://pixi.sh/v0.30.0/schema/manifest/schema.json",
"format": "uri-reference"
},
"activation": {
Expand Down
214 changes: 144 additions & 70 deletions scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,33 @@
import re
import os
from pathlib import Path
import atexit

COLORS = {"yellow": "\033[93m", "magenta": "\033[95m", "reset": "\033[0m"}

status = []


def colored_print(message: str, color: str):
color_code = COLORS.get(color, None)
if color_code:
print(f"{color_code}{message}{COLORS['reset']}")
else:
print(message)


def colored_input(prompt: str, color: str) -> str:
color_code = COLORS.get(color, COLORS["reset"])
return input(f"{color_code}{prompt}{COLORS['reset']}")


def run_command(command: list[str], capture_stdout=False) -> str | None:
print(f"Running command: {' '.join([str(c) for c in command])}")
colored_print(f"Running command: {' '.join([str(c) for c in command])}", "yellow")
result = subprocess.run(
command, stdout=subprocess.PIPE if capture_stdout else None, stderr=None, text=True
)
if result.returncode != 0:
print(f"Error running command: {' '.join(command)}")
colored_print(f"Error running command: {' '.join(map(str, command))}", "yellow")
exit(result.returncode)
if capture_stdout:
return result.stdout.strip()
Expand All @@ -19,13 +37,26 @@ def run_command(command: list[str], capture_stdout=False) -> str | None:

def get_release_version():
pattern = re.compile(r"^\d+\.\d+\.\d+$")
version_from_env = os.environ.get("RELEASE_VERSION")

if version_from_env and pattern.match(version_from_env):
default_version = version_from_env
else:
default_version = ""

while True:
release_version = input("Enter the release version (X.Y.Z): ")
prompt = (
f"Enter the release version (X.Y.Z) [{default_version}]: "
if default_version
else "Enter the release version (X.Y.Z): "
)
release_version = colored_input(prompt, "magenta") or default_version
if pattern.match(release_version):
return release_version
else:
print(
"Invalid format. Please enter the version in the format X.Y.Z where X, Y, and Z are integers."
colored_print(
"Invalid format. Please enter the version in the format X.Y.Z where X, Y, and Z are integers.",
"yellow",
)


Expand All @@ -38,77 +69,120 @@ def get_pixi() -> Path:
raise ValueError(f"The path {pixi_bin} doesn't exist.")


def main():
print("Making a release of pixi")
pixi = get_pixi()
def print_summary():
colored_print("\nSummary of completed steps:", "yellow")
for step in status:
colored_print(f"- {step}", "yellow")

# Prep
input("Make sure main is up-to-date and CI passes. Press Enter to continue...")

release_version = get_release_version()
os.environ["RELEASE_VERSION"] = release_version
atexit.register(print_summary)

print("\nCreating a new branch for the release...")
run_command(["git", "checkout", "main"])
run_command(["git", "pull", "upstream", "main"])
branch = f"bump/prepare-v{release_version}"

branch_exists = run_command(["git", "branch", "--list", branch], capture_stdout=True)
if branch_exists:
run_command(["git", "branch", "--delete", branch])
run_command(["git", "switch", "--create", branch])

print("\nBumping all versions...")
run_command([pixi, "run", "bump"])

print("\nUpdating the changelog...")
run_command([pixi, "run", "bump-changelog"])
input(
"Don't forget to update the 'Highlights' section in `CHANGELOG.md`. Press Enter to continue..."
)

print("\nCommitting the changes...")
run_command(["git", "commit", "-am", f"chore: version to {release_version}"])

print("\nPushing the changes...")
run_command(["git", "push", "origin"])

# Release prep PR
print("\nRelease prep PR")
input("Create a PR to check off the change with the peers. Press Enter to continue...")
input("Merge that PR. Press Enter to continue...")

# Tagging the release
print("\nTagging the release")
print("\nChecking out main...")
run_command(["git", "fetch", "upstream"])
run_command(["git", "checkout", "upstream/main"])

print("\nTagging the release...")
run_command(["git", "tag", f"v{release_version}", "-m", f"Release {release_version}"])

print("\nPushing the tag...")
run_command(["git", "push", "upstream", f"v{release_version}"])

# Publishing the release
input(
"Update the Release which has CI created for you (after the first build) and add the changelog to the release notes. Press Enter to continue..."
)
input("Make sure all the artifacts are there and the CI is green!!! Press Enter to continue...")
input("Publish the release and make sure it is set as latest. Press Enter to continue...")

# Test the release using the install script
print("Testing the release using `pixi self-update`...")
run_command([pixi, "self-update"])
def main():
try:
colored_print("Making a release of pixi", "yellow")
status.append("Started release process")
pixi = get_pixi()

# Prep
colored_input(
"Make sure main is up-to-date and CI passes. Press Enter to continue...", "magenta"
)
status.append("Checked main branch and CI status")

release_version = get_release_version()
os.environ["RELEASE_VERSION"] = release_version
status.append(f"Release version set to {release_version}")

colored_print("\nCreating a new branch for the release...", "yellow")
run_command(["git", "checkout", "main"])
run_command(["git", "pull", "upstream", "main"])
branch = f"bump/prepare-v{release_version}"

branch_exists = run_command(["git", "branch", "--list", branch], capture_stdout=True)
if branch_exists:
run_command(["git", "branch", "--delete", branch])
run_command(["git", "switch", "--create", branch])
status.append(f"Created and switched to branch {branch}")

colored_print("\nBumping all versions...", "yellow")
run_command([pixi, "run", "bump"])
status.append("Bumped all versions")

colored_print("\nUpdating the changelog...", "yellow")
run_command([pixi, "run", "bump-changelog"])
colored_input(
"Don't forget to update the 'Highlights' section in `CHANGELOG.md`. Press Enter to continue...",
"magenta",
)
status.append("Updated the changelog")

colored_print("\nCommitting the changes...", "yellow")
run_command(["git", "commit", "-am", f"chore: version to {release_version}"])
status.append("Committed the changes")

colored_print("\nPushing the changes...", "yellow")
run_command(["git", "push", "origin"])
status.append("Pushed the changes")

# Release prep PR
colored_print("\nRelease prep PR", "yellow")
colored_input(
"Create a PR to check off the change with the peers. Press Enter to continue...",
"magenta",
)
colored_input("Merge that PR. Press Enter to continue...", "magenta")
status.append("Created and merged the release prep PR")

# Tagging the release
colored_print("\nTagging the release", "yellow")
colored_print("\nChecking out main...", "yellow")
run_command(["git", "fetch", "upstream"])
run_command(["git", "checkout", "upstream/main"])

colored_print("\nTagging the release...", "yellow")
run_command(["git", "tag", f"v{release_version}", "-m", f"Release {release_version}"])
status.append(f"Tagged the release with version {release_version}")

colored_print("\nPushing the tag...", "yellow")
run_command(["git", "push", "upstream", f"v{release_version}"])
status.append("Pushed the tag")

# Publishing the release
colored_input(
"Update the Release which has CI created for you (after the first build) and add the changelog to the release notes. Press Enter to continue...",
"magenta",
)
colored_input(
"Make sure all the artifacts are there and the CI is green!!! Press Enter to continue...",
"magenta",
)
colored_input(
"Publish the release and make sure it is set as latest. Press Enter to continue...",
"magenta",
)
status.append("Published the release")

# Test the release using the install script
colored_print("Testing the release using `pixi self-update`...", "yellow")
run_command([pixi, "self-update"])

version_output = run_command([pixi, "--version"], capture_stdout=True)
expected_version_output = f"pixi {release_version}"
if version_output == expected_version_output:
colored_print(f"Version check passed: {version_output}", "yellow")
else:
colored_print(
f"Version check failed: expected {expected_version_output}, got {version_output}",
"yellow",
)
status.append("Tested the release")

version_output = run_command([pixi, "--version"], capture_stdout=True)
expected_version_output = f"pixi {release_version}"
if version_output == expected_version_output:
print(f"Version check passed: {version_output}")
else:
print(f"Version check failed: expected {expected_version_output}, got {version_output}")
colored_print("\nDONE!", "yellow")
status.append("Release process completed successfully")

print("\nDONE!")
except KeyboardInterrupt:
colored_print("\nProcess interrupted.", "yellow")


if __name__ == "__main__":
Expand Down
Loading
Loading