-
Notifications
You must be signed in to change notification settings - Fork 9
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
Consistent formatting (Python Black) #51
Comments
As part of this, also:
|
After everything else has stabilized, run this on everything. |
Chiming in here from the pyOpenSci review. |
Summary of Considerations so far:We are currently looking at Ruff, nox and pre-commit hook to introduce formatting conventions. Below is a list of considerations aimed at guiding the decision process, as well as a list of their respective configurations and a brief explanation of each. Ruff Linting:
Flake8:
Considered Configurations for Ruff:(in TL;DR:
More details:
Nox & Pre-commit Hooks:TL;DR:
NoxNox is a Python-based task runner that is used to automate various development workflows, such as testing, building, and deploying applications. It allows you to define sessions, which are Python functions in the Example: Based on the following @nox.session(name="tests", python=["3.10", "3.11", "3.12"])
def tests(session):
# run tests
session.install("pytest")
session.run("pytest") Pre-CommitHook: Considered Configurations: (in
CI Pipeline:Finally, the CI configuration |
Now, that the ruff linter and formatter have been introduced (see PR #266), possible next steps to consider are as follows: Note that if additional linting rules are to be introduced (e.g., B), each rule should be introduced in a separate PR. Therefore, we may want to consider closing this big issue and using my notes below and putting them in separate smaller issues. Next steps:0. restructure contributing file (see issue #296)1.Ruff LintingInclude the following linting rules (in
2. Nox:We might want to consider to include nox sessions for:
3. Pre-commitWe might want to add the following to
|
Given that we have different authors with different styles, our formatting/conventions are not consistent. We should look into using something like yapf or black to make our code consistent and maybe pydocstyle for our documentation.
The text was updated successfully, but these errors were encountered: