MrPowers / mack

Delta Lake helper methods in PySpark
https://mrpowers.github.io/mack/
MIT License
303 stars 44 forks source link

Validate pre-commit config for pytest #96

Closed cs23andris closed 1 year ago

cs23andris commented 1 year ago

This is the current setup for pytest in the .yaml file

  - repo: local
    hooks:
    - id: pytest
      name: pytest
      entry: pytest tests/
      pass_filenames: false
      language: system

To leverage the development environment setup by poetry for for this hook then the entry key should be updated: poetry run pytest instead of pytest tests/.

robertkossendey commented 1 year ago

@cs23andris good catch! Would you like to contribute?

cs23andris commented 1 year ago

Yes @robertkossendey, you can assign to me!

robertkossendey commented 1 year ago

Great, thank you @cs23andris!

cs23andris commented 1 year ago

So on second thought, If I run the hooks from inside the container with the command: poetry run pre-commit run --all-files then pytest hook is using the poetry environment, so I guess this issue is not relevant anymore. Can I close this @robertkossendey ?

MrPowers commented 1 year ago

@cs23andris - thanks for reporting back, closing.