Skip to content

Aqua analysis cli #2065

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

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from
Draft

Aqua analysis cli #2065

wants to merge 29 commits into from

Conversation

mnurisso
Copy link
Collaborator

@mnurisso mnurisso commented Jul 8, 2025

PR description:

Create an entry point aqua analysis -c config.yaml as per the LRA

Issues closed by this pull request:

Close #2054

  • Tests of the CLI entry point
  • Parser working
  • Documentation of the entry point, already available for the aqua analysis itself
  • Docstrings are updated if needed.
  • Changelog is updated
  • check and if needed removal of old legacy features
  • Installation is updated

@mnurisso mnurisso self-assigned this Jul 8, 2025
@mnurisso mnurisso marked this pull request as draft July 8, 2025 14:59
@mnurisso mnurisso added cli/scripts improvement Improvement to existing functionality labels Jul 8, 2025
@mnurisso mnurisso added the run tests Set this up to let test run label Jul 11, 2025
Copy link

codecov bot commented Jul 11, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
314 2 312 0
View the top 2 failed test(s) by shortest run time
tests/test_catgen.py::test_catgen_full[IFS-NEMO-28-75]
Stack Traces | 16.3s run time
tmp_path = PosixPath('.../pytest-of-root/pytest-0/test_catgen_full_IFS_NEMO_28_70')
model = 'IFS-NEMO', nsources = 28, nocelevels = 75

    @pytest.mark.parametrize(('model,nsources,nocelevels'),
                            [('IFS-NEMO', 28, 75),
                             ('IFS-FESOM', 31, 69),
                             ('ICON', 21, 72)])
    @pytest.mark.catgen
    def test_catgen_full(tmp_path, model, nsources, nocelevels):
        """test for full portfolio"""
    
        sources = load_and_prepare(tmp_path, model, 'full', 'production')
    
        # check how many sources
>       assert len(sources['sources']) == nsources
E       AssertionError: assert 24 == 28
E        +  where 24 = len({'hourly-hpz10-atm2d': {'args': {'request': {'class': 'd1', 'dataset': 'climate-dt', 'activity': 'highresmip', 'experiment': 'cont', 'generation': 1, 'model': 'IFS-NEMO', 'realization': 1, 'resolution': 'high', 'expver': 1, 'type': 'fc', 'stream': 'clte', 'date': 19900101, 'time': 0, 'param': 78, 'levtype': 'sfc'}, 'data_start_date': '19900101T0000', 'data_end_date': 'auto', 'chunks': 'D', 'savefreq': 'h', 'timestep': 'h', 'timestyle': 'date'}, 'description': 'FDB IFS/NEMO test run', 'driver': 'gsv', 'metadata': {'fdb_home': '.../t01o/fdb/HEALPIX_grids', 'eccodes_path': '.../models/ifs-nemo/DE_CY48R1.0_climateDT_20240523.../source/eccodes/definitions', 'variables': [78, 79, 134, 136, 137, 151, 165, 166, 167, 168, 207, 235, 228141, 228164, 235020, 235021, 235031, 235033, 235034, 235035, 235036, 235037, 235038, 235039, 235040, 235041, 235042, 235043, 235049, 235050, 235051, 235052, 235053, 235055], 'source_grid_name': 'hpz10-nested', 'fixer_name': 'ifs-destine-v1'}}, 'hourly-hpz7-atm2d': {'args': {'request': {'class': 'd1', 'dataset': 'climate-dt', 'activity': 'highresmip', 'experiment': 'cont', 'generation': 1, 'm...EALPIX_grids', 'eccodes_path': '.../models/ifs-nemo/DE_CY48R1.0_climateDT_20240523.../source/eccodes/definitions', 'levels': [1, 2, 3, 4, 5], 'variables': [235078, 235077], 'source_grid_name': 'hpz10', 'fixer_name': 'ifs-destine-v1'}}, 'monthly-hpz7-sol': {'args': {'request': {'class': 'd1', 'dataset': 'climate-dt', 'activity': 'highresmip', 'experiment': 'cont', 'generation': 1, 'model': 'IFS-NEMO', 'realization': 1, 'resolution': 'standard', 'expver': 1, 'type': 'fc', 'stream': 'clmn', 'year': 1990, 'month': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], 'param': 235078, 'levtype': 'sol', 'levelist': [1, 2, 3, 4, 5]}, 'data_start_date': '19900101T0000', 'data_end_date': 'auto', 'chunks': 'MS', 'savefreq': 'MS', 'timestep': 'h', 'timestyle': 'yearmonth'}, 'description': 'FDB IFS/NEMO test run', 'driver': 'gsv', 'metadata': {'fdb_home': '.../t01o/fdb/HEALPIX_grids', 'eccodes_path': '.../models/ifs-nemo/DE_CY48R1.0_climateDT_20240523.../source/eccodes/definitions', 'levels': [1, 2, 3, 4, 5], 'variables': [235078, 235077], 'source_grid_name': 'hpz7', 'fixer_name': 'ifs-destine-v1'}}})

