Following CircleCI example, getting pycodestyle error

I am trying to follow the CircleCI example here:

It tries to run pycodestyle as part of the “build” step but I am getting error saying this command does not exist.

Also, in contrast with all of the examples for the other CI tools, for CircleCI, the docker build part is in the deploy step – not in the build step. Wondering why that choice was made for circle CI?

1 Like

Sorry for the “late” reply.

Instead of using the default machine, please specify a machine to run the build step.

You can do so by replacing this section.

        machine: true

Instead, we want to use the python image

          image: cimg/python:3.8

As for the linter step, you will need to install the pycodestyle module.

      - run:
          name: run linter
          command: |
            . ~/.venv/bin/activate
            pip install pycodestyle
            pycodestyle .

I do not know the intention behind those steps outlined by the author so I can’t tell you why :frowning:

I have also created an internal issue for fixing our documentation as well as verify the validity of these examples.

1 Like