From 74c9377598b58b5fa6a0c07988f411104993789b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= <16805946+edgarrmondragon@users.noreply.github.com> Date: Tue, 19 Nov 2024 05:10:37 -0600 Subject: [PATCH 1/3] Test with Python 3.13 (#365) --- .github/workflows/ci.yml | 15 +++++++++++--- Dockerfile | 2 +- requirements-test.txt | 5 +++-- run-tests.sh | 42 ++++++++++++++++++++++++++-------------- setup.py | 1 + 5 files changed, 45 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a285a2d..2bb32b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,15 +11,24 @@ jobs: runs-on: ubuntu-20.04 strategy: + fail-fast: false matrix: - python-version: [3.6, 3.7, 3.8, 3.9, "3.10", "3.11", "3.12"] + python-version: + - 3.6 + - 3.7 + - 3.8 + - 3.9 + - "3.10" + - "3.11" + - "3.12" + - "3.13" steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/Dockerfile b/Dockerfile index ba2948f..d79a72c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH RUN git clone --depth=1 https://github.com/pyenv/pyenv.git $PYENV_ROOT RUN git clone --depth=1 https://github.com/pyenv/pyenv-virtualenv.git $PYENV_ROOT/plugins/pyenv-virtualenv -RUN pyenv install 3.5.10 && pyenv install 3.6.14 && pyenv install 3.7.11 && pyenv install 3.8.11 && pyenv install 3.9.6 && pyenv install 3.10.1 && pyenv install 3.11.0 && pyenv install 3.12.1 +RUN pyenv install 3.5.10 && pyenv install 3.6.15 && pyenv install 3.7.17 && pyenv install 3.8.20 && pyenv install 3.9.20 && pyenv install 3.10.15 && pyenv install 3.11.10 && pyenv install 3.12.7 && pyenv install 3.13.0 WORKDIR /app COPY . . diff --git a/requirements-test.txt b/requirements-test.txt index 55463d8..cde305f 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,7 +1,8 @@ pytest==4.6.11; python_version < '3.10.0' -pytest==6.2.5; python_version >= '3.10.0' +pytest==8.3.2; python_version >= '3.10.0' attrs==21.2.0 httmock==1.4.0 -freezegun==1.1.0 +freezegun==1.1.0; python_version < '3.13' +freezegun==1.5.1; python_version >= '3.13' pytest-cov coveralls==3.3.1 diff --git a/run-tests.sh b/run-tests.sh index 23b13a7..bb938e8 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -24,68 +24,77 @@ function deploy { source deactivate fi - # pyenv install 3.6.14 + # pyenv install 3.6.15 if [ ! -e ~/.pyenv/versions/tracker36 ]; then - pyenv virtualenv 3.6.14 tracker36 + pyenv virtualenv 3.6.15 tracker36 pyenv activate tracker36 pip install . pip install -r requirements-test.txt source deactivate fi - # pyenv install 3.7.11 + # pyenv install 3.7.17 if [ ! -e ~/.pyenv/versions/tracker37 ]; then - pyenv virtualenv 3.7.11 tracker37 + pyenv virtualenv 3.7.17 tracker37 pyenv activate tracker37 pip install . pip install -r requirements-test.txt source deactivate fi - # pyenv install 3.8.11 + # pyenv install 3.8.20 if [ ! -e ~/.pyenv/versions/tracker38 ]; then - pyenv virtualenv 3.8.11 tracker38 + pyenv virtualenv 3.8.20 tracker38 pyenv activate tracker38 pip install . pip install -r requirements-test.txt source deactivate fi - # pyenv install 3.9.6 + # pyenv install 3.9.20 if [ ! -e ~/.pyenv/versions/tracker39 ]; then - pyenv virtualenv 3.9.6 tracker39 + pyenv virtualenv 3.9.20 tracker39 pyenv activate tracker39 pip install . pip install -r requirements-test.txt source deactivate fi - # pyenv install 3.10.1 + # pyenv install 3.10.15 if [ ! -e ~/.pyenv/versions/tracker310 ]; then - pyenv virtualenv 3.10.1 tracker310 + pyenv virtualenv 3.10.15 tracker310 pyenv activate tracker310 pip install . pip install -r requirements-test.txt source deactivate fi - # pyenv install 3.11.0 + # pyenv install 3.11.10 if [ ! -e ~/.pyenv/versions/tracker311 ]; then - pyenv virtualenv 3.11.0 tracker311 + pyenv virtualenv 3.11.10 tracker311 pyenv activate tracker311 pip install . pip install -r requirements-test.txt source deactivate fi - # pyenv install 3.12.0 + # pyenv install 3.12.7 if [ ! -e ~/.pyenv/versions/tracker312 ]; then - pyenv virtualenv 3.12.0 tracker312 + pyenv virtualenv 3.12.7 tracker312 pyenv activate tracker312 pip install . pip install -r requirements-test.txt source deactivate fi + + # pyenv install 3.13.0 + if [ ! -e ~/.pyenv/versions/tracker313 ]; then + pyenv virtualenv 3.13.0 tracker313 + pyenv activate tracker313 + pip install . + pip install -r requirements-test.txt + source deactivate + fi } @@ -121,6 +130,10 @@ function run_tests { pyenv activate tracker312 pytest source deactivate + + pyenv activate tracker313 + pytest + source deactivate } function refresh_deploy { @@ -132,6 +145,7 @@ function refresh_deploy { pyenv uninstall -f tracker310 pyenv uninstall -f tracker311 pyenv uninstall -f tracker312 + pyenv uninstall -f tracker313 } diff --git a/setup.py b/setup.py index 4b180da..2613743 100644 --- a/setup.py +++ b/setup.py @@ -64,6 +64,7 @@ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Operating System :: OS Independent", ], install_requires=[ From 0341cb19d5fac344095dbb5e11bc0ebae3c4e880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matu=CC=81s=CC=8C=20Tomlein?= Date: Tue, 19 Nov 2024 12:13:28 +0100 Subject: [PATCH 2/3] Shorten automatic github release title (close #352) --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b809ea1..cfb160b 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -108,6 +108,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ github.ref }} - name: Snowplow Python Tracker v${{ needs.version_check.outputs.v_tracker }} + name: Version ${{ needs.version_check.outputs.v_tracker }} draft: false prerelease: ${{ contains(needs.version_check.outputs.v_tracker, 'rc') }} From 9a70fb37146e83e1ab31b96ab4c8e0ac9bb9d696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matu=CC=81s=CC=8C=20Tomlein?= Date: Tue, 19 Nov 2024 12:18:36 +0100 Subject: [PATCH 3/3] Prepare for 1.0.4 release --- CHANGES.txt | 5 +++++ docs/source/conf.py | 4 ++-- setup.py | 2 +- snowplow_tracker/_version.py | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 861f898..581f8e6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,8 @@ +Version 1.0.4 (2024-11-19) +-------------------------- +Test with Python 3.13 (#365) (Thanks to @edgarrmondragon) +Shorten automatic github release title (#352) + Version 1.0.3 (2024-08-27) -------------------------- Fix docs action (close #367) diff --git a/docs/source/conf.py b/docs/source/conf.py index 647cf11..46a8fb7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -28,7 +28,7 @@ author = 'Alex Dean, Paul Boocock, Matus Tomlein, Jack Keene' # The full version, including alpha/beta/rc tags -release = "1.0.3" +release = "1.0.4" # -- General configuration --------------------------------------------------- @@ -60,4 +60,4 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] \ No newline at end of file +html_static_path = ['_static'] diff --git a/setup.py b/setup.py index 2613743..6d38630 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ setup( name="snowplow-tracker", - version="1.0.3", + version="1.0.4", author=authors_str, author_email=authors_email_str, packages=["snowplow_tracker", "snowplow_tracker.test", "snowplow_tracker.events"], diff --git a/snowplow_tracker/_version.py b/snowplow_tracker/_version.py index b71b2e2..b6a9d71 100644 --- a/snowplow_tracker/_version.py +++ b/snowplow_tracker/_version.py @@ -15,6 +15,6 @@ # language governing permissions and limitations there under. # """ -__version_info__ = (1, 0, 3) +__version_info__ = (1, 0, 4) __version__ = ".".join(str(x) for x in __version_info__) __build_version__ = __version__ + ""