microbiomedata / nmdc-schema

National Microbiome Data Collaborative (NMDC) unified data model
https://microbiomedata.github.io/nmdc-schema/
Creative Commons Zero v1.0 Universal
27 stars 8 forks source link

Add autoformatting guidance to MAINTAINERS.md #1387

Open turbomam opened 10 months ago

turbomam commented 10 months ago

Hi @eecavanna and @brynnz22

I would like our nmdc-schema code to follow a stable format. The idea solution would impose auto-formatting on saving files and should be implemented in PyCharm and VS Code.

I'm assigning the two of you because I know you have already done some exploration in this area. I don't have any rigid expectations bout when this will be solved, or who else should be involved.

turbomam commented 10 months ago

For what it's worth, I have been using control/alt-L or command/option-L to manually reformat my code with PyCharm's default formatter but I would be glad to do something different.

eecavanna commented 10 months ago

According to pyproject.toml, black, a code formatter, is already a development dependency of this project.

https://github.com/microbiomedata/nmdc-schema/blob/84958dc3ee0861cc7ab7bcad7a0493b8882c5247/pyproject.toml#L54

For reference, nmdc-runtime also depends upon black. I think nmdc-server does also.

Maybe this issue can be resolved by documenting stakeholders' expectations with respect to code formatting, in a "Contributing" or "Development" section of README.md.

kheal commented 4 months ago

Changed issue name to be more actionable.