Skip to content

Conversation

@EVWorth
Copy link
Contributor

@EVWorth EVWorth commented Oct 26, 2025

@andrew-codechimp I noticed you had a poetry.lock file, and an out of date pyproject.toml, but were also using requirements.txt
you were also already using uv in a workflow to install the requirements.txt

this PR updates:

pyproject.toml

  • refactors everything under the [project] heading
  • locks python to 3.13.2 (required by homeassistant currently)
  • removes unused dependencies (pre-commit.. if interested I can implement for you!)
  • standardizes linting options under [tool.ruff]

dependabot

  • targets uv instead of pip now

setup.sh

  • switched to installing uv and leveraging it to uv sync the pyproject.toml for development

lint.yml

  • updated/simplified to use astral-sh/ruff-action@v3

your json_librarian.yml can be updated to leverage uv and the pyproject.toml as well.. adding a new dependency group for the librarian needs would allow you to move away from the .github/scripts/library_doc/requirements.txt file. but I've left that alone for now

@andrew-codechimp
Copy link
Owner

andrew-codechimp commented Oct 27, 2025

Hi, thanks so much for tackling this. I've sort of muddled on but never really got time to look at this properly.

It looks like a LOT of lint errors due to my scruffy code, think we'll need to add those to ignored for now. I am working on a V3 which is a very large change, which I'll merge in soon (life permitting) so I don't want to go changing the existing component code at the moment, I can gradually fix/remove those ignored once V3 is merged.

Regarding other improvements it'd be great if you want to chip away at things, just don't touch the custom_component code folder for now and it should still be easy to merge.

UPDATE
I've spent a little time adding the ignores and noting that they need to be reviewed after V3.
You seem far more up on this so please let me know if my approach is good here?

@EVWorth
Copy link
Contributor Author

EVWorth commented Oct 27, 2025

I think commenting the ruff line makes sense for now.

Is the intention to remove the ruff ignore lines from the pyprojegt.toml and I comment the validate step after v3?

If so I think this should be good to go!

@EVWorth
Copy link
Contributor Author

EVWorth commented Oct 27, 2025

After you publish v3 if you'd like me to tackle the ruff formatting on all the files just open an issue and assign me :)

@andrew-codechimp
Copy link
Owner

andrew-codechimp commented Oct 28, 2025

I will try and do the formatting as I merge in v3, it's not that difficult but I didn't want to do it twice.

I'll go ahead and merge this one now and create some issues for the items you've discussed so they're not forgotten.

Thanks again for the great work on this, it's so much cleaner than the mess that has evolved.

# Conflicts:
#	poetry.lock
#	pyproject.toml
@andrew-codechimp andrew-codechimp merged commit cd9aee1 into andrew-codechimp:main Oct 28, 2025
3 checks passed
@andrew-codechimp
Copy link
Owner

Hi again, sorry I've had real difficulty with UV & Dev Containers, which seems to be so new that few are doing it.
I've had to undo this as I've not really got time to try and work out how to fix that along with all my other commitments.

@EVWorth
Copy link
Contributor Author

EVWorth commented Oct 28, 2025

I haven't messed with Dev containers before. Care to share the issues? I can try to look into it

@EVWorth EVWorth mentioned this pull request Oct 29, 2025
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