Skip to content
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

Apply consistent coding and documenting styling #273

Open
liyin2015 opened this issue Nov 21, 2024 · 9 comments
Open

Apply consistent coding and documenting styling #273

liyin2015 opened this issue Nov 21, 2024 · 9 comments
Labels
[adalflow] suggest improvement Improve existing functionality (non-integration] in /adalflow help wanted Need helps with input, discussion, review, and PR submission. P1 2nd priority

Comments

@liyin2015
Copy link
Member

Outline & Motivation

Without enforcing the same formatting, developers end up committing code/files that only changes formatting, making it hard to review.

Pitch

We might need a Makefile and add either the formatting here and modify the root pyproject.toml, as described in the contributor guide that commit hook is applied here.

Additional context

No response

@fm1320
Copy link
Collaborator

fm1320 commented Nov 21, 2024

Doesn't just running the pre-commit hooks locally (black and ruff) ensure this consistency ?

@liyin2015
Copy link
Member Author

Doesn't just running the pre-commit hooks locally (black and ruff) ensure this consistency ?

If that is the case, how did your pr results so many different files?

@liyin2015 liyin2015 added the [adalflow] suggest improvement Improve existing functionality (non-integration] in /adalflow label Nov 21, 2024
@fm1320
Copy link
Collaborator

fm1320 commented Nov 21, 2024

I ran the pre-commit hooks on all files before committing so the changes are white spaces and formatting that the linter enforced - I only modified one file in my PR

@liyin2015
Copy link
Member Author

liyin2015 commented Nov 21, 2024

there is no black and ruff config in the pyproject.toml. Maybe your configuration and the others somehow end up being different. Ill add a simple version and you can rebase on this, and try to use the format and test if those files can be set back

@liyin2015
Copy link
Member Author

@liyin2015 liyin2015 added the help wanted Need helps with input, discussion, review, and PR submission. label Nov 21, 2024
@liyin2015
Copy link
Member Author

Feel free to review, merge and test it on your side

You can use make setup and make format, make lint etc

@fm1320
Copy link
Collaborator

fm1320 commented Nov 21, 2024

Yes I assumed that the fact that they were part of the .pre-commit-config.yaml means they are enforced. I will have a look

@fm1320
Copy link
Collaborator

fm1320 commented Nov 22, 2024

I ran the pre-commit hooks suggested on all files, made the changes 3196631. Maybe this can be merged and then the styling will be consistent ? @liyin2015

@liyin2015
Copy link
Member Author

  • Three files need further improvement so that we can enforce pre-commit check on formatting and linting. (1) Makefile (2) pyproject.toml on the relevant confi (3).pre-commit-config.yaml

@liyin2015 liyin2015 added the P1 2nd priority label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[adalflow] suggest improvement Improve existing functionality (non-integration] in /adalflow help wanted Need helps with input, discussion, review, and PR submission. P1 2nd priority
Projects
None yet
Development

No branches or pull requests

2 participants