Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for first release #67

Merged
merged 11 commits into from
Jan 24, 2024
Merged

Prepare for first release #67

merged 11 commits into from
Jan 24, 2024

Conversation

diegoferigo
Copy link
Member

@diegoferigo diegoferigo commented Jan 24, 2024

  • Support Python ≥ 3.11. The upcoming Ubuntu 24.04 LTS has this version, it makes sense to start using the new features from the beginning.
  • Updated the minimum supported version of dependencies. For jax, particularly, let's try to keep a good upstream alignment since the availability of new features might be useful on the long term.
  • Enabled windows in CI similarly to macOS, where the package is only imported without running the test suite.

Some comment:

Notes:

  • On the long run, we can consider to ditch the setup.cfg and include all the information into pyproject.toml.

@diegoferigo diegoferigo self-assigned this Jan 24, 2024
@diegoferigo diegoferigo marked this pull request as ready for review January 24, 2024 10:17
Copy link
Collaborator

@flferretti flferretti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@diegoferigo
Copy link
Member Author

PR ready for review. Required to push conda-forge/staged-recipes#24630 through.

We can add the conda installation instructions in the new main (will be included in the next release, not a big deal).

@flferretti
Copy link
Collaborator

@diegoferigo we should bump also this https://github.com/ami-iit/jaxsim/blob/main/src/jaxsim/version.txt or find a different solution

@diegoferigo
Copy link
Member Author

I missed that file, I had no idea it was there. We can generate it with setuptools_scm, let me check.

@flferretti

This comment was marked as outdated.

@diegoferigo
Copy link
Member Author

Would that be enough for readthedocs? I don't like hardcoded data since there is almost 100% chance to forget to update it. I just checked, setuptools_scm writes the following jaxsim/_version.py file:

jaxsim onfirst_release via 🐍 v3.11.7 🅒 /jaxsimcat src/jaxsim/version.py
# file generated by setuptools_scm
# don't change, don't track in version control
TYPE_CHECKING = False
if TYPE_CHECKING:
    from typing import Tuple, Union
    VERSION_TUPLE = Tuple[Union[int, str], ...]
else:
    VERSION_TUPLE = object

version: str
__version__: str
__version_tuple__: VERSION_TUPLE
version_tuple: VERSION_TUPLE

__version__ = version = '0.1.dev398+dirty'
__version_tuple__ = version_tuple = (0, 1, 'dev398', 'dirty')

If readthedocs is not capable of reading this file, we can just add the following in the jaxsim/__init__.py:

# [...]
from ._version import __version__

Anyway, is this necessary? Have you tried https://stackoverflow.com/a/61175918?

@flferretti
Copy link
Collaborator

flferretti commented Jan 24, 2024

What about doing something like this in conf.py?:

import requests

# Make an API call to get the latest release information
response = requests.get("https://api.github.com/repos/ami-iit/jaxsim/releases/latest")
data = response.json()

# Get the version from the response
version = data["tag_name"].replace("v", "")

In this way readthedocs will read the version directly from GitHub and nothing would be hardcoded

@diegoferigo
Copy link
Member Author

What about doing something like this in conf.py?:

import requests

# Make an API call to get the latest release information
response = requests.get("https://api.github.com/repos/ami-iit/jaxsim/releases/latest")
data = response.json()

# Get the version from the response
version = data["tag_name"].replace("v", "")

In this way readthedocs will read the version directly from GitHub and nothing would be hardcoded

Mmh I don't like this either, readthedocs can also render documentation from branches and old releases. The version should be directly inferred either from the sources or the corresponding python package.

I like #67 (comment) since it always expose jaxsim.__version__, that might be useful downstream. For other packages, I occasionally used this variable for different reasons. Can you confirm that this is enough for readthedocs?

@flferretti
Copy link
Collaborator

flferretti commented Jan 24, 2024

It should be enough, I tried it locally and I added docs rebuild in CI so we can be sure

@diegoferigo diegoferigo merged commit 72e130a into main Jan 24, 2024
21 checks passed
@diegoferigo diegoferigo deleted the first_release branch January 24, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants