Skip to content

Tweaks to better support use of uv#1705

Open
gavinmacaulay wants to merge 8 commits into
echostack-org:mainfrom
gavinmacaulay:pyproject.toml-update
Open

Tweaks to better support use of uv#1705
gavinmacaulay wants to merge 8 commits into
echostack-org:mainfrom
gavinmacaulay:pyproject.toml-update

Conversation

@gavinmacaulay

@gavinmacaulay gavinmacaulay commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Minor adjustments that help when using uv instead of conda/pip:

  • Change how license details are given (previous way was deprecated) - resolves a setuptools warning
  • Use version_file instead of write_to for setuptools_scm (write_to is deprecated) - resolves a schema warning
  • Move the test, docs, and dev from optional dependencies to dependency groups (with uv build, there are otherwise extras in the package for test, docs, and dev)
  • Added matplotlib to the test dependency group (it's used in some of the tests and when using uv run --group test pytest, pytest wasn't finding matplotlib because it's not an echopype dependency)
  • Some associated edits to accommodate this in the github action .yml files
  • Prevent the pre-commit spell check on uv.lock

- Change how license details are given (previous way was deprecated)
- Use version_file instead of write_to for setuptools_scm (write_to is deprecated)
- Move the test, docs, and dev optional dependencies to be dependency groups instead (assuming that those dependencies are not intended for users to install)
- Added matplotlib to the test dependency group (it's used in some of the tests)
@gavinmacaulay
gavinmacaulay marked this pull request as draft July 16, 2026 22:16
@gavinmacaulay
gavinmacaulay marked this pull request as ready for review July 16, 2026 23:30
@gavinmacaulay gavinmacaulay changed the title Update pyproject.toml Tweaks to better support use of uv Jul 17, 2026

@LOCEANlloydizard LOCEANlloydizard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @gavinmacaulay, that’s great, thank you! I tested it and managed to create my environment, and it was quicker than using conda, so i think we’re ready to merge! The only thing is that it would be nice to update the development installation documentation (https://github.com/echostack-org/echopype/blob/main/docs/source/contrib_setup.md) to reflect the changes to pyproject.toml and add the uv setup? could you add that to this PR?

EDIT: after running uv sync i had an untracked uv.lock. Should we commit it or add to .gitignore if we don’t intend to track it?

should we also put forward uv as the recommended installation method for development? @leewujung what do you think? We would still leave Conda as an option ofc, as it still works with the changes to pyproject.toml. cheers!

@LOCEANlloydizard

LOCEANlloydizard commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Closes #1449

@gavinmacaulay

gavinmacaulay commented Jul 18, 2026

Copy link
Copy Markdown
Contributor Author

I'll add uv instructions to the docs in the next day or so. I think the Testing infrastructure docs need updating too but I'll leave that to someone more experienced with that setup (I managed ok with just uv run pytest and wonder what ./ci_helpers/run-test.py offers beyond that).

@gavinmacaulay

Copy link
Copy Markdown
Contributor Author

Forgot to reply to your uv.lock question - yes, that should be in git. I left it out because it sets the versions of all the dependencies to use in the virtual environment that uv creates and hence what people end up using when developing echopype and that wasn't a choice I should be making 😄

@LOCEANlloydizard

Copy link
Copy Markdown
Collaborator

ok nice! we'll be sitting down with @leewujung and @ctuguinay on Tuesday, and we can discuss those points then! cheers! :)

@LOCEANlloydizard LOCEANlloydizard linked an issue Jul 19, 2026 that may be closed by this pull request
@gavinmacaulay

Copy link
Copy Markdown
Contributor Author

Uv-specific docs added in f1090c6. Having the docs explain both conda and uv makes it a bit complicated to follow without doing a larger reorganisation of the relevant doc pages.

I'm also a little unclear on whether the testing scripts in .ci_helpers are necessary or if everything can be made to work just by running pytest.

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.

Migrate from Conda to "uv"

2 participants