Page MenuHomeSoftware Heritage

Adapt developer setup instructions as of sept 2020
ClosedPublic

Authored by tenma on Sep 2 2020, 6:31 PM.

Details

Summary
  • pre-commit doesn't necessarily exist as a system package (i.e. Debian buster),

but more commonly as a Python package, so install via pip.
Then, mention to update PATH if need be.

  • install local swh packages as a 2-step process to avoid errors

Diff Detail

Repository
rDDOC Development documentation
Branch
devsetup202009
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 14893
Build 22948: arc lint + arc unit

Event Timeline

vlorentz added a subscriber: vlorentz.

Thanks, good catch! One comment, though:

docs/developer-setup.rst
35–39

if the venv needs to be configured before pip, then pip install pre-commit should be below. (else it's going to run pip for python 2)

This revision now requires changes to proceed.Sep 2 2020, 11:40 PM

if the venv needs to be configured before pip, then pip install pre-commit should be below

The idea is to install it outside of a venv, to access it like the system package.
But I chose to install it as user (no pip install --system) because I think it shouldn't need to reside in root territory.
We can discuss the preferred approach :

  • system or user?
  • necessarily py3?

I don't think it needs to be py3 because instructions mentioned the Debian package which is py2 I think.

EDIT: pre-commit seems to be used as a Python library in swh Git hooks, so it definitely shouldn't be installed as a system package

Changed to install pre-commit as a python package in venv.
Removed PATH adjusting instructions since they are no longer needed here.

This revision is now accepted and ready to land.Sep 3 2020, 1:51 PM