django-dynamic-preferences icon indicating copy to clipboard operation
django-dynamic-preferences copied to clipboard

Running tests and flake8

Open henadzit opened this issue 3 years ago • 1 comments

Hi,

Thank you for amazing work and also for merging my latest PR!

I have a few questions regarding tests and flake8:

  • What's the current process for running tests? python setup.py test that is mentioned at https://django-dynamic-preferences.readthedocs.io/en/latest/contributing.html fails.
  • flake8 seems to be failing now as well with multiple errors. Probably it was working before but since the flake8 version isn't locked, it stopped working with the latest flake8 updates. Should we lock the version or fix the code style?
  • Travic CI integration seems to be broken. Anything I can do to help with it?

Thanks!

henadzit avatar Nov 01 '21 10:11 henadzit

Hi there! The current way to run tests is with tox. Once you have cloned the repo, run:

pip3 install --user tox
# run tests for all combinations of python and django versions
#(this will likely fail for some combinations, as you probably don't have multiple versions of python3 installed on your system)
tox
# run tests for a specific combination (here, django 3.1 on Python 3.9)
tox -e py39-django-31

All available combinations are described in the tox.ini file, let me know if it's working for you.

Regarding flake8, I'm not surprised, I don't think I've applied linting recommendations since years. Using something like black could be aa specific combination good idea to make the code more readable and solve a few flake8 in the process.

Apparently, Travis CI for open source projects is not free anymore. We'd have to migrate to something entirely different (possibly GitHub actions? I've never used it mysel though). I'd be happy to dedicate a few hours to help if you want to work on this!

agateblue avatar Dec 07 '21 08:12 agateblue

Closing because of inactivity, and we have migrated to github actions since then

agateblue avatar Oct 15 '23 08:10 agateblue