diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index a28f5a18..b225d762 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 @@ -55,11 +55,10 @@ jobs: os: - ubuntu-22.04 - macos-latest - # https://github.com/google/jax/issues/5795 - # - windows-latest + - windows-latest python: - - "3.10" - "3.11" + - "3.12" steps: @@ -74,19 +73,13 @@ 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 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')" @@ -98,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 diff --git a/.gitignore b/.gitignore index f2520562..707a422a 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/.readthedocs.yaml b/.readthedocs.yaml index 42f51dab..259b28c3 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 b2548ac3..75578922 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 diff --git a/pyproject.toml b/pyproject.toml index 4c31bb01..3a74e3a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,12 +2,13 @@ build-backend = "setuptools.build_meta" requires = [ "wheel", - "setuptools>=45", - "setuptools_scm[toml]>=6.2", + "setuptools>=64", + "setuptools_scm[toml]>=8", ] [tool.setuptools_scm] local_scheme = "dirty-tag" +version_file = "src/jaxsim/_version.py" [tool.black] line-length = 88 diff --git a/setup.cfg b/setup.cfg index b6eed46e..6f42a759 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,16 +50,15 @@ zip_safe = False packages = find: package_dir = =src -python_requires = >=3.10 +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 diff --git a/src/jaxsim/__init__.py b/src/jaxsim/__init__.py index 4064737a..82da0e3a 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 8a9ecc2e..00000000 --- a/src/jaxsim/version.txt +++ /dev/null @@ -1 +0,0 @@ -0.0.1 \ No newline at end of file