Skip to content
Snippets Groups Projects
Commit 87bfd1703597 authored by Anton Shestakov's avatar Anton Shestakov
Browse files

contrib: add a set of scripts to run pytype in Docker

Having a simple way to run pytype for developers can massively shorten
development cycle. Using the same Docker image and scripts that we use on our
CI guarantees that the result achieved locally will be very similar to (if not
the same as) the output of our CI runners.

Things to note: the Dockerfile needs to do a little dance around user
permissions inside /home/ci-runner/ because:

- on one hand, creating new files on the host (e.g. .pyi files inside .pytype/)
  should use host user's uid and gid

- on the other hand, when we run the image as uid:gid of host user, it needs to
  be able to read/execute files inside the image that are owned by ci-runner

Since local user's uid might be different from ci-runner's uid, we execute this
very broad chmod command inside /home/ci-runner/, but then run the image as the
host user's uid:gid.

There might be a better way to do this.
parent 46280260d010
No related branches found
No related tags found
1 merge request!741pytype: make it possible to run pytype locally while using all the relevant scripts that we use on CI
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment