Skip to content

Modernize Package and Tooling#440

Closed
isaiah-harville wants to merge 5 commits intoTorchDSP:mainfrom
isaiah-harville:main
Closed

Modernize Package and Tooling#440
isaiah-harville wants to merge 5 commits intoTorchDSP:mainfrom
isaiah-harville:main

Conversation

@isaiah-harville
Copy link
Copy Markdown
Contributor

@isaiah-harville isaiah-harville commented Nov 24, 2025

Hello!

I have opened this PR because there are several improvements that can be made to the repository's structure and the cleanliness of the python package itself that will allow Torchsig to grow in a manner fully supported by best practices and industry standards.

A src layout is particularly valuable when developing libraries. It ensures that the library is isolated from any python invocations in the project root and that distributed library code is well separated from the rest of the project source.

Further, the industry has migrated to using newer tooling than what Torchsig currently utilizes, these tools are namely uv and ruff. UV is a drop-in pip replacement and build-system while ruff is a linter and formatter.

A follow on issue should run ruff format and fix the linting errors. Id also suggest exploring a type checker such as ty.

There is more to be done here but this is a good start. I also think its worthwhile to start publishing wheels to PyPi, this workflow is made much easier with uv build && uv publish and can be handled in a new GitHub workflow.

Happy to address any questions that arise from this.

@ereoh
Copy link
Copy Markdown
Collaborator

ereoh commented Feb 10, 2026

Thank you for your suggestions, with our library in a more stable state, we will look into it for our v2.2.0 release. I'll keep this PR open as reference or if you would like to update it.

@isaiah-harville
Copy link
Copy Markdown
Contributor Author

isaiah-harville commented Mar 30, 2026

Thank you for your suggestions, with our library in a more stable state, we will look into it for our v2.2.0 release. I'll keep this PR open as reference or if you would like to update it.

@ereoh, I just got around to updating it, horrible merge conflicts haha.

Now that you guys use rust/pyo3 there is even more justification to use uv for how much simpler it makes that workflow. Let me know if there are any questions around any of these changes. I went ahead and swapped out mypy for ty, which is another astral product thats matured really well so far. I would recommend follow on issues for fixing ruff/ty check errors, creating a wheel build/publish job for CI, and switching from read-the-docs to mkdocs.

@isaiah-harville isaiah-harville changed the title Modernize Package Modernize Package and Tooling Mar 30, 2026
@ereoh
Copy link
Copy Markdown
Collaborator

ereoh commented Apr 13, 2026

Hi, thanks for the effort! Below are some updates regarding your suggestions:

  • After careful consideration, I think we will keep to using classic pip setuptools over uv, just to maintain maximal compatibility across as many systems as possible.
  • Due to organizational limitations, sadly I don't think we can migrate to mkdocs
  • Although the src Python project layout is standard and modern, historically torchsig has been torchvision inspired, and I have not encountered a strong enough reason to switch over for now.
  • We are in the process of getting published to PyPi, hoping to see this very soon.
  • I did take your suggestion to add ruff
  • I'll get our team to look into ty
  • Moving forward, we are looking to keep torchsig a purely Python library (Rust is removed in the 2.1.1-dev branch).

Again, thank you so much for your suggestions and feedback.

@ereoh ereoh closed this Apr 13, 2026
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