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

GA-167 | public release prep #30

Merged
merged 31 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6a18349
GA-167 | initial commit
aMahanna Aug 14, 2024
d946bef
attempt: remove `setup_ssh`
aMahanna Aug 14, 2024
cae05a8
remove: `setup_sa`
aMahanna Aug 14, 2024
a73a668
update `pyproject`
aMahanna Aug 14, 2024
01e2b22
new: `release` github action
aMahanna Aug 14, 2024
037e749
ls dist
aMahanna Aug 14, 2024
ab5f294
attempt: macos amd & arm
aMahanna Aug 14, 2024
bfe32e6
cleanup
aMahanna Aug 14, 2024
198aab0
fix: `libssl-dev`
aMahanna Aug 14, 2024
4808640
simplify
aMahanna Aug 14, 2024
8abb939
attempt: use powershell
aMahanna Aug 14, 2024
4ab7e8c
remove: `publish`
aMahanna Aug 14, 2024
1fb143f
attempt: `universal2`
aMahanna Aug 14, 2024
7511547
attempt: `maturin build`
aMahanna Aug 14, 2024
1281c98
remove: `release_package`
aMahanna Aug 14, 2024
e6cb6bf
attempt: `rustup`
aMahanna Aug 14, 2024
e84b164
move: `rustup`
aMahanna Aug 14, 2024
ff314d6
attempt: `x64`
aMahanna Aug 14, 2024
c24e663
attempt: macos-latest, macos-12
aMahanna Aug 14, 2024
9856d7e
attempt: go back to CFLAGS
aMahanna Aug 14, 2024
3304b1d
attempt: macos-13
aMahanna Aug 14, 2024
77d79e3
remove: `.cargo`
aMahanna Aug 14, 2024
0262076
remove: `benchmarks` & unused dockerfile
aMahanna Aug 14, 2024
0e8a314
new: `twine upload` to test pypi
aMahanna Aug 14, 2024
53e24d6
attempt: trigger `0.5.0` release to test pypi
aMahanna Aug 14, 2024
665409d
attempt: trigger `0.5.1` release to test pypi
aMahanna Aug 14, 2024
b2f7ef0
attempt: trigger `0.5.2` release to test pypi
aMahanna Aug 14, 2024
dc40517
attempt: trigger `0.5.3` release to test pypi
aMahanna Aug 14, 2024
8765e14
attempt: trigger `0.5.4` release to pypi
aMahanna Aug 14, 2024
35c93ac
fix: python-version
aMahanna Aug 14, 2024
381e091
cleanup
aMahanna Aug 14, 2024
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
2 changes: 0 additions & 2 deletions .cargo/config.toml

This file was deleted.

47 changes: 0 additions & 47 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,13 @@ workflows:
parameters:
db-mode: ["single", "cluster"]
db-version: ["3.10", "3.11", "3.12"]
release_package:
jobs:
- publish:
context: agml-pypi
filters:
tags:
only:
- /^v.*/
branches:
ignore: /.*/

commands:
setup_ssh:
steps:
- add_ssh_keys:
fingerprints:
- "SHA256:XsmQvjXDygXfd3z0ynvv6lcOEHjO4iJBGHFtZkk753Q"
- run:
name: Add GitHub to known_hosts
command: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts

jobs:
lint-python:
docker:
- image: cimg/python:3.10
steps:
- checkout
- setup_ssh
- restore_cache:
key: py_lint_cache
- run: |
Expand All @@ -77,7 +54,6 @@ jobs:
- image: cimg/rust:1.75
steps:
- checkout
- setup_ssh
- run:
name: Install clippy
command: rustup component add clippy
Expand All @@ -94,7 +70,6 @@ jobs:
executor: generate-executor
steps:
- checkout
- setup_ssh
- run:
name: Build builder image
command: docker build -t phenolrs-builder:latest -f Dockerfile-build .
Expand All @@ -111,7 +86,6 @@ jobs:
- image: cimg/rust:1.75
steps:
- checkout
- setup_ssh
- run:
name: Setup lib
command: |
Expand All @@ -131,7 +105,6 @@ jobs:
executor: generate-executor
steps:
- checkout
- setup_ssh
- attach_workspace:
at: ~/project/target
- run:
Expand Down Expand Up @@ -172,23 +145,3 @@ jobs:
conda activate phenolrs
export RUST_BACKTRACE=1
pytest --url http://172.28.0.1:8529 python/tests
publish:
executor: generate-executor
steps:
- checkout
- setup_ssh
- run:
name: Build builder image
command: docker build -t phenolrs-builder:latest -f Dockerfile-build .
- run:
name: Build package
command: docker run --rm -v $(pwd):/io phenolrs-builder:latest build --release --interpreter python3.10 python3.11 python3.12 --sdist
- run:
name: Install release packages
command: pip install twine
- run:
name: Setup SA
command: ./setup_sa.sh "${PYTHON_REPO_ID}" "${PYTHON_REPO_URL}" "${PYPI_ACCOUNT_USER}" "${PYPI_ACCOUNT_KEY}" "${PYTHON_INDEX_URL}"
- run:
name: Publish Package
command: twine upload --verbose --repository "${PYTHON_REPO_ID}" target/wheels/*
117 changes: 117 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Release Phenolrs

on:
workflow_dispatch:
release:
types: [published]

jobs:
release-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libssl-dev
pip install build maturin twine
- name: Build builder image
run: docker build -t phenolrs-builder:latest -f Dockerfile-build .

- name: Build the package
run: docker run --rm -v $(pwd):/io phenolrs-builder:latest build --out dist --release --sdist --interpreter python3.10 python3.11 python3.12

- name: ls
run: ls dist/*

- name: Publish to Test PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD_TEST }}
run: twine upload --verbose --repository testpypi dist/*.whl

- name: Publish to PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: twine upload --verbose --repository pypi dist/*.whl

release-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install dependencies
run: pip install build maturin twine

- name: Build the package
run: maturin build --out dist --release --sdist --interpreter python3.10 python3.11 python3.12

- name: ls
run: ls dist/*

- name: Publish to Test PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD_TEST }}
run: twine upload --verbose --repository testpypi dist\*.whl

- name: Publish to PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: twine upload --verbose --repository pypi dist\*.whl

release-macos:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, macos-13]

steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install dependencies
run: |
brew install openssl
pip install build maturin twine
- name: Build the package
run: |
if [[ "${{ matrix.os }}" == "macos-13" ]]; then
maturin build --out dist --release --sdist --target x86_64-apple-darwin --interpreter python3.10 python3.11 python3.12
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
maturin build --out dist --release --sdist --target aarch64-apple-darwin --interpreter python3.10 python3.11 python3.12
fi
- name: ls
run: ls dist/*

- name: Publish to Test PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD_TEST }}
run: twine upload --verbose --repository testpypi dist/*.whl

- name: Publish to PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: twine upload --verbose --repository pypi dist/*.whl
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
@@ -1,6 +1,6 @@
[package]
name = "phenolrs"
version = "0.4.2"
version = "0.5.4"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
15 changes: 0 additions & 15 deletions Dockerfile

This file was deleted.

38 changes: 0 additions & 38 deletions benchmarks/adb_cloud.py

This file was deleted.

36 changes: 0 additions & 36 deletions benchmarks/local.py

This file was deleted.

7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ build-backend = "maturin"

[project]
name = "phenolrs"
requires-python = ">=3.8"
version = "0.5.4"
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Typing :: Typed",
]
dependencies = [
"numpy~=1.26",
Expand Down
23 changes: 0 additions & 23 deletions setup_sa.sh

This file was deleted.