mkdocstrings / pytkdocs

Load Python objects documentation.
https://mkdocstrings.github.io/pytkdocs
ISC License
50 stars 32 forks source link

chore: Update CI workflow into a better state #68

Closed plannigan closed 4 years ago

plannigan commented 4 years ago

I spent some time to get the CI pipeline into a better state.

There is one issue that I can't explain. I had gotten everything working. However, after I squashed all the debugging commits into a single clean commit, installing the dependencies on Windows always hangs instead of completing. If this persists, maybe running CI on Windows can be disabled for now.

Changes:

Other notes:

pawamoy commented 4 years ago

Thanks a lot @plannigan!

Here is the story:

I maintain/develop quite a number of Python packages. To maintain consistency across all these projects, I use a template (copier-poetry). I update this template quite often, but sometimes I don't re-apply the changes to a particular project immediately (pykdocs in this case). The most recent versions of the template fixed the issues you raised here:

The template also replaced invoke by duty. failprint and duty are now tested against Windows, so it should work better. https://github.com/pawamoy/failprint/issues/6 is not fixed yet, but it only impacted the check-dependencies task because it ran poetry ... | safety ... or poetry ... | pipx run safety ..., and while poetry is automatically resolved to its absolute path by failprint, safety and pipx are not (it would be too wonky to implement as shell commands can be quite complex). Instead, I fixed it in the task itself by whiching safety or pipx, so the command ends up being /abs/path/to/poetry ... | /abs/path/to/safety-or-pipx ... on Windows.

About your first note: yes, I've recently switched to using flakehell with the wemake-python-styleguide plugin, which reports quite a lot of quality violations, so I made the check pass anyway (the -z option in tasks.py, for "zero"), until I fix or disable those violations.

About yout second note: could you elaborate on "made a few things harder to debug and see what was happening"? That would be very interesting and useful to improve failprint and/or duty!

Finally, thank you very much for taking the time to investigate and send a PR to improve CI! I really appreciate it. Also, I'm sorry you had to do this (unless you enjoyed doing it πŸ˜› ?): my Python template is always evolving, I'm doing my best to reach a stable, and what I deem the best project configuration. During this process, things can (and did) break πŸ˜•

Anyway, I'll merge this right now, and hopefully the upgrade from the template will simplify CI further and keep things working!

Thanks again!

plannigan commented 4 years ago

I understand. At my work, I help maintain the project template. Unless the owner of a new project is diligent in updating things, they often become a snapshot of what the template looked like when the project was created.

It was kind of interesting. I depend on CI so heavily in my projects, working on something where CI is failing makes me uncomfortable. Since I was able to get things passing locally, it just took some fiddling to get the workflow into a better state. (It also looks like the Windows hang issue resolved itself.)

pawamoy commented 4 years ago

I broke CI again :grimacing:

Well it seems Poetry crashes, but I don't know why. The Python setup action is up-to-date... maybe a Poetry 1.1.3 bug?