forked from agimus-project/happypose
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
773 additions
and
583 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Tests & Coverage | ||
|
||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Install EGL mesa - required for Panda3D renderer | ||
run: sudo apt-get update && sudo apt-get install -qqy libegl1-mesa libegl1-mesa-dev | ||
|
||
- name: Setup poetry | ||
run: pipx install poetry | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: matrix.python-version | ||
cache: poetry | ||
|
||
- name: Install happypose | ||
run: poetry install --with dev --all-extras | ||
|
||
- name: Download pre-trained models required for tests | ||
run: | | ||
mkdir local_data | ||
python -m happypose.toolbox.utils.download --cosypose_model=detector-bop-ycbv-pbr--970850 | ||
python -m happypose.toolbox.utils.download --cosypose_model=coarse-bop-ycbv-pbr--724183 | ||
python -m happypose.toolbox.utils.download --cosypose_model=refiner-bop-ycbv-pbr--604090 | ||
python -m happypose.toolbox.utils.download --megapose_models | ||
cd tests/data | ||
git clone https://github.com/petrikvladimir/happypose_test_data.git crackers_example | ||
- name: Run tests | ||
run: | | ||
coverage run --source=happypose -m unittest | ||
coverage xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=42", | ||
"pybind11>=2.10.0", | ||
] | ||
build-backend = "setuptools.build_meta" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,16 @@ | ||
import os | ||
from os import path | ||
from pybind11.setup_helpers import Pybind11Extension, build_ext | ||
from setuptools import setup | ||
|
||
from setuptools import find_packages, setup | ||
from torch.utils.cpp_extension import BuildExtension, CppExtension | ||
|
||
here = path.abspath(path.dirname(__file__)) | ||
|
||
# Use correct conda compiler used to build pytorch | ||
if "GXX" in os.environ: | ||
os.environ["CXX"] = os.environ.get("GXX", "") | ||
ext_modules = [ | ||
Pybind11Extension("cosypose_cext", ["cosypose/csrc/cosypose_cext.cpp"]), | ||
] | ||
|
||
setup( | ||
name="cosypose", | ||
version="1.0.0", | ||
description="CosyPose", | ||
packages=find_packages(), | ||
ext_modules=[ | ||
CppExtension( | ||
name="cosypose_cext", | ||
sources=["cosypose/csrc/cosypose_cext.cpp"], | ||
extra_compile_args=["-O3"], | ||
verbose=True, | ||
) | ||
], | ||
cmdclass={"build_ext": BuildExtension}, | ||
ext_modules=ext_modules, | ||
cmdclass={"build_ext": build_ext}, | ||
zip_safe=False, | ||
python_requires=">=3.9", | ||
) |
Oops, something went wrong.