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

build: define dependency version constraints + other fixes #945

Merged
merged 8 commits into from
Dec 12, 2024

Conversation

ireneisdoomed
Copy link
Contributor

@ireneisdoomed ireneisdoomed commented Dec 12, 2024

✨ Context

A recent update to the scikit-learn package has caused the L2G step in Gentropy to fail due to an incompatibility between scikit-learn and another dependency, skops.

Specifically:

  • scikit-learn has been updated to version 1.6.0, which is incompatible with skops==0.10.0.
  • Our current TOML specifies the following version constraints:
    skops = ">=0.9,<0.11"
    scikit-learn = "^1.3.2"
    

because skops does not pin the version of scikit-learn, dependency resolution results in incompatible package versions when a user installs the Gentropy wheel now:

  • the latest version of scikit-learn (e.g., 1.6.0) will be installed.
  • skops==0.10.x will be installed, which is not compatible with scikit-learn==1.6.0.

🛠 What does this PR implement

In this PR, we define upper limits to the version constraints of all dependencies. This way that we avoid resolving to versions including minor updates that have not been tested.

  • Definition of an upper bound version for all dependencies
  • Bump scikit-learn to 1.6 and skops to 0.11. I have tested that with these updates the step runs.
  • Addition of a test to make sure that all gentropy modules are importable
  • Moving all dev dependencies to the same group

🙈 Missing

🚦 Before submitting

  • Do these changes cover one single feature (one change at a time)?
  • Did you read the contributor guideline?
  • Did you make sure to update the documentation with your changes?
  • Did you make sure there is no commented out code in this PR?
  • Did you follow conventional commits standards in PR title and commit messages?
  • Did you make sure the branch is up-to-date with the dev branch?
  • Did you write any new necessary tests?
  • Did you make sure the changes pass local tests (make test)?
  • Did you make sure the changes pass pre-commit rules (e.g poetry run pre-commit run --all-files)?

@ireneisdoomed ireneisdoomed changed the title build: define next major release as upper bound build: define dependency version constraints + other fixes Dec 12, 2024
Copy link
Contributor

@project-defiant project-defiant left a comment

Choose a reason for hiding this comment

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

To sum this PR:

Note: We could fix the versions in more famiialar way (>=X, <Y) (a bit simpler to understand then the caret operator.

pyproject.toml Outdated
pydoclint = ">=0.3.8,<0.6.0"
prettier = "^0.0.7"
prettier = "^0.0.7, <0.1.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

prettier version would never reach 0.0.8 and above

@ireneisdoomed
Copy link
Contributor Author

@SzymonSzyszkowski I changed the caret so that it is more explicit.Thank you ^^

@project-defiant project-defiant self-requested a review December 12, 2024 14:45
@project-defiant
Copy link
Contributor

@ireneisdoomed well done!

@ireneisdoomed ireneisdoomed requested a review from d0choa December 12, 2024 16:17
@ireneisdoomed ireneisdoomed merged commit 2fdf343 into dev Dec 12, 2024
5 checks passed
@ireneisdoomed ireneisdoomed deleted the il-fix-scikit-conflict branch December 12, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants