Skip to content

Conversation

@dbeltrankyl
Copy link
Collaborator

@dbeltrankyl dbeltrankyl commented Nov 11, 2025

Closes #2426

Check List

  • I have read CONTRIBUTING.md.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to pyproject.toml.
  • Tests are included (or explain why tests are not needed).
  • Changelog entry included in CHANGELOG.md if this is a change that can affect users.
  • Documentation updated.
  • If this is a bug fix, PR should include a link to the issue (e.g. Closes #1234).

@dbeltrankyl dbeltrankyl requested review from VindeeR and kinow November 11, 2025 14:44
@dbeltrankyl
Copy link
Collaborator Author

Fixes an issue with this not being substituted in all cases:

sdate=%SDATE%
sdate_from_aqua_start_date=%AQUA.START_DATE%
sdate_from_aqua_start_date_with_special=%AQUA.START_DATE_WITH_SPECIAL%
chunk_start_date=%CHUNK_START_DATE%
experiment_datelist=%experiment.datelist%
chunk=%CHUNK%

Other versions:

(.venv39) @laptop:~/autosubmit/a00r/tmp$ cat additional_template_20210101_TEST
sdate=20210101
sdate_from_aqua_start_date=20210101
sdate_from_aqua_start_date_with_special=
chunk_start_date=20210101
chunk_start_date_with_special=%^CHUNK_START_DATE%
experiment_datelist=20200101 20210101
chunk=1

New version

(.venv39) @laptop:~/autosubmit/a00r/tmp$ cat additional_template_20210101_TEST
sdate=20210101
sdate_from_aqua_start_date=20210101
sdate_from_aqua_start_date_with_special=20210101
chunk_start_date=20210101
experiment_datelist=20200101 20210101
chunk=1

@dbeltrankyl dbeltrankyl added this to the 4.1.16 milestone Nov 11, 2025
@dbeltrankyl dbeltrankyl self-assigned this Nov 11, 2025
@dbeltrankyl dbeltrankyl moved this from Todo to Review in Autosubmit project Nov 11, 2025
@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2025

Codecov Report

❌ Patch coverage is 59.25926% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.59%. Comparing base (4b47f90) to head (cf1ac91).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
autosubmit/job/job.py 59.25% 9 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2705      +/-   ##
==========================================
- Coverage   67.70%   67.59%   -0.12%     
==========================================
  Files          86       86              
  Lines       19786    19794       +8     
  Branches     3840     3843       +3     
==========================================
- Hits        13396    13379      -17     
- Misses       5458     5483      +25     
  Partials      932      932              
Flag Coverage Δ
fast-tests 67.59% <59.25%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@VindeeR VindeeR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks alright to me, and the behavior seems to be proper, and Thanks for fixing the Lint errors in the file too 🙌

There's just one thing I notice on your test, is that it only test for the case of the STARTDATES being a list and your code does and if that is not checked.

I understand that realistically speaking they have the same behavior but could you create a test to test all the edge cases

@dbeltrankyl
Copy link
Collaborator Author

dbeltrankyl commented Nov 14, 2025

There's just one thing I notice on your test, is that it only test for the case of the STARTDATES being a list and your code does and if that is not checked.

Hm, I think that parameter was already in the config of the test, (not sure why tho)

But in this PR I'm testing

CHUNK_START_DATE ( which can't be a list)
TESTDATES.START_DATE
TESTDATES.START_DATE_WITH_SPECIAL
EXPERIMENT.DATELIST ( which can't be a list right now just a string separated by " " although eventually it should be possible )

@VindeeR
Copy link
Contributor

VindeeR commented Nov 17, 2025

There's just one thing I notice on your test, is that it only test for the case of the STARTDATES being a list and your code does and if that is not checked.

Hm, I think that parameter was already in the config of the test, (not sure why tho)

But in this PR I'm testing

CHUNK_START_DATE ( which can't be a list) TESTDATES.START_DATE TESTDATES.START_DATE_WITH_SPECIAL EXPERIMENT.DATELIST ( which can't be a list right now just a string separated by " " although eventually it should be possible )

Sorry, I think I had a brain fart moment when I wrote that, I meant to say that your test only checks if they're a string but it doesn't go to the else where it checks if it is a list

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Review

Development

Successfully merging this pull request may close these issues.

Variable not correctly substituting in additional file

4 participants