Open richterdavid opened 2 months ago
Thank you. I realize we also do not mention that a local venv is recommended.
@rgaudin do you remember if there is a reason why we did not mentioned it? I would even recommend to use hatch shell
to create the venv and install the Python dependencies at once, like we have on ted scraper for instance: https://github.com/openzim/ted?tab=readme-ov-file#getting-started-rocket
My Debian install uses the "externally managed" python3 install option, so it seems that I need pipx rather than pip. Neither was installed and I had to find installation instructions for both. It would be nice to link to them.
We won't be able to delve into the specifics of all OS distributions, but I agree we need to mention that you must have a working python + pip version (and maybe hatch)
pip install ".[dev]" must be run from the local clone of python-scraperlib/.
Of course, all instructions must be ran from the local clone ; I will mention it in the README to make it more obvious
IIUC pre-commit also requires a pip/pipx install, after which the current line is redundant
Nope, pre-commit is installed (i.e. "downloaded" to your machine) by pip install ".[dev]"
but the Git hook still has to be configured with pre-commit install
invoke is unknown after all that.
Are you running it from the local clone after pip install ".[dev]"
?
@rgaudin do you remember if there is a reason why we did not mentioned it?
No. It all makes perfect sense to me… but I'm not the target audience for this block 😉
Given we're using the bootstrap, I think this should be in the template README (maybe start by copying ted?). We could have a single doc and reference it everywhere but I think directly-readable instructions on the README are a lot better than a link
Given my externally managed python3 install, I used pipx
to install hatch
and .[dev]
. With the result that pre-commit
was not installed in any visible way.
I could certainly start over with venv
if that's recommended.
Are you running it from the local clone after pip install ".[dev]" ?
yes
~/github/python-scraperlib$ invoke coverage
-bash: invoke: command not found
Given my externally managed python3 install, I used pipx to install hatch and .[dev]. With the result that pre-commit was not installed in any visible way. I could certainly start over with venv if that's recommended.
Up to you, you just need to have stuff installed available, otherwise it will obviously fail.
https://github.com/openzim/python-scraperlib/blob/7d498319baadba715316c15cf9857ff2f6974a00/README.md?plain=1#L60
pipx
rather thanpip
. Neither was installed and I had to find installation instructions for both. It would be nice to link to them.pip install ".[dev]"
must be run from the local clone of python-scraperlib/.pre-commit
also requires a pip/pipx install, after which the current line is redundantinvoke
is unknown after all that.