pymc-labs / CausalPy

A Python package for causal inference in quasi-experimental settings
https://causalpy.readthedocs.io
Apache License 2.0
829 stars 53 forks source link

Automate pre commit updates #322

Closed juanitorduz closed 2 months ago

juanitorduz commented 2 months ago

This PR adds the feature to use https://pre-commit.ci/ to generate automatic version updates of the pre-commit versions. This is already working on pymc-marketing: https://github.com/pymc-labs/pymc-marketing/blob/main/.pre-commit-config.yaml Note I deleted the GitHub action as it will be a duplicate after this one is merged (https://github.com/pymc-devs/pymc/pull/7285)

@drbenvincent Can you please log into https://pre-commit.ci/ and grant access to this repository after we merge this PR? We then can start getting these automatic PRs as in https://github.com/pymc-labs/pymc-marketing/pull/655

I ran pre-commit run --all-files to verify everything was working as expected. The result is that some files were modified just by adding a white space.

juanitorduz commented 2 months ago

The failure of PyPI release / Build source distribution (pull_request) Failing because

WARNING: Requirement '../dist/CausalPy*.tar.gz' looks like a filename, but the file does not exist
Processing /home/runner/work/CausalPy/CausalPy/dist/CausalPy*.tar.gz
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/home/runner/work/CausalPy/CausalPy/dist/CausalPy*.tar.gz'

seems related to https://github.com/pymc-labs/pymc-marketing/pull/633 but I am not sure about the fix.

juanitorduz commented 2 months ago

The failure of PyPI release / Build source distribution (pull_request) Failing because

WARNING: Requirement '../dist/CausalPy*.tar.gz' looks like a filename, but the file does not exist
Processing /home/runner/work/CausalPy/CausalPy/dist/CausalPy*.tar.gz
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/home/runner/work/CausalPy/CausalPy/dist/CausalPy*.tar.gz'

seems related to pymc-labs/pymc-marketing#633 but I am not sure about the fix.

it seems https://github.com/pymc-labs/CausalPy/pull/322/commits/e13b919700c949b764f296cfacf31f3a6950f2a1 solved it 😀

drbenvincent commented 2 months ago

Great work. Loving the cross-pollination from pymc-marketing.

Happy to merge, but we seem to have a bunch of failing tests when run remotely. Tests all pass locally.

juanitorduz commented 2 months ago

@drbenvincent will you fix these tests in another PR? If so I can rebase afterwards :)

drbenvincent commented 2 months ago

Ah I see. The failing doctests are also failing on other PR's, so not caused by this. Will merge.