question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BLD: Use Azure pipelines for linting

See original GitHub issue

At the moment we have the script ci/lint.sh for validating PEP-8 and other linting. The script has several validations in the form of:

   echo "Linting *.py"
    flake8 pandas --filename=*.py --exclude pandas/_libs/src --ignore=C406,C408,C409,E402,E731,E741,W503
    if [ $? -ne "0" ]; then
        RET=1
    fi

If I’m not wrong, moving all those to the azure-pipelines configuration would have two advantages.

First, the code would be simpler, as all the bash stuff would be automatically managed, and we’ld simply have:

  - script: flake8 pandas --filename=*.py --exclude pandas/_libs/src --ignore=C406,C408,C409,E402,E731,E741,W503
displayName: 'Linting *.py'

Second is that when one of those fails, it’ll be faster to see which is the reason for the fail in the azure pipeline dashboard, instead of having to go into the details of the travis log.

Does this make sense? @jreback @TomAugspurger @chrisrpatterson @jeremyepling

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
datapythonistacommented, Sep 30, 2018

Made some progress on this, and managed to make flake8 generate the correct output:

https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=437&view=logs

It really improves the clarity of the errors (and even much more compared to our current solution, in the travis log). But still some issues:

  • cpplint doesn’t seem to allow custom output (it has a --output parameter that can be emacs, vs7, eclipse… but not a custom one)
  • The number of errors reported by azure is wrong. We’ve got like 50 errors in the first failing step if we enter the log, but in the preview there are 11, and it says we’ve got just 11. Weird
  • The link is not created. I see there is a ##vso[task.setendpoint]value option in https://github.com/Microsoft/vsts-tasks/blob/master/docs/authoring/commands.md, but it’s unclear how this needs to be used.

We probably don’t want to change the flake8 format in setup.cfg (would change it when flake8 is run locally too). But in any case, doesn’t seem to work, as the %(path)s are rendered by ConfigParser, and it fails to install flake8 in azure.

0reactions
gfyoungcommented, Dec 3, 2018

it’ll be faster to see which is the reason for the fail in the azure pipeline dashboard, instead of having to go into the details of the travis log.

FYI @pandas-dev/pandas-core : the reason why we can’t view the pipeline dashboard for Travis is because we don’t have the Travis GitHub app enabled on this repository.

Unfortunately, there is no way to migrate from travis-ci.org to travis-ci.com at the moment, which is pre-requisite for using the GitHub app.

Read more comments on GitHub >

github_iconTop Results From Across the Web

add-lint-azure-pipelines - YouTube
Adding pylint to Azure PipelinesFrom the book Cloud Computing for Data: https://leanpub.com/cloud4data If you enjoyed this video, ...
Read more >
C# linting in Azure DevOps pipelines - Ivan Štambuk
C# linting in Azure DevOps pipelines · Treat warnings as errors · dotnet format · Build Quality Checks · Manually checking the build...
Read more >
Pre-Commit Job Workflow in Azure DevOps
With Azure DevOps, you can set up end-to-end DevOps with tracebility, pre-commit, CI and deployment to Kubernetes. Here's how to use it in ......
Read more >
Release 0.10.0 - Statsmodels
Added new CI using Azure Pipelines (PR #5617). Enable linting on travis to ensure code is ... PR #4891: BLD: Fix linting and...
Read more >
Deploy Super-Linter in Azure DevOps Pipelines
While Super-Linter is a built-in GitHub Action, Super-Linter is also available as a Docker image for local use. This configuration allows you to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found