BLD: Use Azure pipelines for linting
See original GitHub issueAt 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:
- Created 5 years ago
- Comments:8 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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:
--output
parameter that can beemacs
,vs7
,eclipse
… but not a custom one)##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 insetup.cfg
(would change it whenflake8
is run locally too). But in any case, doesn’t seem to work, as the%(path)s
are rendered byConfigParser
, and it fails to install flake8 in azure.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
totravis-ci.com
at the moment, which is pre-requisite for using the GitHub app.