-
Notifications
You must be signed in to change notification settings - Fork 442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make pyre able to read configuration from pyproject.toml
#799
Make pyre able to read configuration from pyproject.toml
#799
Conversation
e93dc27
to
b74e8dc
Compare
@WangGithubUser @cclauss Is this still active? Would love to see this feature. |
Any updates on this ? |
It doesn't look as though @WangGithubUser has been active on github in the last 12 months. There are still people asking for this feature, (myself included) what is a good way forward? |
Pyre is being rewritten right now, and we plan to support In the meantime, feel free to continue with this PR, or if it's inactive someone else can make a new PR. |
@cclauss It's ready for review now(I hope). |
You will need to rebase this PR. I do not think the migration from Please see https://github.com/hukkin/tomli?tab=readme-ov-file#building-a-tomlitomllib-compatibility-layer for enabling the use of the Python Standard Library module |
f253f01
to
ac0ac79
Compare
@cclauss Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. @MrTrick @yangdanny97 Your reviews, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a non-expert end user, the changes seem good to me.
@rchen152 @yangdanny97 Can we please get this merged? |
@@ -7,3 +7,5 @@ tabulate | |||
testslide>=2.7.0 | |||
typing_extensions | |||
typing_inspect | |||
tomli | |||
tomli-w |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should be kept sorted to make it easy to spot missing dependencies and nearly impossible to insert duplicates.
@yangdanny97 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@yangdanny97 merged this pull request in b235ff8. |
Thanks for your contribution @WangGithubUser and thanks for the reviews @cclauss and @MrTrick We merged all the changes minus the change to |
As changes to writing configurations in facebookGH-799 were'nt merged, we can remove the dependency on tomli-w.
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit install
pre-commit run
Summary
This PR resolves #695.
I'm not sure we should look for
pyproject.toml
silently when.pyre_configuration
is not valid, or only look for it when a flag provided.But, I prefer the first resoulution because the second need to provide a flag in all runs.However, I want to hear you opinion.Test Plan
Look for if the unittest passed.
As the unittest is not avalible this time(see footnote), I ran test in my local machine with python3.10:
Footnote:
Test
fails due tomatch
statement is incompatible with Python3.8 and 3.9, and is not related to this PR.To make this easier to review and avoid confliting, I will rebase this PR on the top of main if thematch
statement refactored withif-elif-else
statement but not do it in this PR..pyre_configuration
at the root of this project after the nightly version of Pyre with this diff deployed.I intergrated configurations intopyproject.toml
.