From 19769c9d54547ef2af4d0af81ffb8b301fb1d700 Mon Sep 17 00:00:00 2001 From: Jonas Frey Date: Fri, 1 Mar 2024 18:25:01 +0100 Subject: [PATCH] updated installation and added github actions --- .github/workflows/formatting.yaml | 23 +++++++++++++++++++ .github/workflows/pytest.yaml | 15 ++++++++++++ README.md | 1 + setup.py | 2 +- ...tions.py => test_roma_verify_rotations.py} | 2 +- 5 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/formatting.yaml create mode 100644 .github/workflows/pytest.yaml rename tests/{roma_verify_rotations.py => test_roma_verify_rotations.py} (97%) diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml new file mode 100644 index 0000000..d8e6dcb --- /dev/null +++ b/.github/workflows/formatting.yaml @@ -0,0 +1,23 @@ +name: Formatting +on: [push, pull_request] +jobs: + check-formatting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Black Code Formatter + uses: lgeiger/black-action@master + with: + args: "--line-length 120 . --check" + name: black-action + + auto-formatting: + name: runner / black + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Check files using the black formatter + uses: rickstaa/action-black@v1 + id: action_black + with: + black_args: "--line-length 120 ." \ No newline at end of file diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml new file mode 100644 index 0000000..cbb80d9 --- /dev/null +++ b/.github/workflows/pytest.yaml @@ -0,0 +1,15 @@ +steps: +- uses: actions/checkout@v4 +- name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' +- name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e ./ + pip3 install torch torchvision torchaudio + pip install pytest +- name: Test with pytest + run: | + pytest ./ \ No newline at end of file diff --git a/README.md b/README.md index 534945b..5da98bf 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ Code for ICML 2024: "Position Paper: Le ```shell git clone git@github.com:martius-lab/hitchhiking-rotations.git pip3 install -e ./ +pip3 install torch torchvision torchaudio ``` # Experiments diff --git a/setup.py b/setup.py index 074df40..350a27a 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import find_packages from distutils.core import setup -INSTALL_REQUIRES = ["numpy", "pip", "scipy", "scikit-learn", "matplotlib", "seaborn", "pytictac", "roma", "black"] +INSTALL_REQUIRES = ["numpy", "pip", "scipy", "scikit-learn", "matplotlib", "seaborn", "pytictac", "roma", "black", "pyyaml", "hydra", "omegaconf", "tqdm", "hydra-core"] setup( name="hitchhiking_rotations", diff --git a/tests/roma_verify_rotations.py b/tests/test_roma_verify_rotations.py similarity index 97% rename from tests/roma_verify_rotations.py rename to tests/test_roma_verify_rotations.py index 650b0f3..f278538 100644 --- a/tests/roma_verify_rotations.py +++ b/tests/test_roma_verify_rotations.py @@ -2,7 +2,7 @@ import roma import numpy as np from scipy.spatial.transform import Rotation as R -from pose_estimation import euler_angles_to_matrix +from hitchhiking_rotations.utils import euler_angles_to_matrix def test_roma_quaternion():