From b8cdb74d5260b4a672387c10c299ea297bba5bfe Mon Sep 17 00:00:00 2001 From: diegoferigo Date: Wed, 24 Jan 2024 10:42:04 +0100 Subject: [PATCH 01/11] Package sdist and bdist on Python 3.11 --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index a28f5a186..f562483ef 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -22,7 +22,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: "3.11" - name: Install Python tools run: pip install build twine From ce82b9425d09df3ac0b7c5b4e97baf8f9601a7d1 Mon Sep 17 00:00:00 2001 From: diegoferigo Date: Wed, 24 Jan 2024 10:42:26 +0100 Subject: [PATCH 02/11] Test wheels on Python 3.11 and 3.12 --- .github/workflows/ci_cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index f562483ef..47afa2cee 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -58,8 +58,8 @@ jobs: # https://github.com/google/jax/issues/5795 # - windows-latest python: - - "3.10" - "3.11" + - "3.12" steps: From c32f461824f69cb4016f2fc34a5f9609afcccd9d Mon Sep 17 00:00:00 2001 From: diegoferigo Date: Wed, 24 Jan 2024 10:43:32 +0100 Subject: [PATCH 03/11] Run tests also on windows --- .github/workflows/ci_cd.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 47afa2cee..a938bf568 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -55,8 +55,7 @@ jobs: os: - ubuntu-22.04 - macos-latest - # https://github.com/google/jax/issues/5795 - # - windows-latest + - windows-latest python: - "3.11" - "3.12" From ad4a538f5c6a014c1e87113c28e921040d56fc77 Mon Sep 17 00:00:00 2001 From: diegoferigo Date: Wed, 24 Jan 2024 10:44:12 +0100 Subject: [PATCH 04/11] Remove outdated iDynTree workaround Now we have released wheels for python 3.11 and 3.12 --- .github/workflows/ci_cd.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index a938bf568..443da0f0f 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -73,12 +73,6 @@ jobs: path: dist name: dist - # Workaround: install iDynTree for Python 3.11 - - name: iDynTree on Python 3.11 - if: contains(matrix.os, 'ubuntu') && matrix.python == '3.11' - shell: bash - run: pip install --pre idyntree - - name: Install wheel (ubuntu) if: contains(matrix.os, 'ubuntu') shell: bash From fb0bd89ee1d15979777226fa3a7a8cfdfd11c7c4 Mon Sep 17 00:00:00 2001 From: diegoferigo Date: Wed, 24 Jan 2024 10:49:02 +0100 Subject: [PATCH 05/11] Always run tests on Ubuntu --- .github/workflows/ci_cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 443da0f0f..f218b6de7 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -91,13 +91,13 @@ jobs: fetch-depth: 0 - name: Install Gazebo Classic - if: contains(matrix.os, 'ubuntu') && (matrix.python == '3.10' || matrix.python == '3.11') + if: contains(matrix.os, 'ubuntu') run: | sudo apt-get update sudo apt-get install gazebo - name: Run the Python tests - if: contains(matrix.os, 'ubuntu') && (matrix.python == '3.10' || matrix.python == '3.11') + if: contains(matrix.os, 'ubuntu') run: pytest env: JAX_PLATFORM_NAME: cpu From 9463d31aa20c43c972fad68cf2a739c64b8d186e Mon Sep 17 00:00:00 2001 From: diegoferigo Date: Wed, 24 Jan 2024 10:49:29 +0100 Subject: [PATCH 06/11] Install wheel also on windows --- .github/workflows/ci_cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index f218b6de7..b225d7629 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -78,8 +78,8 @@ jobs: shell: bash run: pip install "$(find dist/ -type f -name '*.whl')[all]" - - name: Install wheel (macos) - if: contains(matrix.os, 'macos') + - name: Install wheel (macos|windows) + if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows') shell: bash run: pip install "$(find dist/ -type f -name '*.whl')" From c08d120be8d563e889e226e7d747b6d0c2a3996c Mon Sep 17 00:00:00 2001 From: diegoferigo Date: Wed, 24 Jan 2024 10:58:32 +0100 Subject: [PATCH 07/11] =?UTF-8?q?Support=20only=20Python=20=E2=89=A5=203.1?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index b6eed46e7..6b3619667 100644 --- a/setup.cfg +++ b/setup.cfg @@ -36,8 +36,8 @@ classifiers = Operating System :: POSIX :: Linux Operating System :: MacOS Operating System :: Microsoft - Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Programming Language :: Python :: 3 :: Only Programming Language :: Python :: Implementation :: CPython Topic :: Games/Entertainment :: Simulation @@ -50,7 +50,7 @@ zip_safe = False packages = find: package_dir = =src -python_requires = >=3.10 +python_requires = >=3.11 install_requires = coloredlogs jax >= 0.4.1 From 8b29a2e11921f9157bc8ef0997adace233429202 Mon Sep 17 00:00:00 2001 From: diegoferigo Date: Wed, 24 Jan 2024 10:58:52 +0100 Subject: [PATCH 08/11] Update dependency pinnings --- setup.cfg | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 6b3619667..6f42a759b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -53,13 +53,12 @@ package_dir = python_requires = >=3.11 install_requires = coloredlogs - jax >= 0.4.1 + jax >= 0.4.13 jaxlib - jaxlie + jaxlie >= 1.3.0 jax_dataclasses >= 1.4.0 pptree rod - typing_extensions; python_version < "3.11" [options.packages.find] where = src From df74ab2f4c2291fe4e680efe5a7963c3d0c4fe04 Mon Sep 17 00:00:00 2001 From: diegoferigo Date: Wed, 24 Jan 2024 11:14:24 +0100 Subject: [PATCH 09/11] Update setuptools_scm release downloaded in packaging venv https://github.com/pypa/setuptools_scm#pyprojecttoml-usage --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4c31bb012..2a8fb75b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,8 +2,8 @@ build-backend = "setuptools.build_meta" requires = [ "wheel", - "setuptools>=45", - "setuptools_scm[toml]>=6.2", + "setuptools>=64", + "setuptools_scm[toml]>=8", ] [tool.setuptools_scm] From 50b2b3de013098baa1faa49ba5dddce7c0c246da Mon Sep 17 00:00:00 2001 From: diegoferigo Date: Wed, 24 Jan 2024 12:04:37 +0100 Subject: [PATCH 10/11] Create dynamically _version.py and expose publicly jaxsim.__version__ --- .gitignore | 3 +++ pyproject.toml | 1 + src/jaxsim/__init__.py | 1 + src/jaxsim/version.txt | 1 - 4 files changed, 5 insertions(+), 1 deletion(-) delete mode 100644 src/jaxsim/version.txt diff --git a/.gitignore b/.gitignore index f2520562c..707a422a0 100644 --- a/.gitignore +++ b/.gitignore @@ -133,3 +133,6 @@ dmypy.json # Pyre type checker .pyre/ + +# setuptools_scm dynamic version +src/jaxsim/_version.py diff --git a/pyproject.toml b/pyproject.toml index 2a8fb75b9..3a74e3a49 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,7 @@ requires = [ [tool.setuptools_scm] local_scheme = "dirty-tag" +version_file = "src/jaxsim/_version.py" [tool.black] line-length = 88 diff --git a/src/jaxsim/__init__.py b/src/jaxsim/__init__.py index 4064737a8..82da0e3ac 100644 --- a/src/jaxsim/__init__.py +++ b/src/jaxsim/__init__.py @@ -1,4 +1,5 @@ from . import logging +from ._version import __version__ # Follow upstream development in https://github.com/google/jax/pull/13304 diff --git a/src/jaxsim/version.txt b/src/jaxsim/version.txt deleted file mode 100644 index 8a9ecc2ea..000000000 --- a/src/jaxsim/version.txt +++ /dev/null @@ -1 +0,0 @@ -0.0.1 \ No newline at end of file From f221d59f5ee4aa6d5b0b7e82166b20286234f5ba Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Wed, 24 Jan 2024 12:17:57 +0100 Subject: [PATCH 11/11] Use autogenerated `_version.py` file in documentation --- .readthedocs.yaml | 5 +++++ docs/conf.py | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 42f51dabf..259b28c3b 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -8,6 +8,11 @@ build: conda: environment: docs/jaxsim_conda_env.yml +python: + install: + - method: pip + path: . + sphinx: configuration: docs/conf.py diff --git a/docs/conf.py b/docs/conf.py index b2548ac39..755789220 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -3,6 +3,8 @@ import pathlib import sys +from pkg_resources import get_distribution + # -- Version information sys.path.insert(0, os.path.abspath(".")) @@ -11,10 +13,8 @@ module_path = os.path.abspath("../src/") sys.path.insert(0, module_path) -version_file = os.path.abspath("../src/jaxsim/version.txt") -with open(version_file) as file_handler: - __version__ = file_handler.read().strip() +__version__ = get_distribution("jaxsim").version # -- Project information