acederberg / pydantic-settings-yaml

A convenient tool for loading pydantic settings from either YAML and JSON.
MIT License
5 stars 3 forks source link

Poetry based setup #26

Closed heliocastro closed 4 months ago

heliocastro commented 4 months ago

This is the Poetry based setup. Is targeted to Python 3.9. Some ruff format fixes are applied. No mypy or ruff error reports fixed yet. One gh action to run and verify the commits are added.

For development i use this steps:

pip install poetry pre-commit
pre-commit install 
pre-commit install --hook-type commit-msg

You can run locally pre-commit this way:

pre-commit run --all
heliocastro commented 4 months ago

@acederberg Since you do not have a main branch i pointed out to releases/v2. But i do suggest you create a main branch.

heliocastro commented 4 months ago

@acederberg I pushed the rest of my changes, that is a small refactor:

Hope you find some usage on this

heliocastro commented 4 months ago

@acederberg Since you do not have a main branch i pointed out to releases/v2. But i do suggest you create a main branch.

Btw, i pick before the changes on 2.2.0, so there are some conflicts

acederberg commented 4 months ago

@heliocastro

Thank you for your contributions! I will review this and merge much of it later on today or early tomorrow when I've got some time to check it out in entirety. You are correct, there should be a master branch.

I would like to also mention that there are some more changes likely incoming that will deprecate fileDummies and the other pytest fixtures in favor of the built in tmp_path fixture. This will require a more direct setup in some tests, but will make tests much more clear.

acederberg commented 4 months ago

@heliocastro I did my best to resolve the changes here on github. I'm going to pull this all and get everything working. The only thing I actively left out from your changes were the Dict -> dict changes, which I will just fix manually on my end

heliocastro commented 4 months ago

After that, I will be glad to make pra direcy on your side, to help. I found a bug on the clas init that I will describe better after you finished Again, I'm all to help if you need

acederberg commented 4 months ago

@heliocastro It looks like we're ready after those recent commits. I also decided that I would like to ignore a few more things under ruff and fixed some mypy complaints. I cannot find exactly what happened such that actions failed, it appears to be mypy but I cannot get the output as it is appended to a file. Further running the exact command locally I have no issues. Are the contents of that file accessible somewhere?

heliocastro commented 4 months ago

They are redirected to the summary of the job, but still not the best implementation. If you click on Summary ( left top on job interface ) you will se the results. Tomorrow I will do a PR where the results will be stored if fails

acederberg commented 4 months ago

Alright, this passes commit validation. Any remaining changes you'd like to make on this PR @heliocastro?

It has been merged.

heliocastro commented 4 months ago

Perfect :-) Thanks. I will abandon my branch and back to the upstream !