jamsocket / y-sweet

A realtime CRDT-based document store, backed by S3.
https://docs.jamsocket.com/y-sweet
Other
535 stars 29 forks source link

Modernize Python SDK packaging #274

Closed michaelsilver closed 2 months ago

michaelsilver commented 2 months ago

I was looking for a way to replace python -m unittest discover -s tests with something like python setup.py test. As it turns out, python packaging has changed a ton over the last few years; python setup.py test is no longer supported:

********************************************************************************
Please remove any references to `setuptools.command.test` in all
supported versions of the affected package.

By 2024-Nov-15, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
********************************************************************************

So, what is the modern approach to python packaging? Turns out the answer is pyproject.toml, summarized here: https://venthur.de/2022-12-18-python-packaging.html

Even though this might not be the most beautiful thing, it's apparently the path the python community's taken with packaging.

As a result, we can now run tests with simply pytest, and keep test/dev deps separate from core deps. I see this change as a step towards making the Python SDK more maintainable for the long term.

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **y-sweet-debugger** | ⬜️ Ignored ([Inspect](https://vercel.com/drifting-corp/y-sweet-debugger/BZmCkTGow6dnced7Psav3gdtKDrd)) | [Visit Preview](https://y-sweet-debugger-git-michael-dis-2672-mode-9ea0e4-drifting-corp.vercel.app) | | Sep 16, 2024 9:54pm | | **y-sweet-demos** | ⬜️ Ignored ([Inspect](https://vercel.com/drifting-corp/y-sweet-demos/EWq43wCWzE21ZYF7ue5oUcGrQ3hq)) | [Visit Preview](https://y-sweet-demos-git-michael-dis-2672-moderni-51cefa-drifting-corp.vercel.app) | | Sep 16, 2024 9:54pm | | **y-sweet-gendocs** | ⬜️ Ignored ([Inspect](https://vercel.com/drifting-corp/y-sweet-gendocs/ALHWHNNhbAQXkHpWMYMG9gSz3xJc)) | [Visit Preview](https://y-sweet-gendocs-git-michael-dis-2672-moder-5fd061-drifting-corp.vercel.app) | | Sep 16, 2024 9:54pm |