vutran1710 / PyrateLimiter

⚔️Python Rate-Limiter using Leaky-Bucket Algorithm Family
https://pyratelimiter.readthedocs.io
MIT License
349 stars 36 forks source link

Poetry scripts get installed with PyPI package #65

Closed JWCook closed 2 years ago

JWCook commented 2 years ago

These scripts used for CI/local development: https://github.com/vutran1710/PyrateLimiter/blob/1087514ca7febc042f5c66177b53f66f6e81a668/pyproject.toml#L37-L40

will get installed on the user's system along with the pacakge whenever you pip install pyrate-limiter. The poetry.scripts section is basically equivalent to entry_points.console_scripts in setuptools, intended for CLI tools or scripts for the user to run.

Installing these can cause problems in some build environments, for example: https://aur.archlinux.org/packages/python-pyrate-limiter#comment-858558

There are lots of options for running these scripts only in CI and local dev environments. Tox is one option. Or if you prefer python files over config files, you might like nox (which also has a handy nox-poetry extension). Or you could just throw argparse into your current scripts.py so you can run python scripts.py lint, etc.

I could make a PR for this, if you'd like; otherwise you can pick whichever option looks best to you.

vutran1710 commented 2 years ago

Tks man I think you have better understanding than me regarding this, so I would like to leave the decision for you to make. Feel free to make the PR.