Skip to content

Commit 811e7c5

Browse files
committed
fix: removed run.py objects from the Dockerfiles in case_i, which were removed from the model repository.
fix: timedependent get_source() are able to clone into empty folder.
1 parent ada0be8 commit 811e7c5

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

floatcsep/model.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,13 @@ def stage(
310310
and those to be generated, as well as input catalog and arguments file.
311311
312312
"""
313-
if self.force_stage or not self.registry.path.exists():
313+
need_source = (
314+
self.force_stage
315+
or not self.registry.path.exists()
316+
or (self.registry.path.is_dir() and not any(self.registry.path.iterdir()))
317+
)
318+
319+
if need_source:
314320
os.makedirs(self.registry.dir, exist_ok=True)
315321
self.get_source(self.zenodo_id, self.giturl, branch=self.repo_hash)
316322

tutorials/case_i/pymock/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN python3 -m venv $VIRTUAL_ENV && pip install --upgrade pip setuptools wheel
2828
# Copy the repository from the local machine to the Docker container.
2929
## *Only the needed folders/files for the model build*
3030
COPY --chown=$USER_UID:$USER_GID pymock/ ./pymock/
31-
COPY --chown=$USER_UID:$USER_GID setup.cfg run.py setup.py ./
31+
COPY --chown=$USER_UID:$USER_GID setup.cfg setup.py ./
3232

3333
# Install the pymock package.
3434
## *Uses pip to install setup.cfg and requirements/instructions therein*

tutorials/case_i/pymock_slow/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN python3 -m venv $VIRTUAL_ENV && pip install --upgrade pip setuptools wheel
2828
# Copy the repository from the local machine to the Docker container.
2929
## *Only the needed folders/files for the model build*
3030
COPY --chown=$USER_UID:$USER_GID pymock/ ./pymock/
31-
COPY --chown=$USER_UID:$USER_GID setup.cfg run.py setup.py ./
31+
COPY --chown=$USER_UID:$USER_GID setup.cfg setup.py ./
3232

3333
# Install the pymock package.
3434
## *Uses pip to install setup.cfg and requirements/instructions therein*

0 commit comments

Comments
 (0)