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

fix logic to extract parameters from file names in the contour subfolder #1510

Merged
merged 3 commits into from
Feb 11, 2025

Conversation

charlienegri
Copy link
Collaborator

@charlienegri charlienegri commented Feb 9, 2025

Change Summary

extraction of parameters from file names in the contour folder cannot be discriminated anymore on the pure base of how many _-separated substrings they contain

Related issue number

fix #1509

Checklist

  • Start with a draft-PR
  • The PR title is a good summary of the changes
  • PR is set to AeroTools and a tentative milestone
  • Documentation reflects the changes where applicable
  • Tests for the changes exist where applicable
  • Tests pass locally
  • Tests pass on CI
  • At least 1 reviewer is selected
  • Make PR ready to review

Copy link

codecov bot commented Feb 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.34%. Comparing base (2ff012d) to head (26ea3f6).
Report is 4 commits behind head on main-dev.

Additional details and impacted files
@@             Coverage Diff              @@
##           main-dev    #1510      +/-   ##
============================================
+ Coverage     78.33%   78.34%   +0.01%     
============================================
  Files           140      140              
  Lines         21413    21410       -3     
============================================
+ Hits          16773    16774       +1     
+ Misses         4640     4636       -4     
Flag Coverage Δ
unittests 78.34% <100.00%> (+0.01%) ⬆️

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.

@charlienegri
Copy link
Collaborator Author

charlienegri commented Feb 10, 2025

̶t̶e̶s̶t̶e̶d̶ ̶w̶i̶t̶h̶ ̶a̶n̶ ̶o̶n̶l̶y̶m̶a̶p̶ ̶r̶u̶n̶ ̶f̶o̶r̶ ̶c̶a̶m̶s̶2̶_̶8̶3̶ ̶a̶n̶d̶ ̶i̶t̶ ̶s̶o̶l̶v̶e̶s̶ ̶t̶h̶e̶ ̶i̶s̶s̶u̶e̶ ̶ ̶
however: why it is necessary to have a different naming strategy for webp/png and geojsons? is this due to the frontend?
if not the code could be simplified

edit: it solves the issue as in the job ends with exit code 0 but I get these line in the logs 2025-02-10 09:21:26:pyaerocom.aeroval.experiment_output:1.1/1.3G:WARNING:Invalid entry: model EURAD (concpm10), obs EEA (concpm10) I do not recall if they are normal now due to the onlymap runs being not self-standing, might be, will check asap

update: checked and these warnings are indeed normal, so I consider the issue solved

@charlienegri
Copy link
Collaborator Author

charlienegri commented Feb 10, 2025

I checked an old experiment with overlays and the file naming logic was indeed the opposite there, as in model_var_per.webp, (EURAD_concpm25_1730376000000.web) so I reverted to the split logic just now... @thorbjoernl can you point me at where the new var_model_per.geojson logic and the overlay naming scheme are decided? I am confused by this https://github.com/metno/pyaerocom/blob/main-dev/pyaerocom/aeroval/modelmaps_engine.py#L206

@charlienegri charlienegri marked this pull request as ready for review February 10, 2025 11:04
@thorbjoernl
Copy link
Collaborator

@charlienegri The templates that are currently be used are defined here (ROUTE_MAP_OVERLAY and ROUTE_CONTOUR2): https://github.com/metno/aerovaldb/blob/88bb6865ad810ab2f13cedb233c2c7ad600b5ae4/src/aerovaldb/jsondb/jsonfiledb.py#L68

Copy link
Collaborator

@thorbjoernl thorbjoernl left a comment

Choose a reason for hiding this comment

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

See comment.

Comment on lines 347 to 349
name = spl[0]
var_name = spl[1]
per = spl[2]
Copy link
Collaborator

Choose a reason for hiding this comment

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

This does not appear to match the template string in aerovaldb, according to which the order should be var_name, name, period. If this gives the right behaviour, and doesn't work with the aerovaldb something weird is going on.

@thorbjoernl thorbjoernl merged commit ac8f3f9 into main-dev Feb 11, 2025
8 checks passed
@thorbjoernl thorbjoernl deleted the fix_1509 branch February 11, 2025 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

onlymap runs seem to fail with latest code
2 participants