Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⬆️(project) upgrade python dependencies #167

Merged
merged 1 commit into from
Sep 10, 2024
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: 7 additions & 0 deletions src/api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ and this project adheres to

## [Unreleased]

### Changed

- Upgrade fastapi to `0.114.0`
- Upgrade Pydantic to `2.9.1`
- Upgrade pyinstrument to `4.7.3`
- Upgrade sentry-sdk to `74.1.2`

## [0.12.1] - 2024-09-09

### Fixed
Expand Down
14 changes: 7 additions & 7 deletions src/api/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "pypi"
alembic = "==1.13.2"
annotated-types = "==0.7.0"
email-validator = "==2.2.0"
fastapi = "==0.112.2"
fastapi = "==0.114.0"
geoalchemy2 = {extras = ["shapely"], version = "==0.15.2"}
geopandas = "==1.0.1"
httpx = {extras = ["cli"], version = "==0.27.2"}
Expand All @@ -17,12 +17,12 @@ psycopg = {extras = ["pool", "binary"], version = "==3.2.1"}
pyarrow = "==17.0.0"
pydantic-extra-types = {extras = ["all"], version = "==2.9.0"}
pydantic-settings = "==2.4.0"
pyinstrument = "==4.7.2"
pyinstrument = "==4.7.3"
pyjwt = "==2.9.0"
python-multipart = "==0.0.9"
questionary = "==2.0.1"
sentry-sdk = {extras = ["fastapi"], version = "==2.13.0"}
setuptools = "==74.1.1"
sentry-sdk = {extras = ["fastapi"], version = "==2.14.0"}
setuptools = "==74.1.2"
sqlalchemy-timescaledb = "==0.4.1"
sqlmodel = "==0.0.22"
typer = "==0.12.5"
Expand All @@ -33,13 +33,13 @@ black = "==24.8.0"
csvkit = "==2.0.1"
honcho = "==1.1.0"
mypy = "==1.11.2"
pandas-stubs = "==2.2.2.240807"
pandas-stubs = "==2.2.2.240909"
polyfactory = "==2.16.2"
pyinstrument = "==4.7.2"
pyinstrument = "==4.7.3"
pytest = "==8.3.2"
pytest-cov = "==5.0.0"
pytest-httpx = "==0.30.0"
ruff = "==0.6.3"
ruff = "==0.6.4"
types-passlib = "==1.7.7.20240819"
types-python-jose = "==3.3.4.20240106"

Expand Down
724 changes: 362 additions & 362 deletions src/api/Pipfile.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ python_files = [
testpaths = [
"tests",
]

[tool.ruff]
target-version = "py310"
# Exclude a variety of commonly ignored directories.
exclude = [
"migrations",
Expand Down
4 changes: 2 additions & 2 deletions src/api/qualicharge/api/v1/routers/dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ async def create_status_bulk(

# Create all statuses
db_statuses = []
for status, pdc_index in zip(statuses, pdc_indexes):
for status, pdc_index in zip(statuses, pdc_indexes, strict=True):
db_status = Status(**status.model_dump(exclude={"id_pdc_itinerance"}))
db_status.point_de_charge_id = db_pdcs[pdc_index].id
db_statuses.append(db_status)
Expand Down Expand Up @@ -437,7 +437,7 @@ async def create_session_bulk(

# Create all statuses
db_qc_sessions = []
for session, pdc_index in zip(sessions, pdc_indexes):
for session, pdc_index in zip(sessions, pdc_indexes, strict=True):
db_qc_session = QCSession(**session.model_dump(exclude={"id_pdc_itinerance"}))
db_qc_session.point_de_charge_id = db_pdcs[pdc_index].id
db_qc_sessions.append(db_qc_session)
Expand Down
8 changes: 6 additions & 2 deletions src/api/tests/api/v1/routers/test_dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,9 @@ def test_read_status_history_for_superuser(db_session, client_auth):
response_statuses = [StatusRead(**s) for s in response.json()]
assert len(response_statuses) == len(expected_statuses)

for expected_status, response_status in zip(expected_statuses, response_statuses):
for expected_status, response_status in zip(
expected_statuses, response_statuses, strict=True
):
assert expected_status.etat_pdc == response_status.etat_pdc
assert expected_status.occupation_pdc == response_status.occupation_pdc
assert expected_status.horodatage == response_status.horodatage.astimezone()
Expand Down Expand Up @@ -640,7 +642,9 @@ def test_read_status_history_for_user(db_session, client_auth):
response_statuses = [StatusRead(**s) for s in response.json()]
assert len(response_statuses) == len(expected_statuses)

for expected_status, response_status in zip(expected_statuses, response_statuses):
for expected_status, response_status in zip(
expected_statuses, response_statuses, strict=True
):
assert expected_status.horodatage == response_status.horodatage.astimezone()


Expand Down
2 changes: 1 addition & 1 deletion src/api/tests/api/v1/routers/test_statique.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def test_list_for_user(client_auth, db_session):
for operational_unit in operational_units
if operational_unit not in selected_operational_units
]
for group, operational_unit in zip(groups, selected_operational_units):
for group, operational_unit in zip(groups, selected_operational_units, strict=True):
db_session.add(
GroupOperationalUnit(
group_id=group.id, operational_unit_id=operational_unit.id
Expand Down
2 changes: 1 addition & 1 deletion src/api/tests/auth/test_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_user_operational_units_property(db_session):

# Link groups to operational units
codes = ["FRS63", "FRA31", "FRAIR"]
for code, group in zip(codes, groups):
for code, group in zip(codes, groups, strict=True):
operational_unit = db_session.exec(
select(OperationalUnit).where(OperationalUnit.code == code)
).one()
Expand Down
2 changes: 1 addition & 1 deletion src/api/tests/auth/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_user_get_operational_units(db_session):
)
db_session.add_all(
GroupOperationalUnit(group_id=group.id, operational_unit_id=operational_unit.id)
for group, operational_unit in zip(groups, operational_units)
for group, operational_unit in zip(groups, operational_units, strict=True)
)

# Get operational unit codes
Expand Down
4 changes: 4 additions & 0 deletions src/client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to

## [Unreleased]

### Changed

- Upgrade Pydantic to `2.9.1`

## [0.2.0] - 2024-09-05

### Changed
Expand Down
Loading