simplistix / sybil

Automated testing for the examples in your documentation.
https://sybil.readthedocs.io/en/latest/
Other
74 stars 14 forks source link

mypy configuration and continuous integration #79

Closed adamtheturtle closed 1 year ago

adamtheturtle commented 1 year ago

This allows us to run mypy sybil/ and have shared expectations for what should pass.

Having this ready will also allow us to easily add global ignores, which we may do for method-assign soon.

adamtheturtle commented 1 year ago

cc @cjw296 - I would like to add mypy sybil/ to CI, but I am unfamiliar with CircleCI. Is this something you could easily do, or tell me how to do?

cjw296 commented 1 year ago

Does mypy have to use pyproject.toml? I prefer separate config files for each tool rather than the "mash everything into one" approach of pyproject.toml.

adamtheturtle commented 1 year ago

mypy supports a variety of config files: https://mypy.readthedocs.io/en/stable/config_file.html

We could add:

./mypy.ini
./.mypy.ini
./pyproject.toml
./setup.cfg

Only the first two are not generic to multiple tools. I have converted the configuration to mypy.ini.

cjw296 commented 1 year ago

I pushed up the config I used on another project, I think this is what we're expecting? https://app.circleci.com/pipelines/github/simplistix/sybil/407/workflows/685a5536-d8e7-4757-a8f0-ff4b43934d47/jobs/2330

adamtheturtle commented 1 year ago

I pushed up the config I used on another project, I think this is what we're expecting?

Close - except that it shows the errors for tests because it is running against tests unnecessarily.

cjw296 commented 1 year ago

CI appears to indicate this is ready to merge?

adamtheturtle commented 1 year ago

The type checks are not running, I believe, so this could say ~anything (I think) and it would pass.

cjw296 commented 1 year ago

Hmm, the intention of this PR was to add the CI and I thought I'd done so here: https://github.com/simplistix/sybil/pull/79#issuecomment-1719018285 I wonder where that commit went? Anyway, I'll push it back up to this branch...

adamtheturtle commented 1 year ago

Apologies I think that was a force push from me!

cjw296 commented 1 year ago

And we're done, I think?