common icon indicating copy to clipboard operation
common copied to clipboard

Find a way to share pre-commit/prospector config with .org and .com

Open stsewd opened this issue 6 months ago • 0 comments

Currently our pre-commit settings for prospector doesn't really work well.

Can't be re-used in .com, we had to disable that check https://github.com/readthedocs/readthedocs-corporate/pull/1698. The reason it fails is because of two things:

  • The Python path: when running on CI, we clone the readthedocs.org repo in the .tox/py310/readthedocs.org directory, but in dev, we have this repo in the upper directory (../readthedocs.org).
  • Requirements: prospector creates a separate environment to run in, due to this, we need to install the requirements inside that environment, and since we are sharing this file for both of our repos, we ended up installing the requirements from a URL, this is a problem if a new dep is added in a PR, or if .com needs an additional dep that isn't on .org. https://github.com/readthedocs/common/blob/e598102991c5a927024f06f187f51f7000e67023/pre-commit-config.yaml#L101

stsewd avatar Feb 05 '24 19:02 stsewd