Skip to content

Commit

Permalink
Renaming python project
Browse files Browse the repository at this point in the history
  • Loading branch information
kevindlewis23 committed Jun 17, 2024
2 parents 5cec9a3 + d143563 commit 12a58ab
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# If anything in the ik_geo_python or rust folders change on push, run the workflow in the ik_geo_python folder
# If anything in the ik_python or rust folders change on push, run the workflow in the ik_python folder
on:
push:
branches:
- main
- master
paths:
- 'ik_geo_python/**'
- 'ik_python/**'
- 'rust/**'
pull_request:
branches:
- main
- master
paths:
- 'ik_geo_python/**'
- 'ik_python/**'
- 'rust/**'
workflow_dispatch:
defaults:
run:
working-directory: ik_geo_python
working-directory: ik_python
jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -31,13 +31,13 @@ jobs:
with:
target: x86_64
command: build
working-directory: ik_geo_python
working-directory: ik_python
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Test wheels
run: |
python -m pip install --upgrade pip
python -m pip install dist/ik_geo_python*.whl
python -m pip install dist/ik_geo*.whl
python -m pip install numpy
python test/test.py 2>&1 | egrep "FAILED|ERROR" && exit 1 || exit 0
continue-on-error: false
Expand Down Expand Up @@ -71,12 +71,12 @@ jobs:
args: --release --out dist --find-interpreter
sccache: 'true'
manylinux: auto
working-directory: ik_geo_python
working-directory: ik_python
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}
path: ik_geo_python/dist
path: ik_python/dist
windows:
needs: test
runs-on: ${{ matrix.platform.runner }}
Expand All @@ -99,12 +99,12 @@ jobs:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
working-directory: ik_geo_python
working-directory: ik_python
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.platform.target }}
path: ik_geo_python/dist
path: ik_python/dist

macos:
needs: test
Expand All @@ -127,12 +127,12 @@ jobs:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
working-directory: ik_geo_python
working-directory: ik_python
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.platform.target }}
path: ik_geo_python/dist
path: ik_python/dist

sdist:
needs: test
Expand All @@ -144,12 +144,12 @@ jobs:
with:
command: sdist
args: --out dist
working-directory: ik_geo_python
working-directory: ik_python
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: ik_geo_python/dist
path: ik_python/dist
release:
name: Release
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion examples/python/sample.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ik_geo_python as ik_geo
import ik_geo

# Sample assumes you have numpy installed globally
import numpy as np
Expand Down
3 changes: 0 additions & 3 deletions ik_geo_python/.env/pyvenv.cfg

This file was deleted.

1 change: 1 addition & 0 deletions ik_geo_python/.gitignore → ik_python/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ docs/_build/

# Pyenv
.python-version
.env/
File renamed without changes.
2 changes: 1 addition & 1 deletion ik_geo_python/Cargo.toml → ik_python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "ik_geo_python"
name = "ik_geo"
crate-type = ["cdylib"]

[dependencies]
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions ik_geo_python/pyproject.toml → ik_python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["maturin>=1.5,<2.0"]
build-backend = "maturin"

[project]
name = "ik_geo_python"
name = "ik_geo"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Rust",
Expand All @@ -12,4 +12,4 @@ classifiers = [
]
dynamic = ["version"]
[tool.maturin]
features = ["pyo3/extension-module"]
features = ["pyo3/extension-module"]
2 changes: 1 addition & 1 deletion ik_geo_python/src/lib.rs → ik_python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ impl KinematicsObject {

/// A Python module implemented in Rust.
#[pymodule]
fn ik_geo_python(_py: Python, m: &PyModule) -> PyResult<()> {
fn ik_geo(_py: Python, m: &PyModule) -> PyResult<()> {
m.add_class::<Robot>()?;
m.add_class::<KinematicsObject>()?;
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion ik_geo_python/test/test.py → ik_python/test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from collections import namedtuple
import numpy as np
import unittest
import ik_geo_python as ik_geo
import ik_geo
from math import pi

# Import the csv files
Expand Down

0 comments on commit 12a58ab

Please sign in to comment.