Skip to content

Conversation

Shastick
Copy link
Contributor

This PR improves general compatibility & usability of the interuss/monitoring repository by:

  • adding venv to .dockerignore, for any one using a local virtualenv that might live in venv
  • replaces sha256sum (absent from OS X) with sha -a 256, which should work on both OS X and most linux environments
  • excluding venv and .venv from the basedpyright configuration (otherwise they get picked up and linted, which is both useless AND hellishly slow)

@the-glu you may want to confirm I'm not breaking any of your intentions here! :)

@the-glu
Copy link
Contributor

the-glu commented Aug 20, 2025

For the virtual env part, I would leave it to uv to manage it and just rm -rf venv if that your old one, making one specific is not needed anymore no? Or maybe I missed something :)

@Shastick
Copy link
Contributor Author

Shastick commented Aug 20, 2025

For the virtual env part, I would leave it to uv to manage it and just rm -rf venv if that your old one, making one specific is not needed anymore no? Or maybe I missed something :)

I've been relying on venv because it's the default with my IDE and have not switched yet. It's a good reason to switch, but we may want to consider other developers in this situation? make format will run for a long time and is essentially useless if there's a venv passed to basedpyright, so I'd still keep these exclusions.

Note: alternatively we can mention this in the release notes?

edit: got rid of my venv and properly enabled uv. updating the PR to only change to sha -a 256

@Shastick Shastick force-pushed the widen-env-compatibility branch from 28bb1a5 to 6f756b9 Compare August 20, 2025 09:13
Makefile Outdated
docker run --rm -u ${USER_GROUP} -v "$(CURDIR):/app" -w /app interuss/monitoring uv run ruff format --check || (echo "Linter didn't succeed. You can use the following command to fix python linter issues: make format" && exit 1)
docker run --rm -u ${USER_GROUP} -v "$(CURDIR):/app" -w /app interuss/monitoring uv run ruff check || (echo "Linter didn't succeed. You can use the following command to fix python linter issues: make format" && exit 1)
sha256sum .basedpyright/baseline.json > /tmp/baseline-before.hash
shasum -a 256 .basedpyright/baseline.json > /tmp/baseline-before.hash
Copy link
Member

Choose a reason for hiding this comment

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

nit: LLM recommends -b also to future-proof against system differences in text encoding or end-of-line differences.

@Shastick Shastick force-pushed the widen-env-compatibility branch from 6f756b9 to 2ff43f0 Compare August 22, 2025 07:07
@mickmis mickmis merged commit ff1af7d into interuss:main Aug 22, 2025
21 checks passed
@mickmis mickmis deleted the widen-env-compatibility branch August 22, 2025 08:34
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.

4 participants