Skip to content

Commit

Permalink
Merge branch 'dev' into feat/never-return-empty-matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Feb 6, 2025
2 parents 5229a1f + 3efcfff commit 2113e6f
Show file tree
Hide file tree
Showing 1,211 changed files with 11,661 additions and 17,791 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Lint Commit Messages
name: commitlint
on: [pull_request]

permissions:
contents: read
pull-requests: read

jobs:
commitlint:
commit-messages-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: 💚 Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18.16.1
node-version: 22.13.0

- name: 💚 Install dependencies
run: npm install
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: check license headers
name: license-header
on:
push:
branches:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: psf/black@stable
with:
# Version of Black should match the versions set in `requirements-dev.txt`
version: "~=23.7.0"
version: "~=25.1.0"
options: --check --diff
- name: Check Typing (mypy)
#continue-on-error: true
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18.16.1
node-version: 22.13.0
- name: Cache node modules
uses: actions/cache@v4
with:
Expand All @@ -92,7 +92,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18.16.1
node-version: 22.13.0
- name: Restore node modules
uses: actions/cache@v4
with:
Expand All @@ -112,7 +112,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18.16.1
node-version: 22.13.0
- name: Restore node modules
uses: actions/cache@v4
with:
Expand All @@ -132,7 +132,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18.16.1
node-version: 22.13.0
- name: Restore node modules
uses: actions/cache@v4
with:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: pr-title
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']

jobs:
pr-title-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: npm install @commitlint/[email protected]
- uses: JulienKode/[email protected]
35 changes: 0 additions & 35 deletions AntaresWebLinux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -54,45 +54,10 @@ antares_web_server_exe = EXE(antares_web_server_pyz,
entitlements_file=None , icon='resources/webapp/favicon.ico')


antares_tool_a = Analysis(['antarest/tools/cli.py'],
pathex=[],
binaries=[],
datas=[('./resources', './resources')],
hiddenimports=['cmath', 'sqlalchemy.sql.default_comparator', 'sqlalchemy.ext.baked'],
hookspath=['extra-hooks'],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
antares_tool_pyz = PYZ(antares_tool_a.pure, antares_tool_a.zipped_data,
cipher=block_cipher)
antares_tool_exe = EXE(antares_tool_pyz,
antares_tool_a.scripts,
[],
exclude_binaries=True,
name='AntaresTool',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None )


coll = COLLECT(antares_web_server_exe,
antares_web_server_a.binaries,
antares_web_server_a.zipfiles,
antares_web_server_a.datas,
antares_tool_exe,
antares_tool_a.binaries,
antares_tool_a.zipfiles,
antares_tool_a.datas,
strip=False,
upx=True,
upx_exclude=[],
Expand Down
36 changes: 0 additions & 36 deletions AntaresWebWin.spec
Original file line number Diff line number Diff line change
Expand Up @@ -53,46 +53,10 @@ antares_web_server_exe = EXE(antares_web_server_pyz,
codesign_identity=None,
entitlements_file=None , icon='resources/webapp/favicon.ico')


antares_tool_a = Analysis(['antarest/tools/cli.py'],
pathex=[],
binaries=[],
datas=[('./resources', './resources')],
hiddenimports=['cmath', 'sqlalchemy.sql.default_comparator', 'sqlalchemy.ext.baked'],
hookspath=['extra-hooks'],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
antares_tool_pyz = PYZ(antares_tool_a.pure, antares_tool_a.zipped_data,
cipher=block_cipher)
antares_tool_exe = EXE(antares_tool_pyz,
antares_tool_a.scripts,
[],
exclude_binaries=True,
name='AntaresTool',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
disable_windowed_traceback=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None )


coll = COLLECT(antares_web_server_exe,
antares_web_server_a.binaries,
antares_web_server_a.zipfiles,
antares_web_server_a.datas,
antares_tool_exe,
antares_tool_a.binaries,
antares_tool_a.zipfiles,
antares_tool_a.datas,
strip=False,
upx=True,
upx_exclude=[],
Expand Down
2 changes: 1 addition & 1 deletion antarest/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/application.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/cache/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/cache/business/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/cache/business/local_chache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/cache/business/redis_cache.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/cache/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
8 changes: 7 additions & 1 deletion antarest/core/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down Expand Up @@ -263,6 +263,8 @@ class LocalConfig:
enable_nb_cores_detection: bool = True
nb_cores: NbCoresConfig = NbCoresConfig()
time_limit: TimeLimitConfig = TimeLimitConfig()
xpress_dir: Optional[str] = None
local_workspace: Path = Path("./local_workspace")

@classmethod
def from_dict(cls, data: JSON) -> "LocalConfig":
Expand All @@ -278,10 +280,14 @@ def from_dict(cls, data: JSON) -> "LocalConfig":
nb_cores = data.get("nb_cores", asdict(defaults.nb_cores))
if enable_nb_cores_detection:
nb_cores.update(cls._autodetect_nb_cores())
xpress_dir = data.get("xpress_dir", defaults.xpress_dir)
local_workspace = Path(data["local_workspace"]) if "local_workspace" in data else defaults.local_workspace
return cls(
binaries={str(v): Path(p) for v, p in binaries.items()},
enable_nb_cores_detection=enable_nb_cores_detection,
nb_cores=NbCoresConfig(**nb_cores),
xpress_dir=xpress_dir,
local_workspace=local_workspace,
)

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/configdata/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/configdata/model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/configdata/repository.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/core_blueprint.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
7 changes: 6 additions & 1 deletion antarest/core/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down Expand Up @@ -545,6 +545,11 @@ def __init__(self, message: str) -> None:
super().__init__(HTTPStatus.UNPROCESSABLE_ENTITY, message)


class MatrixImportFailed(HTTPException):
def __init__(self, message: str) -> None:
super().__init__(HTTPStatus.UNPROCESSABLE_ENTITY, message)


class ConstraintTermNotFound(HTTPException):
"""
Exception raised when a constraint term is not found.
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/filesystem_blueprint.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/filetransfer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/filetransfer/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/filetransfer/model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
2 changes: 1 addition & 1 deletion antarest/core/filetransfer/repository.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2024, RTE (https://www.rte-france.com)
# Copyright (c) 2025, RTE (https://www.rte-france.com)
#
# See AUTHORS.txt
#
Expand Down
Loading

0 comments on commit 2113e6f

Please sign in to comment.