tests/test_catgen.py:148: AssertionError
tests/test_catgen.py::test_catgen_full[IFS-FESOM-31-69]
Stack Traces | 16.5s run time
tmp_path = PosixPath('.../pytest-of-root/pytest-0/test_catgen_full_IFS_FESOM_31_0')
model = 'IFS-FESOM', nsources = 31, nocelevels = 69

    @pytest.mark.parametrize(('model,nsources,nocelevels'),
                            [('IFS-NEMO', 28, 75),
                             ('IFS-FESOM', 31, 69),
                             ('ICON', 21, 72)])
    @pytest.mark.catgen
    def test_catgen_full(tmp_path, model, nsources, nocelevels):
        """test for full portfolio"""
    
        sources = load_and_prepare(tmp_path, model, 'full', 'production')
    
        # check how many sources
>       assert len(sources['sources']) == nsources
E       AssertionError: assert 27 == 31
E        +  where 27 = len({'hourly-hpz10-atm2d': {'args': {'request': {'class': 'd1', 'dataset': 'climate-dt', 'activity': 'highresmip', 'experiment': 'cont', 'generation': 1, 'model': 'IFS-FESOM', 'realization': 1, 'resolution': 'high', 'expver': 1, 'type': 'fc', 'stream': 'clte', 'date': 19900101, 'time': 0, 'param': 78, 'levtype': 'sfc'}, 'data_start_date': '19900101T0000', 'data_end_date': 'auto', 'chunks': 'D', 'savefreq': 'h', 'timestep': 'h', 'timestyle': 'date'}, 'description': 'FDB IFS/NEMO test run', 'driver': 'gsv', 'metadata': {'fdb_home': '.../t01o/fdb/HEALPIX_grids', 'eccodes_path': '.../models/ifs-nemo/DE_CY48R1.0_climateDT_20240523.../source/eccodes/definitions', 'variables': [78, 79, 134, 136, 137, 151, 165, 166, 167, 168, 207, 235, 228141, 228164, 235020, 235021, 235031, 235033, 235034, 235035, 235036, 235037, 235038, 235039, 235040, 235041, 235042, 235043, 235049, 235050, 235051, 235052, 235053, 235055], 'source_grid_name': 'hpz10-nested', 'fixer_name': 'ifs-destine-v1'}}, 'hourly-hpz7-atm2d': {'args': {'request': {'class': 'd1', 'dataset': 'climate-dt', 'activity': 'highresmip', 'experiment': 'cont', 'generation': 1, '...ALPIX_grids', 'eccodes_path': '.../models/ifs-nemo/DE_CY48R1.0_climateDT_20240523.../source/eccodes/definitions', 'levels': [1, 2, 3, 4, 5], 'variables': [235078, 235077], 'source_grid_name': 'hpz10', 'fixer_name': 'ifs-destine-v1'}}, 'monthly-hpz7-sol': {'args': {'request': {'class': 'd1', 'dataset': 'climate-dt', 'activity': 'highresmip', 'experiment': 'cont', 'generation': 1, 'model': 'IFS-FESOM', 'realization': 1, 'resolution': 'standard', 'expver': 1, 'type': 'fc', 'stream': 'clmn', 'year': 1990, 'month': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], 'param': 235078, 'levtype': 'sol', 'levelist': [1, 2, 3, 4, 5]}, 'data_start_date': '19900101T0000', 'data_end_date': 'auto', 'chunks': 'MS', 'savefreq': 'MS', 'timestep': 'h', 'timestyle': 'yearmonth'}, 'description': 'FDB IFS/NEMO test run', 'driver': 'gsv', 'metadata': {'fdb_home': '.../t01o/fdb/HEALPIX_grids', 'eccodes_path': '.../models/ifs-nemo/DE_CY48R1.0_climateDT_20240523.../source/eccodes/definitions', 'levels': [1, 2, 3, 4, 5], 'variables': [235078, 235077], 'source_grid_name': 'hpz7', 'fixer_name': 'ifs-destine-v1'}}})

tests/test_catgen.py:148: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli/scripts improvement Improvement to existing functionality run tests Set this up to let test run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create an entry point for aqua-analysis (e.g. aqua analysis -c bla bla)
1 participant