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

Support Python 3.11 #50

Closed
wants to merge 2 commits into from
Closed

Support Python 3.11 #50

wants to merge 2 commits into from

Conversation

marcofavoritobi
Copy link
Contributor

Proposed changes

This PR adds Python 3.11 in the list of supported Python versions. It also sets up the CI to also run tests over Python 3.11.

To be merged after #45 .

Fixes

Related to #36 .

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING doc
  • I am making a pull request against the main branch (left side). Also you should start your branch off our main.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works

Further comments

n/a

@marcofavoritobi marcofavoritobi marked this pull request as ready for review March 18, 2023 17:33
@codecov-commenter
Copy link

codecov-commenter commented Mar 18, 2023

Codecov Report

Merging #50 (8614923) into main (3fd8000) will decrease coverage by 0.56%.
The diff coverage is 80.70%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #50      +/-   ##
==========================================
- Coverage   96.82%   96.27%   -0.56%     
==========================================
  Files          30       31       +1     
  Lines        1512     1557      +45     
==========================================
+ Hits         1464     1499      +35     
- Misses         48       58      +10     
Impacted Files Coverage Δ
black_it/__init__.py 100.00% <ø> (ø)
black_it/calibrator.py 97.48% <0.00%> (ø)
black_it/loss_functions/__init__.py 100.00% <ø> (ø)
black_it/loss_functions/base.py 100.00% <ø> (ø)
black_it/loss_functions/fourier.py 100.00% <ø> (ø)
black_it/loss_functions/gsl_div.py 100.00% <ø> (ø)
black_it/loss_functions/likelihood.py 85.41% <0.00%> (ø)
black_it/loss_functions/minkowski.py 100.00% <ø> (ø)
black_it/loss_functions/msm.py 86.88% <ø> (ø)
black_it/plot/__init__.py 100.00% <ø> (ø)
... and 21 more

Inspired by: #36 (comment).

This commit includes the extra-dependencies mechanism of setuptools to overcome limitations specific to certain dependencies
(e.g. no support for some Python interpreter versions).

The changes use the following conventions for extras names:

- `[all]`: install all dependencies from all extras
- `[X-sampler]`: install all dependencies to make X sampler to work
- `[X-loss]`: install all dependencies to make X loss function to work.

We do not have yet an example for the last item for the moment; but for "forward-compatibility" of the nomenclature, we leave the -sampler suffix.

E.g. for GPy, we could have the extra called gp-sampler, that installs GPy on-demand, and not installed if not needed by the user.

This commit also includes a mechanism to handle import errors for the non-installed dependencies for some component.
Such mechanism provides a useful message to the user, e.g. it raises an exception with a useful error message
pointing out to the missing extra in its local installation of black-it.
@marcofavoritobi
Copy link
Contributor Author

Superseded by #73

@marcofavoritobi marcofavoritobi deleted the feat/python3.11-bis branch September 25, 2023 08:07
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.

3 participants