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

Move to pyproject.toml and cleanup non-source files #89

Closed
wants to merge 15 commits into from

Conversation

nhairs
Copy link
Contributor

@nhairs nhairs commented Dec 11, 2023

Fixes #56, #49.

In addition to moving to pyproject.toml format, I've made a few other fairly significant updates:

  • Add autogenerated CONTRIBUTORS from the git history, removed the AUTHORS file, and updated LICENSE to reference the contributors file since under the MIT Licence each contributor still maintains copyright over the code they added.
  • Add more classifiers, specifically the Python versions and Typed. Changed the Development Status to Production/Stable since that probably more accurately represents that status.
  • Added some badges to the README.md.
    • If you want to preview changes you can use a tool like grip
  • Removed tox.ini, updated python-requires>=3.8, added 3.12 to CI
  • Moved to f-strings (removed many "x".format(...))
  • Applied black formatter
  • Applied MyPy type checker
  • Narrowed the type on Fingerprint.get_fingerprint - now only accepts BinaryIO.
    • I would be surprised if any program worked with StringIO files.
  • removed six
  • added static test files
  • added .gitattributes
  • lots of minor changes while on wild goose change to fix failing tests.

Test Plan

  • Check tests still pass
  • Validate pyproject.toml against validate-pyproject
  • Check README.md using grip
  • Check project builds

Questions / Discussion / Misc

  • We may want to add a PR template to remind contributors to add their name if they haven't already.

Note

I strongly recommend this is merged using a squash commit (opposed to a merge or rebase - the commit history here is pretty garbage).

@@ -1 +1 @@
__version__ = '1.0.2'
__version__ = '1.0.3'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we are dropping support for older versions of python, this arguable should be a major (2.0.0) or minor (1.1.0) change rather than than a patch (1.0.x) change.

[project]
name = "tuspy"
description = "A Python client for the tus resumable upload protocol -> http://tus.io"
authors = [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If there is someone who is maintain the project that isn't the original author, they should consider adding themselves to the maintainers metadata.

dynamic = ["version"]

[project.urls]
Homepage = "http://tus-py-client.readthedocs.io/en/latest/"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't look like the documentation online has been updated in over 5 years, I've set the metadata to point to this documentation as the homepage but maybe that's a bad idea.

@Acconut Acconut linked an issue Dec 12, 2023 that may be closed by this pull request
@nhairs
Copy link
Contributor Author

nhairs commented Dec 12, 2023

@Acconut - I should add,

a. it /might/ be better now that we know cause of the broken Windows tests that we scrap this particular PR because there's a lot of potentially breaking changes (due to specifying / narrowing types for instance) and instead we could do a bunch of smaller changes
b. If we're making breaking changes - do we lean into it and start a 2.0.0.dev branch for other changes we may want before releasing it?

@Acconut
Copy link
Member

Acconut commented Dec 12, 2023

I haven't look thoroughly at this PR yet because it's a lot of changes, but I can answer the two recent questions.

it /might/ be better now that we know cause of the broken Windows tests that we scrap this particular PR because there's a lot of potentially breaking changes (due to specifying / narrowing types for instance) and instead we could do a bunch of smaller changes

I agree. It would make sense to fix the Windows tests in a separate PR and see how many of the improvements we can pursue in individual PRs before breaking backwards compatibility. All the other changes can then be done afterwards for a v2.

If we're making breaking changes - do we lean into it and start a 2.0.0.dev branch for other changes we may want before releasing it?

Yes, breaking changes will require a v2 release as we follow SemVer for all of our software :) If there are additional breaking changes, now will be a good time to make them. However, I don't know any changes out of my head that we had planned.

@nhairs
Copy link
Contributor Author

nhairs commented Dec 12, 2023

In that case, probably don't worry about reviewing this PR, I'll break it up into a few (or more).

May not be for a little while though - depends on what I'm working on.

@Acconut
Copy link
Member

Acconut commented Dec 13, 2023

Thank you very much for your help, @nhairs! I cherry picked the test fixes in #91, so we now have green CI in main again.

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.

Make setup.py work with Dependabot Fix failing CI tests
2 participants