bigscience-workshop / evaluation

Code and Data for Evaluation WG
Other
41 stars 24 forks source link

Set code conventions #43

Closed jaketae closed 3 years ago

jaketae commented 3 years ago

As the repository gets larger, we will eventually need to decide on a code convention. Though preferences may vary, it's probably safe to stick to the setup in transformers, which is black + isort.

We could create a simplified Makefile and do something like

.PHONY: style

style:
    black .
    isort . --profile=black .

Alternatively, create a .pre-commit-config.yaml.

repos:
  - repo: https://github.com/psf/black
    rev: 21.7b0
    hooks:
      - id: black
  - repo: https://github.com/pycqa/isort
    rev: 5.9.3
    hooks:
      - id: isort
        args: ["--profile", "black"]
jaketae commented 3 years ago

@wilsonyhlee @tttyuntian Do you have any suggestions or preferred way of doing this?

tianjianjiang commented 3 years ago

Some references (which were somewhat simplified versions of HuggingFace repos):

jaketae commented 3 years ago

Closed via #56