Skip to content

Commit

Permalink
build: remove the link to antareslauncher, use `Antares-Launcher~=1…
Browse files Browse the repository at this point in the history
….2.2` instead
  • Loading branch information
laurent-laporte-pro committed Mar 6, 2023
1 parent ebf3af4 commit 2edecc6
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 24 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ jobs:
- name: Install Windows dependencies
if: matrix.os == 'windows-latest'
run: pip install -r requirements-windows.txt
- name: Fix symlink for windows
if: matrix.os == 'windows-latest'
run: |
rm antareslauncher
ln -s antares-launcher\antareslauncher antareslauncher
- name: Generate Windows binary
if: matrix.os == 'windows-latest'
run: |
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Fix symlink for windows
if: matrix.os == 'windows-latest'
run: |
rm antareslauncher
ln -s antares-launcher\antareslauncher antareslauncher
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ COPY ./scripts /scripts
COPY ./alembic /alembic
COPY ./alembic.ini /alembic.ini

COPY ./antares-launcher /antares-launcher
RUN ln -s /antares-launcher/antareslauncher /antareslauncher
RUN mkdir /conf/antares-launcher
RUN cp /antares-launcher/requirements.txt /conf/antares-launcher/requirements.txt
# > IMPORTANT: The `antares-launcher` project (source files) is no longer needed,
# > because the `Antares-Launcher` Python library is now declared as a dependency
# > in the `requirements.txt` file.
# > In other words, we can dispense with the creation of the symbolic link.

# COPY ./antares-launcher /antares-launcher
# RUN ln -s /antares-launcher/antareslauncher /antareslauncher
# RUN mkdir /conf/antares-launcher
# RUN cp /antares-launcher/requirements.txt /conf/antares-launcher/requirements.txt

RUN ./scripts/install-debug.sh

Expand Down
1 change: 0 additions & 1 deletion antareslauncher

This file was deleted.

5 changes: 3 additions & 2 deletions antarest/launcher/adapters/slurm_launcher/slurm_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import traceback
from copy import deepcopy
from pathlib import Path
from typing import Awaitable, Callable, Dict, List, Optional
from typing import Awaitable, Callable, Dict, List, Optional, cast

from antareslauncher.data_repo.data_repo_tinydb import DataRepoTinydb
from antareslauncher.main import MainParameters, run_with
Expand Down Expand Up @@ -198,8 +198,8 @@ def _init_launcher_arguments(
parser: MainOptionParser = MainOptionParser(main_options_parameters)
parser.add_basic_arguments()
parser.add_advanced_arguments()
arguments = parser.parse_args([])

arguments = cast(argparse.Namespace, parser.parse_args([]))
arguments.wait_mode = False
arguments.check_queue = False
arguments.json_ssh_config = None
Expand All @@ -208,6 +208,7 @@ def _init_launcher_arguments(
arguments.version = False
arguments.post_processing = False
arguments.other_options = None

return arguments

def _init_launcher_parameters(
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ v2.13.0 (unreleased)
* remove redundant call to `mypy` in GitHub actions. ([96e2b82](https://github.com/AntaresSimulatorTeam/AntaREST/commit/96e2b824eb348d1a3fe5bacf89de35e9cb7fc0fa))
* upgrade Black version in `requirements-dev.txt` and `.github/workflows/main.yml`. ([464c7ff](https://github.com/AntaresSimulatorTeam/AntaREST/commit/464c7ff1ea877646815a3c70891e36b976b856d8))

> IMPORTANT: The `antares-launcher` project (source files) is no longer needed,
> because the `Antares-Launcher` Python library is now declared as a dependency
> in the `requirements.txt` file.

### Styles

Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-r requirements-test.txt
pytest~=6.2.5
# Version of Black should match the versions set in `.github/workflows/main.yml`
black~=23.1.0
mypy~=0.931
Expand Down
3 changes: 2 additions & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
-r requirements.txt
pytest-cov
pytest~=6.2.5
pytest-cov~=4.0.0
5 changes: 1 addition & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
-r antares-launcher/requirements.txt
# freezed
mistune~=0.8.4
m2r~=0.2.1
Antares-Launcher~=1.2.2

aiofiles~=0.8.0
alembic~=1.7.5
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ strict = True
files = antarest/**/*.py

[mypy-antareslauncher.*]
ignore_errors = True
ignore_missing_imports = True

[mypy-jsonschema.*]
ignore_missing_imports = True
Expand Down

0 comments on commit 2edecc6

Please sign in to comment.