joowani / kq

Kafka-based Job Queue for Python
http://kq.readthedocs.io
MIT License
572 stars 24 forks source link

Contributing preparation with py.test #18

Closed Semo closed 2 years ago

Semo commented 2 years ago

I wanted to contribute some code. py.test --cov=kq --cov-report=html did not work for me. Is there something I missed? Command not found. It's my first try. All previous steps described worked fine.

joowani commented 2 years ago

Hi @Semo,

Have you followed all the steps here? https://github.com/joowani/kq/blob/main/CONTRIBUTING.md The pip install -e .[dev] should install all the dependencies for development, including pytest. If you're using virtual env, I'd recommend you double check that as well.

Semo commented 2 years ago

I did. (Hopefully)

  1. git clone and cd'ing into it. OK
  2. python3 -m venv kq_dev OK
  3. source ./kq_dev/bin/activate OK
  4. pip install -e . OK
  5. pip install pre-commit OK
  6. podman run -d -p 9092:9092 -e ADV_HOST=127.0.0.1 lensesio/fast-data-dev OK
  7. py.test --cov=kq --cov-report=html FAILS

In step 3 pip install -e .[dev] --> no matches found: .[dev], therefore I left it empty.

joowani commented 2 years ago

Did you run pip install -e .[dev] in the kq repository folder? You can just manually install pytest by running the following in your venv:

pip install pytest pytest-cov
Semo commented 2 years ago

Yes I ran it in the kq repo folder, which is made, when cloned from Github, where Contibuting.md and README.md and stuff is residing.

I'll use the command you gave me.

EDIT: The manual command worked fine. Thank you.