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

Add optional subgroups to pyproject.toml #699

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

nenb
Copy link
Contributor

@nenb nenb commented Aug 14, 2023

Description

This PR does three things:

  1. uses pyproject.toml to manage all optional subgroups (eg torch, dev etc)
  2. removes the requirements subdirectory which had caused a lot of confusion and replaces it with a simpler configuration inside .github.
  3. simplifies the CI logic

More Details

  1. Rather than having a separate bunch of files in a requirements subdirectory for managing our dependencies, we now manage everything via pyproject.toml. This is the modern way of doing Python packaging, and is arguably a lot simpler than having a separate requirements subdirectory. A minor disadvantage is that it does make our pyproject.toml quite large and a bit harder to read. In the future, adding depedencies is simply a matter of adding to the appropriate subgroup in pyproject.toml, or creating a new subgroup if this is necessary. Users can install these subgroups by doing a pip install superduperdb[my_subgroup_name].

  2. The original intention for having a separate requirements subdirectory was i) to make our pyproject.toml more readable and ii) so that we could pin our dependencies for CI. We have sacrificed i) for the sake of simplicity (see 1.). For ii), I have now moved these files inside the .github subdirectory, as they are only used for CI and do not need to be visible in the root directory. I have also reduced the number of files to 2 - dev and docs. This will mean that our CI will take a bit longer, but it's a lot simpler to understand and maintain. Further details are inside CONTRIBUTING.md

  3. Since we now only have dev and docs requirements files, I have merged the CI into a single step, where linting, type-checking and testing all happen together

Related Issues

#653
#627

Checklist

  • Is this code covered by new or existing unit tests or integration tests?
  • Did you run make test successfully?
  • Do new classes, functions, methods and parameters all have docstrings?
  • Were existing docstrings updated, if necessary?
  • Was external documentation updated, if necessary?

Additional Notes or Comments

@nenb nenb changed the title Make torch optional Add optional subgroups to pyproject.toml Aug 14, 2023
@nenb nenb force-pushed the make-torch-optional branch 3 times, most recently from fe9f590 to 4abb332 Compare August 15, 2023 08:38
@nenb nenb force-pushed the make-torch-optional branch from 4abb332 to a11d2b8 Compare August 15, 2023 09:10
@nenb nenb marked this pull request as ready for review August 15, 2023 09:19
@nenb nenb merged commit f9dfb09 into superduper-io:main Aug 15, 2023
@nenb nenb deleted the make-torch-optional branch August 15, 2023 09:33
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.

2 participants