From 93d7dc56e59d906c9c5527e828ce36f2f3a2225f Mon Sep 17 00:00:00 2001 From: Antoine Paletta <98616558+apaletta3@users.noreply.github.com> Date: Wed, 3 Jan 2024 13:58:42 +0100 Subject: [PATCH] fix: py unit test packaging and enhance dev container formatting (#103) --- Makefile | 2 +- bindings/python/pyproject.toml | 8 ++++++++ bindings/python/tools/python/pyproject.toml.in | 3 +++ bindings/python/tools/python/setup.cfg.in | 1 + 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 bindings/python/pyproject.toml diff --git a/Makefile b/Makefile index 1a6ecae9..8f8b8730 100644 --- a/Makefile +++ b/Makefile @@ -517,7 +517,7 @@ test-unit-python-standalone: ## Run Python unit tests (standalone) --workdir=/app/build \ $(docker_development_image_repository):$(docker_image_version) \ /bin/bash -c "cmake -DBUILD_PYTHON_BINDINGS=ON -DBUILD_UNIT_TESTS=OFF .. \ - && $(MAKE) -j 4 && python3.11 -m pip install --root-user-action=ignore bindings/python/dist/*311*.whl \ + && $(MAKE) -j 4 && python3.11 -m pip install --root-user-action=ignore bindings/python/OpenSpaceToolkit*Py-python-package-3.11 \ && python3.11 -m pip install plotly pandas \ && python3.11 -m pip install git+https://github.com/lucas-bremond/cesiumpy.git#egg=cesiumpy \ && cd /usr/local/lib/python3.11/site-packages/ostk/$(project_name)/ \ diff --git a/bindings/python/pyproject.toml b/bindings/python/pyproject.toml new file mode 100644 index 00000000..98205453 --- /dev/null +++ b/bindings/python/pyproject.toml @@ -0,0 +1,8 @@ +# Apache License 2.0 + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.black] +line-length = 90 diff --git a/bindings/python/tools/python/pyproject.toml.in b/bindings/python/tools/python/pyproject.toml.in index 4cc9c413..98205453 100644 --- a/bindings/python/tools/python/pyproject.toml.in +++ b/bindings/python/tools/python/pyproject.toml.in @@ -3,3 +3,6 @@ [build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" + +[tool.black] +line-length = 90 diff --git a/bindings/python/tools/python/setup.cfg.in b/bindings/python/tools/python/setup.cfg.in index d94f9966..782a44a3 100644 --- a/bindings/python/tools/python/setup.cfg.in +++ b/bindings/python/tools/python/setup.cfg.in @@ -27,3 +27,4 @@ install_requires = file: requirements.txt [options.package_data] ostk.mathematics=${SHARED_LIBRARY_TARGET}.${PROJECT_VERSION_MAJOR}, ${LIBRARY_TARGET}.*${EXTENSION}*.so +*=*/data/*