Skip to content

Commit 9b6fcba

Browse files
authored
Merge branch 'main' into plot-data
2 parents aea64a0 + 3a7ddea commit 9b6fcba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+113
-56
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: PyPI release
2+
23
on:
34
workflow_dispatch:
45
pull_request:
@@ -23,28 +24,30 @@ jobs:
2324
run: |
2425
pip install build
2526
python -m build
27+
ls dist # List the contents of the dist directory
2628
- name: Check the sdist installs and imports
2729
run: |
2830
mkdir -p test-sdist
2931
cd test-sdist
3032
python -m venv venv-sdist
3133
venv-sdist/bin/python -m pip install ../dist/causalpy*.tar.gz
3234
echo "Checking import and version number (on release)"
33-
venv-sdist/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}' if '${{ github.ref_type }}' == 'tag' else causalpy.__version__; print(causalpy.__version__)"
35+
venv-sdist/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}' if '${{ github.ref_type }}' == 'tag' else causalpy.__version__; print(causalpy.__version__)"
3436
cd ..
3537
- name: Check the bdist installs and imports
3638
run: |
3739
mkdir -p test-bdist
3840
cd test-bdist
3941
python -m venv venv-bdist
40-
venv-bdist/bin/python -m pip install ../dist/CausalPy*.whl
42+
venv-bdist/bin/python -m pip install ../dist/causalpy*.whl
4143
echo "Checking import and version number (on release)"
42-
venv-bdist/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}' if '${{ github.ref_type }}' == 'tag' else causalpy.__version__; print(causalpy.__version__)"
44+
venv-bdist/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}' if '${{ github.ref_type }}' == 'tag' else causalpy.__version__; print(causalpy.__version__)"
4345
cd ..
44-
- uses: actions/upload-artifact@v3
46+
- uses: actions/upload-artifact@v4
4547
with:
4648
name: artifact
4749
path: dist/*
50+
4851
test:
4952
name: Upload to Test PyPI
5053
permissions:
@@ -72,7 +75,7 @@ jobs:
7275
python -m venv venv-test-pypi
7376
venv-test-pypi/bin/python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple causalpy
7477
echo "Checking import and version number"
75-
venv-test-pypi/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}'"
78+
venv-test-pypi/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}'"
7679
7780
publish:
7881
environment: release

.github/workflows/uml.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Update the UML Diagrams
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 12 * * 1'
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
permissions: write-all
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
with:
15+
ref: main
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.10"
20+
21+
- name: Configure Git Identity
22+
run: |
23+
git config user.name 'github-actions[bot]'
24+
git config user.email 'github-actions[bot]@users.noreply.github.com'
25+
- name: Update the UML Diagrams
26+
run: |
27+
sudo apt-get update && sudo apt-get install -y graphviz
28+
make uml
29+
- name: Detect UML changes
30+
id: changes
31+
run: |
32+
git add docs/source/uml/*.png
33+
if git diff --staged --exit-code; then
34+
echo "No changes to commit"
35+
echo "changes_exist=false" >> $GITHUB_OUTPUT
36+
else
37+
echo "changes_exist=true" >> $GITHUB_OUTPUT
38+
fi
39+
- name: Create PR for changes
40+
if: steps.changes.outputs.changes_exist == 'true'
41+
run: |
42+
git checkout -b update-uml-diagrams
43+
git commit -m "Update UML Diagrams"
44+
git push -u origin update-uml-diagrams
45+
gh pr create \
46+
--base main \
47+
--title "Update UML Diagrams" \
48+
--body "This PR updates the UML diagrams
49+
This PR was created automatically by the [UML workflow](https://github.com/pymc-labs/CausalPy/blob/main/.github/workflows/uml.yml).
50+
See the logs [here](https://github.com/pymc-labs/CausalPy/actions/workflows/uml.yml) for more details." \
51+
--label "no releasenotes" \
52+
--reviewer drbenvincent
53+
env:
54+
GH_TOKEN: ${{ github.token }}

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ci:
55
# See https://pre-commit.com/hooks.html for more hooks
66
repos:
77
- repo: https://github.com/lucianopaz/head_of_apache
8-
rev: "0.0.3"
8+
rev: "0.1.0"
99
hooks:
1010
- id: head_of_apache
1111
args:
@@ -25,7 +25,7 @@ repos:
2525
exclude: &exclude_pattern 'iv_weak_instruments.ipynb'
2626
args: ["--maxkb=1500"]
2727
- repo: https://github.com/astral-sh/ruff-pre-commit
28-
rev: v0.8.4
28+
rev: v0.9.9
2929
hooks:
3030
# Run the linter
3131
- id: ruff
@@ -42,7 +42,7 @@ repos:
4242
# see here https://github.com/econchick/interrogate/issues/60#issuecomment-735436566
4343
pass_filenames: false
4444
- repo: https://github.com/codespell-project/codespell
45-
rev: v2.3.0
45+
rev: v2.4.1
4646
hooks:
4747
- id: codespell
4848
additional_dependencies:

causalpy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 The PyMC Labs Developers
1+
# Copyright 2022 - 2025 The PyMC Labs Developers
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

causalpy/custom_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 The PyMC Labs Developers
1+
# Copyright 2022 - 2025 The PyMC Labs Developers
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

causalpy/data/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 The PyMC Labs Developers
1+
# Copyright 2022 - 2025 The PyMC Labs Developers
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

causalpy/data/datasets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 The PyMC Labs Developers
1+
# Copyright 2022 - 2025 The PyMC Labs Developers
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

causalpy/data/simulate_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 The PyMC Labs Developers
1+
# Copyright 2022 - 2025 The PyMC Labs Developers
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

causalpy/experiments/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 The PyMC Labs Developers
1+
# Copyright 2022 - 2025 The PyMC Labs Developers
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

causalpy/experiments/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 The PyMC Labs Developers
1+
# Copyright 2022 - 2025 The PyMC Labs Developers
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)