From d9f93eb2f3fd6f2e39ff6a6ec939c5a41f07caa5 Mon Sep 17 00:00:00 2001 From: sonfire186 Date: Fri, 18 Oct 2024 21:23:46 +0500 Subject: [PATCH 1/4] Update setup.py Update python version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b622899..0e6f017 100644 --- a/setup.py +++ b/setup.py @@ -121,6 +121,6 @@ project_urls={ 'Source': 'https://github.com/WillianFuks/tfcausalimpact' }, - python_requires='>=3, <3.12', + python_requires='>=3, <3.14', test_suite='tests' ) From 42e340cadf01eb2bf88ed5937a01c5e94518593d Mon Sep 17 00:00:00 2001 From: sonfire186 Date: Fri, 18 Oct 2024 21:26:48 +0500 Subject: [PATCH 2/4] Update tox.ini --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 5e202f2..8721afa 100644 --- a/tox.ini +++ b/tox.ini @@ -10,6 +10,8 @@ python = 3.9: py39 3.10: py310 3.11: py311, lint, isort-check, coverage + 3.12: py312 + 3.13: py313 [gh-actions:env] PLATFORM = From e3703046a3c57c5bf789a8e82a9978be3b0b090c Mon Sep 17 00:00:00 2001 From: WillianFuks Date: Sat, 19 Oct 2024 16:26:25 -0300 Subject: [PATCH 3/4] Minor fixes, removes 3.13, add 3.12 as main --- causalimpact/__version__.py | 2 +- causalimpact/model.py | 2 +- setup.py | 3 ++- tox.ini | 9 ++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/causalimpact/__version__.py b/causalimpact/__version__.py index 0a59799..5f051a0 100644 --- a/causalimpact/__version__.py +++ b/causalimpact/__version__.py @@ -13,4 +13,4 @@ # limitations under the License. -__version__ = '0.0.16' +__version__ = '0.0.17' diff --git a/causalimpact/model.py b/causalimpact/model.py index 46b2442..fd3277d 100644 --- a/causalimpact/model.py +++ b/causalimpact/model.py @@ -176,7 +176,7 @@ def _check_component(component): 'points equal to pre_data and post_data points and ' 'same number of covariates. Input design_matrix shape was ' f'{component.design_matrix.shape} and expected ' - f'{(len(pre_data) + len(post_data), len(pre_data.columns) -1)} ' + f'{(len(pre_data) + len(post_data), len(pre_data.columns) - 1)} ' 'instead.' ) assert component.design_matrix.dtype == tf.float32 diff --git a/setup.py b/setup.py index 0e6f017..94b7f7d 100644 --- a/setup.py +++ b/setup.py @@ -115,12 +115,13 @@ 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: Implementation :: CPython', 'Topic :: Scientific/Engineering', ], project_urls={ 'Source': 'https://github.com/WillianFuks/tfcausalimpact' }, - python_requires='>=3, <3.14', + python_requires='>=3, <3.13', test_suite='tests' ) diff --git a/tox.ini b/tox.ini index 8721afa..059135a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] envlist = - py{37, 38, 39, 310, 311}-{linux,macos,windows} + py{37, 38, 39, 310, 311, 312}-{linux,macos,windows} gh-actions-coveralls [gh-actions] @@ -9,9 +9,8 @@ python = 3.8: py38 3.9: py39 3.10: py310 - 3.11: py311, lint, isort-check, coverage - 3.12: py312 - 3.13: py313 + 3.11: py311 + 3.12: py312, lint, isort-check, coverage [gh-actions:env] PLATFORM = @@ -45,7 +44,7 @@ commands = [testenv:lint] basepython = - python3.11 + python3.12 deps = flake8 commands = From b01c764fbc7c36dc162e28bf5a422e98e3805c7b Mon Sep 17 00:00:00 2001 From: WillianFuks Date: Sat, 19 Oct 2024 16:34:00 -0300 Subject: [PATCH 4/4] Update github actions for py3.12 --- .github/workflows/publish-pypi.yml | 4 ++-- .github/workflows/run-CI.yml | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 36123a8..374ae0b 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -12,10 +12,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.11 + - name: Set up Python 3.12 uses: actions/setup-python@v2 with: - python-version: '3.11' + python-version: '3.12' - name: Install dependencies run: | diff --git a/.github/workflows/run-CI.yml b/.github/workflows/run-CI.yml index 1bbd5af..9576e3b 100644 --- a/.github/workflows/run-CI.yml +++ b/.github/workflows/run-CI.yml @@ -6,7 +6,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python: [3.7, 3.8, 3.9, '3.10', '3.11'] + python: [3.7, 3.8, 3.9, '3.10', '3.11', '3.12'] exclude: - os: macos-latest python: 3.7 @@ -16,6 +16,8 @@ jobs: python: 3.9 - os: macos-latest python: '3.10' + - os: macos-latest + python: '3.11' - os: windows-latest python: 3.7 - os: windows-latest @@ -24,6 +26,8 @@ jobs: python: 3.9 - os: windows-latest python: '3.10' + - os: windows-latest + python: '3.11' steps: - uses: actions/checkout@v2 @@ -51,20 +55,20 @@ jobs: TOX_SKIP_ENV: coverage,GHA-coverage - name: Lint - if: ${{ matrix.python == '3.11' && runner.os == 'Linux'}} + if: ${{ matrix.python == '3.12' && runner.os == 'Linux'}} run: tox -e lint - name: isort - if: ${{ matrix.python == '3.11' && runner.os == 'Linux'}} + if: ${{ matrix.python == '3.12' && runner.os == 'Linux'}} run: tox -e isort-check - name: Build Coverage - if: ${{ matrix.python == '3.11' && runner.os == 'Linux'}} + if: ${{ matrix.python == '3.12' && runner.os == 'Linux'}} run: tox -e GHA-coverage - name: Upload Coveralls - if: ${{ matrix.python == '3.11' && runner.os == 'Linux'}} + if: ${{ matrix.python == '3.12' && runner.os == 'Linux'}} uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }}