rlouf / mcx

Express & compile probabilistic programs for performant inference on CPU & GPU. Powered by JAX.
https://rlouf.github.io/mcx
Apache License 2.0
325 stars 17 forks source link

Use f-strings and lint with black #44

Closed lmmx closed 3 years ago

lmmx commented 3 years ago

Submitted this in a hurry at the end of the night and didn’t consider running the tests — will take a look and resubmit tomorrow

I wonder why your test for black linting is failing for the code I ran through black myself...

I think you may also be able to accept the commit with the actual code changes (the f-strings) using cherry pick

rlouf commented 3 years ago

Thank you for the f-strings, that's helpful!

I've had that happen on my machine and it was due to using a different version on black inside and outside my virtual environment. I haven't vendorized the version yet, and the CI is currently using the latest version (20.8b1). Maybe try this?

Tests were failing but it was my fault. You should rebase on master before re-running them.

Note that there a Makefile that reproduces the CI's steps for linting. Try make ci when you are in the root folder. If you're feeling fancy you can add a git hook that runs the command before git push :)

lmmx commented 3 years ago

Going to send a fresh PR as there are now commits in your repo I need to reflect, closing