Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
Expand All @@ -28,7 +28,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 .[tests]
python -m pip install flake8 .[tests,docs]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand All @@ -38,3 +38,6 @@ jobs:
- name: Test with pytest
run: |
pytest tests -x -m "not dbtest"
- name: Try to build docs
run: |
mkdocs build --strict
47 changes: 47 additions & 0 deletions .github/workflows/update-requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This workflow will install Python dependencies and create a PR to update requirements.txt if needed
# The goal is to make sure that tests still run with newer dependencies versions, in order to allow
# lax dependencies versions.

name: Update requirements.txt

on:
schedule:
- cron: "34 3 8 * *"
workflow_dispatch:

jobs:
update:
permissions:
contents: write
pull-requests: write
repository-projects: write
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[tests,docs] pyodbc psycopg2 pymysql duckdb_engine
- name: Update requirements.txt
run: |
pip freeze | grep -v 'xml2db' > requirements.txt
- name: Check changes and create pull request
run: |
if ! git diff --quiet --name-only --exit-code requirements.txt; then
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git checkout -b maintenance/update_requirements
git add requirements.txt
git commit -m "update requirements.txt"
git push -u origin maintenance/update_requirements
gh pr create --base main --head maintenance/update_requirements --title "Update requirements.txt" --body "Update requirements.txt with up to date dependencies versions."
else
echo "no changes, nothing to do."
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "xml2db"
version = "0.12.3"
version = "0.12.4"
authors = [
{ name="Commission de régulation de l'énergie", email="opensource@cre.fr" },
]
Expand All @@ -18,12 +18,12 @@ classifiers = [
]
dependencies = [
"sqlalchemy>1.4",
"xmlschema==3.3.2",
"lxml==5.1.0",
"xmlschema>=3.3.2",
"lxml>=5.1.0",
]

[project.optional-dependencies]
docs = ["mkdocs-material==9.5.34", "mkdocstrings-python==1.11.1"]
docs = ["mkdocs-material>=9.5.34", "mkdocstrings-python>=1.11.1"]
tests = ["pytest>=7.0"]

[project.urls]
Expand Down