proycon / codemetapy

A Python package for generating and working with codemeta
https://codemeta.github.io/
GNU General Public License v3.0
24 stars 5 forks source link

Feature request: pre-commit hook to update codemeta.json #38

Open apirogov opened 1 year ago

apirogov commented 1 year ago

It would be great if codemetapy could be used as a pre-commit hook to automatically synchronize e.g. pyproject.toml to the codemeta.json.

Currently I have to add it to my dev dependencies and do this:

  - repo: local
    hooks:
      - id: codemetapy
        name: codemetapy
        language: system
        entry: poetry run codemetapy -O codemeta.json
        files: ^pyproject.toml$

Ideally, I could just point it to this repository any other hook

  - repo: https://github.com/proycon/codemetapy
    rev: 'X.Y.Z'
    hooks:
      - id: codemetapy

and it should do something "smart" by default :slightly_smiling_face:

proycon commented 11 months ago

I like this idea, I'd have to brush up on pre-commits hooks though. Pull requests welcome!