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
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 0 additions & 3 deletions AUTHORS

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
### 1.0.3 / 2023-12-12

- Move to `pyproject.toml` to support dependabot [#56](https://github.com/tus/tus-py-client/issues/56)
- Remove `AUTHORS`
- Autogenerate `CONTRIBUTORS` from git history
- Update licence to refer to `CONTRIBUTORS`
- Add extra badges to `README.md`

### 1.0.2 / 2023-11-30

- Remove unnecessary future install requirement [#81](https://github.com/tus/tus-py-client/pulls/81)
Expand Down
30 changes: 27 additions & 3 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
Contributors:
# Names should be added to this file as:
# Name <email address>
The following people have contributed to tus-py-client:

Ifedapo Olarewaju ([email protected])
Marius ([email protected])
Mariusz Obajtek ([email protected])
Nykakin ([email protected])
Omer Katz ([email protected])
Kirill Malovitsa ([email protected])
Peixian Wang ([email protected])
VImeo-Loaner ([email protected])
Richo Healey ([email protected])
Brian Gardiner ([email protected])
David D Lowe ([email protected])
mochic808 ([email protected])
mohsenjavidpanah ([email protected])
Adrian Partl ([email protected])
ifedapoolarewaju ([email protected])
Brian Tate ([email protected])
Dave Takahashi ([email protected])
Guang-De Lin ([email protected])
Janne Pulkkinen ([email protected])
Honglei ([email protected])
Hemant Sachdeva ([email protected])
Jasper ([email protected])
Marius Kleidl ([email protected])
Nicola Soranzo ([email protected])
Nicholas Hairs ([email protected])
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2016 Ifedapo .A. Olarewaju
Copyright (c) The tus-py-client CONTRIBUTORS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
include README.md
include CONTRIBUTORS
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# tus-py-client [![Build Status](https://github.com/tus/tus-py-client/actions/workflows/CI.yml/badge.svg)](https://github.com/tus/tus-py-client/actions/workflows/CI.yml)
# tus-py-client
[![PyPi](https://img.shields.io/pypi/v/tuspy.svg)](https://pypi.python.org/pypi/tuspy/)
[![PyPI - Status](https://img.shields.io/pypi/status/tuspy)](https://pypi.python.org/pypi/tuspy/)
[![Python Versions](https://img.shields.io/pypi/pyversions/tuspy.svg)](https://github.com/tus/tus-py-client)
[![License](https://img.shields.io/github/license/tus/tus-py-client.svg)](https://github.com/tus/tus-py-client)
![PyPI - Downloads](https://img.shields.io/pypi/dm/tuspy)
[![Build Status](https://github.com/tus/tus-py-client/actions/workflows/CI.yml/badge.svg)](https://github.com/tus/tus-py-client/actions/workflows/CI.yml)

> **tus** is a protocol based on HTTP for _resumable file uploads_. Resumable
> means that an upload can be interrupted at any moment and can be resumed without
Expand Down Expand Up @@ -107,4 +113,4 @@ If you want to work on tus-py-client internally, follow these few steps:

## License

MIT
This project is licenced under the MIT Licence - see [`LICENCE`](https://github.com/tus/tus-py-client/blob/main/LICENSE).
78 changes: 78 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[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.

{name = "Ifedapo Olarewaju", email="[email protected]"},
]

# Dependency Information
requires-python = ">=3.8"
dependencies = [
"requests>=2.18.4",
"six>=1.11.0",
"tinydb>=3.5.0",
"aiohttp>=3.6.2",
]

# Extra Information
readme = "README.md"
license = {text = "MIT Licence"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Communications :: File Sharing",
"Topic :: Internet :: File Transfer Protocol (FTP)",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]

# Misc
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.

GitHub = "http://github.com/tus/tus-py-client/"

[project.optional-dependencies]
test = [
"responses>=0.5.1",
"aioresponses>=0.6.2",
"coverage>=4.2",
"pytest>=3.0.3",
"pytest-cov>=2.3.1,<2.6",
]

dev = [
"tox>=2.3.1",
"sphinx-autobuild==2021.3.14",
"Sphinx==1.7.1",
]

[tool.setuptools]
packages = [
"tusclient",
"tusclient.fingerprint",
"tusclient.storage",
"tusclient.uploader",
]
include-package-data = true
platforms = ["any"]

[tool.setuptools.dynamic]
version = {attr = "tusclient.__version__"}

51 changes: 0 additions & 51 deletions setup.py

This file was deleted.

8 changes: 4 additions & 4 deletions tests/test_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,19 @@ def test_get_file_stream(self):
self.uploader.file_path = None
self.assertEqual(self.uploader.file_stream, self.uploader.get_file_stream())

with open('./AUTHORS', 'rb') as fs:
with open('./README.md', 'rb') as fs:
self.uploader.file_stream = None
self.uploader.file_path = './AUTHORS'
self.uploader.file_path = './README.md'
with self.uploader.get_file_stream() as stream:
self.assertEqual(fs.read(), stream.read())

def test_file_size(self):
self.assertEqual(self.uploader.get_file_size(), os.path.getsize(self.uploader.file_path))

with open('./AUTHORS', 'rb') as fs:
with open('./README.md', 'rb') as fs:
self.uploader.file_stream = fs
self.uploader.file_path = None
self.assertEqual(self.uploader.get_file_size(), os.path.getsize('./AUTHORS'))
self.assertEqual(self.uploader.get_file_size(), os.path.getsize('./README.md'))

@mock.patch('tusclient.uploader.uploader.TusRequest')
def test_upload_chunk(self, request_mock):
Expand Down
7 changes: 0 additions & 7 deletions tox.ini

This file was deleted.

2 changes: 1 addition & 1 deletion tusclient/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.0.2'
__version__ = '1.0.3'
Loading