Skip to content

Commit

Permalink
Merge pull request #131 from promised-ai/release/v0.4-rc
Browse files Browse the repository at this point in the history
Release/v0.4 rc
  • Loading branch information
Swandog authored Sep 27, 2023
2 parents c8d2ec8 + 3738462 commit 829b8fb
Show file tree
Hide file tree
Showing 22 changed files with 571 additions and 339 deletions.
32 changes: 32 additions & 0 deletions .github/scripts/find_compatible_wheel.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env python

import argparse
from packaging.tags import sys_tags
import os.path
import glob
import sys

parser = argparse.ArgumentParser(
description="Program to find wheels in a directory compatible with the current version of Python"
)

parser.add_argument("package", help="The name of the package that you are searching for a wheel for")
parser.add_argument("dir", help="the directory under which to search for the wheels")

args=parser.parse_args()

wheel=None

for tag in sys_tags():
print(f"Looking for file matching tag {tag}", file=sys.stderr)
matches=glob.glob(args.package + "*" + str(tag) + "*.whl", root_dir=args.dir)
if len(matches) == 1:
wheel=matches[0]
break
elif len(matches) > 1:
print("Found multiple matches for the same tag " + str(tag), matches, file=sys.stderr)

if wheel:
print(os.path.join(args.dir, wheel))
else:
sys.exit("Did not find compatible wheel")
2 changes: 1 addition & 1 deletion .github/scripts/run_code_in_mdfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def process_file(file, language, version):
rust_script_contents = f"""//! ```cargo
//! [dependencies]
//! lace = {{ path = ".", version="{version}" }}
//! polars = {{ version = "=0.32.0", features=["csv"] }}
//! polars = {{ version = "0.33", features=["csv"] }}
//! rand = "0.8"
//! rand_xoshiro = "0.6"
//! ```
Expand Down
27 changes: 20 additions & 7 deletions .github/workflows/python-build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
- 'book/**'
- '.github/workflows/python-build-test.yaml'
- '.github/scripts/run_code_in_mdfile.py'
- '.github/scripts/find_compatible_wheel.py'

jobs:
lint-python:
Expand Down Expand Up @@ -113,7 +114,11 @@ jobs:
pip install -r pylace/requirements-dev.txt
- name: Install pylace
run: pip install --find-links dist pylace
run: |
ls -l ./dist
WHEEL_FILE=$(python3 .github/scripts/find_compatible_wheel.py pylace ./dist)
echo "Installing $WHEEL_FILE"
pip install $WHEEL_FILE
- name: Run Tests
run: pytest pylace/tests
Expand Down Expand Up @@ -152,7 +157,11 @@ jobs:
pip install -r pylace/requirements-dev.txt
- name: Install pylace
run: pip install --find-links dist pylace
run: |
ls -l ./dist
$WHEEL_FILE = (python3 .github/scripts/find_compatible_wheel.py pylace ./dist)
echo "Installing $WHEEL_FILE"
pip install $WHEEL_FILE
- name: Run Tests
run: pytest pylace/tests
Expand Down Expand Up @@ -192,7 +201,10 @@ jobs:
- name: Install pylace
if: ${{ matrix.target != 'aarch64' }}
run: pip install --find-links dist pylace
run: |
WHEEL_FILE=$(python3 .github/scripts/find_compatible_wheel.py pylace ./dist)
echo "Installing $WHEEL_FILE"
pip install $WHEEL_FILE
- name: Run Tests
if: ${{ matrix.target != 'aarch64' }}
Expand Down Expand Up @@ -224,10 +236,11 @@ jobs:
run: npm install -g codedown

- name: Install Wheel
# Install using the direct file name to prevent downloading from PyPi
# My tests indicate that using --find-links still grabs `pylace` from PyPi
# unless the version is higher than what is published on PyPi
run: pip install dist/pylace-*-cp311-cp311-manylinux_*_x86_64.manylinux*_x86_64.whl
run: |
pip install packaging
WHEEL_FILE=$(python3 .github/scripts/find_compatible_wheel.py pylace ./dist)
echo "Installing $WHEEL_FILE"
pip install $WHEEL_FILE
- name: Test MDBook Code Samples (Python)
env:
Expand Down
27 changes: 26 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [python-0.4.0] - 2023-09-27

### Added
- Component params now available from `pylace`
- `Engine`s in `pylace` now implement deepcopy

### Fixed

- Fixed `pylace`'s `__getitem__` index name to match other accessors
- Fixed `pylace`'s `append_column_metadata` to refer to the correct internal function.
- `pylace` will try to use Python's internal conversion for floats in `value_to_datum` conversion.

### Changed

- Updated rust `polars` to version `0.33`
- Updated rust `arrow2` to `0.18`

## [rust-0.4.0] - 2023-09-27

### Fixed

- Upgraded `polars` version to version `0.33` (fixes builds failing due to no `cmake` installed)

## [python-0.3.1] - 2023-08-28

### Fixed
Expand Down Expand Up @@ -117,7 +140,9 @@ Initial release on [PyPi](https://pypi.org/)

Initial release on [crates.io](https://crates.io/)

[unreleased]: https://github.com/promised-ai/lace/compare/python-0.3.1...HEAD
[unreleased]: https://github.com/promised-ai/lace/compare/python-0.4.0...HEAD
[python-0.4.0]: https://github.com/promised-ai/lace/compare/python-0.3.1...python-0.4.0
[rust-0.4.0]: https://github.com/promised-ai/lace/compare/rust-0.3.1...rust-0.4.0
[python-0.3.1]: https://github.com/promised-ai/lace/compare/python-0.3.0...python-0.3.1
[rust-0.3.1]: https://github.com/promised-ai/lace/compare/rust-0.3.0...rust-0.3.1
[python-0.3.0]: https://github.com/promised-ai/lace/compare/python-0.2.0...python-0.3.0
Expand Down
Loading

0 comments on commit 829b8fb

Please sign in to comment.