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

455 cli stage two - new implementation of 'geoips run', more args for 'geoips list', confirm editable before running tests #465

Merged
merged 69 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
d5027ca
implemented inheritance for common arguments shared for 'list' commands
evrose54 Mar 19, 2024
1d12d6d
added --columns functionality to _print_plugins_short_format in Geoip…
evrose54 Mar 20, 2024
a842aaf
added --column and --long functionality to every list command
evrose54 Mar 20, 2024
f800c3e
fixed bug where source names was checked for all yaml-based plugins
evrose54 Mar 20, 2024
4c83cdf
linting changes applied
evrose54 Mar 20, 2024
b703b9a
updated list unit tests to support new output from errors and output …
evrose54 Mar 20, 2024
17feb27
initial attempt to make 'geoips run' implement what 'run_procflow' does
evrose54 Mar 22, 2024
009b847
merged 37-create-useful-cli into 455-cli-stage-two
evrose54 Mar 29, 2024
1b2bd52
made 'geoips run' implement what 'run_procflow' does currently
evrose54 Mar 29, 2024
e8f79ba
linting changes
evrose54 Mar 29, 2024
2cf4851
modified scripts to use geoips run
evrose54 Mar 29, 2024
15222a2
updated geoips run to support single_source and data_fusion and provi…
evrose54 Apr 1, 2024
43f3160
created sub-commands for each procflow: config_based, data_fusion, si…
evrose54 Apr 2, 2024
decee19
refactored test scripts by removing --procflow calls and replacing ru…
evrose54 Apr 2, 2024
326d9e9
updated unit tests for geoips run and geoips test script
evrose54 Apr 2, 2024
65665a6
updated geoips.commandline.commandline_interface:support_legacy_procf…
evrose54 Apr 2, 2024
57ae6ae
updated comment in geoips.commandline.commandline_interface:support_l…
evrose54 Apr 2, 2024
e3cc87d
updated unit test for geoips run to check config_based procflows
evrose54 Apr 2, 2024
a53f4b9
updated comment in unit test for geoips run and added an additional t…
evrose54 Apr 2, 2024
26d9de4
linting changes
evrose54 Apr 2, 2024
2276529
updated release notes for this PR
evrose54 Apr 2, 2024
8306240
added tests for checking --columns flag for 'geoips list interface'
evrose54 Apr 2, 2024
4feec2a
updated cli v2 with what has changed with main and initial cli PR
evrose54 Apr 3, 2024
a4ff3bb
added remaining --columns args to 'list' unit tests and wrapped up re…
evrose54 Apr 3, 2024
34c7635
linting updates
evrose54 Apr 3, 2024
f1dd8bf
updated geoips run calls to detect legacy run_procflow calls and prev…
evrose54 Apr 4, 2024
dac583b
Add new dependencies for CLI - match with initial CLI PR
evrose54 Apr 4, 2024
05c62a4
merged updated initial CLI into V2 CLI
evrose54 Apr 17, 2024
d7cb584
fixed merge conflicts with initial cli pr
evrose54 Apr 17, 2024
767139f
updated release notes to use v1_13_0a0.rst instead of v1_12_2a0.rst
evrose54 Apr 29, 2024
c41a37f
merged w main so remote PR will ignore new changes added to main
evrose54 Apr 29, 2024
4db6955
resolved merge conflicts from V1 CLI to V2 CLI
evrose54 May 20, 2024
dd5a706
removed old cmd_instructions.json file
evrose54 May 20, 2024
9cbaedb
updated last references to plugin_packages to plugin_package_names
evrose54 May 20, 2024
730b187
replaced 'nrl_url' with 'github_org_url'
evrose54 May 20, 2024
4282f4a
fixed geoips list interfaces command
evrose54 May 20, 2024
aafd7dd
fixed 'test_geoips_list_interface.py' unit tests
evrose54 May 20, 2024
e2b397c
all unit tests passing other than yaml newer (problem with git)
evrose54 May 20, 2024
9c0a875
updated code to address comments on remote PR
evrose54 May 20, 2024
5a1ec51
fixed 'yaml_newer' unit test. Was broken due to git adding files at t…
evrose54 May 20, 2024
dfc86c3
black formatting changes
evrose54 May 20, 2024
7e5097c
added Beta Warning for all CLI calls
evrose54 May 20, 2024
af596f9
added a check for 'geoips run' calls with unspecified or invalid proc…
evrose54 May 20, 2024
5e3b535
fixed broken 'geoips run' unit test
evrose54 May 20, 2024
eb8b2b9
refactored beta warning
evrose54 May 20, 2024
953fb8a
renamed 'subcommand_parser' -> 'parser', 'subcommand_classes' -> 'com…
evrose54 May 21, 2024
a7e1a74
updated 'all_subcommand_combinations' -> 'command_combinations' in un…
evrose54 May 21, 2024
e2dccda
black formatting changes
evrose54 May 21, 2024
4d289fa
updated docstrings in Command Classes
evrose54 May 21, 2024
51fe3dd
updated code to support non-editable mode
evrose54 May 21, 2024
9c6f6d3
updated docstring of _get_entry and updated release notes
evrose54 May 21, 2024
38b15a7
updated docstrings for unit tests and renamed 'test_all_command_combi…
evrose54 May 22, 2024
396d214
got monkeypatch to work for the most part for CLI unit tests
evrose54 May 22, 2024
ea135af
made refactoring updates which greatly improve the efficiency of the …
evrose54 May 22, 2024
d46958f
refactored unit tests to support editable, non-editable, and a mix of…
evrose54 May 22, 2024
8ff179f
fixed poorly formatted docstrings in 'geoips get' commands
evrose54 May 22, 2024
2e5ed85
added version numbers to 'get package' and 'list packages'
evrose54 May 23, 2024
d52fbba
added comment explaining the colwidths variable set in 'list packages…
evrose54 May 23, 2024
3001813
renamed 'Documentation Link' to 'Source Code' as that is where it poi…
evrose54 May 23, 2024
2bf56bb
updated command_line.rst to reflect new functionality added to the CLI.
evrose54 May 23, 2024
9a27bf3
fixed small grammar errors in command_line.rst
evrose54 May 23, 2024
6295f8e
removed outdated comment in test_geoips_list_interfaces.py
evrose54 May 31, 2024
5879740
Merge branch 'main' into 455-cli-stage-two
evrose54 May 31, 2024
306f89a
updated this branch to address Jeremy's remaining comments
evrose54 Jun 5, 2024
bcc886c
updated release notes as we changed one more file
evrose54 Jun 5, 2024
deff748
updated command line documentation to address Mindy's comments
evrose54 Jun 5, 2024
7009186
made changes to this branch that Jeremy requested.
evrose54 Jun 6, 2024
823ec38
updated release notes title for CLI V2
evrose54 Jun 6, 2024
0b57735
Merge branch 'main' into 455-cli-stage-two
jsolbrig Jun 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/source/releases/v1_12_2a0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,12 @@ Version 1.12.2a0 (2024-02-19)
* Added documentation for create_plugin_registries and PluginRegistry Class
* Fix log_with_emphasis to deal with empty strings gracefully
* Add documentation about optional pdflatex dependency

* Refactor

* Make JSON Plugin Registries Readable
* Modify create_plugin_registries to use argparse instead of sys.argv
* Refactor optional imports in readers to use a context manager function
* Testing Updates

* Move pytest validation from plugin_registry.py to unit tests.

Testing Updates
Expand Down
116 changes: 116 additions & 0 deletions docs/source/releases/v1_13_0a0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Version 1.13.0a0 (2024-04-24)
* Enhancements

* Initial Stage of the GeoIPS CLI
* CLI Changes - new implementation of 'geoips run' and more args for 'geiops list'
* Improve error message when user missing ``pixelmatch``

* Documentation
Expand Down Expand Up @@ -151,6 +152,121 @@ For an example of how to run the GeoIPS CLI, see the code section below.
added: geoips/tests/unit_tests/commandline/test_geoips_test_unit_test.py
added: geoips/tests/unit_tests/commandline/test_geoips_test_validate.py

CLI Changes - new implementation of 'geoips run' and more args for 'geoips list'
--------------------------------------------------------------------------------

*From GEOIPS#455: 2024-03-21, CLI Stage Two*

With the addition of the GeoIPS CLI
(*From GEOIPS#37: 2022-08-11, Create a useful CLI for GeoIPS.*), we now have access to
a wide array of commands to interact with GeoIPS. The purpose of this PR is to enhance
the GeoIPS CLI with new and improved functionality. Specifically this PR addresses the
``geoips run`` command and adds additional arguments (``--columns, --long``) to
``geoips list`` commands.

``geoips run`` now invokes the same process as what ``run_procflow`` and
``data_fusion_procflow`` do. We've made this change to allow process workflow
functionality to become part of the CLI rather than a separate commandline entrypoint
that was hard to discover. Eventually, it would be nice to move all independent
commandline entrypoints onto the CLI. Such as ``create_plugin_registries``,
``create_sector_image``, etc. To use ``geoips run``, simply replace ``run_procflow``
or ``data_fusion_procflow`` with ``geoips run <specified_procflow>``, keeping the
remaining arguments the exact same. We have deprecated the use of the old procflow calls
and the ``--procflow <specified_procflow>`` flag as that information is now obtained by
the ``geoips run <specified_procflow>`` call. Below is an example of what a new
procflow script looks like:

::

geoips run single_source $GEOIPS_TESTDATA_DIR/test_data_noaa_aws/data/goes16/20200918/1950/* \
--reader_name abi_netcdf \
--product_name Infrared \
--compare_path "$GEOIPS_PACKAGES_DIR/geoips/tests/outputs/abi.static.<product>.imagery_annotated" \
--output_formatter imagery_annotated \
--filename_formatter geoips_fname \
--resampled_read \
--logging_level info \
--sector_list goes_east

As stated above, we also added new optional arguments to all ``geoips list`` commands.
These arguments are shared and are only specified once via the ``GeoipsListCommon``
class. The two new optional arguments are ``--long`` and ``--columns <col_header> ...``.
``--long`` is the default for all ``geoips list`` commands and specifies that all
headers should be outputted. ``--columns <col_header> ...`` Specifies which columns
you'd like outputted via the ``geoips list`` command. For example, if we ran
``geoips list interface algorithms``, we'd get the ``--long`` format outputted. Running
``geoips list interface algorithms --columns package interface plugin_type relpath``
provides us table output with only those specified columns. Available columns differ
by list command.

Modified Files

::

added: tests/integration_tests/cli_dummy_integration.sh
added: tests/integration_tests/cli_dummy_script.sh
modified: docs/source/userguide/command_line.rst
modified: geoips/commandline/ancillary_info/cmd_instructions.json
modified: geoips/commandline/ancillary_info/cmd_instructions.yaml
modified: geoips/commandline/args.py
modified: geoips/commandline/commandline_interface.py
modified: geoips/commandline/geoips_command.py
modified: geoips/commandline/geoips_list.py
modified: geoips/commandline/geoips_run.py
modified: geoips/commandline/run_procflow.py
modified: geoips/utils/context_managers.py
modified: geoips/create_plugin_registries.py
modified: geoips/geoips_utils.py
modified: pyproject.toml
modified: tests/scripts/abi.config_based_exclude_goes17.sh
modified: tests/scripts/abi.config_based_output.sh
modified: tests/scripts/abi.config_based_output_low_memory.sh
modified: tests/scripts/abi.static.Infrared.imagery_annotated.sh
modified: tests/scripts/abi.static.Visible.imagery_annotated.sh
modified: tests/scripts/ahi.tc.WV.geotiff.sh
modified: tests/scripts/amsr2.config_based_no_compare.sh
modified: tests/scripts/amsr2.config_based_no_compare_full.sh
modified: tests/scripts/amsr2.config_based_overlay_output.sh
modified: tests/scripts/amsr2.config_based_overlay_output_low_memory.sh
modified: tests/scripts/amsr2.tc.89H-Physical.imagery_annotated.sh
modified: tests/scripts/amsr2_ocean.tc.windspeed.imagery_clean.sh
modified: tests/scripts/amsub_mirs.tc.183-3H.imagery_annotated.sh
modified: tests/scripts/ascat_knmi.tc.windbarbs.imagery_windbarbs_clean.sh
modified: tests/scripts/ascat_low_knmi.tc.windbarbs.imagery_windbarbs.sh
modified: tests/scripts/ascat_noaa_25km.tc.windbarbs.imagery_windbarbs.sh
modified: tests/scripts/ascat_noaa_50km.tc.wind-ambiguities.imagery_windbarbs.sh
modified: tests/scripts/ascat_uhr.tc.nrcs.imagery_clean.sh
modified: tests/scripts/ascat_uhr.tc.wind-ambiguities.imagery_windbarbs.sh
modified: tests/scripts/ascat_uhr.tc.windbarbs.imagery_windbarbs.sh
modified: tests/scripts/ascat_uhr.tc.windspeed.imagery_clean.sh
modified: tests/scripts/atms.tc.165H.netcdf_geoips.sh
modified: tests/scripts/documentation_imagery.sh
modified: tests/scripts/ewsg.static.Infrared.imagery_clean.sh
modified: tests/scripts/gmi.tc.89pct.imagery_clean.sh
modified: tests/scripts/hy2.tc.windspeed.imagery_annotated.sh
modified: tests/scripts/imerg.tc.Rain.imagery_clean.sh
modified: tests/scripts/mimic_coarse.static.TPW-CIMSS.imagery_annotated.sh
modified: tests/scripts/mimic_fine.tc.TPW-PWAT.imagery_annotated.sh
modified: tests/scripts/modis.Infrared.unprojected_image.sh
modified: tests/scripts/oscat_knmi.tc.windbarbs.imagery_windbarbs.sh
modified: tests/scripts/saphir.tc.183-3HNearest.imagery_annotated.sh
modified: tests/scripts/sar.tc.nrcs.imagery_annotated.sh
modified: tests/scripts/seviri.WV-Upper.unprojected_image.sh
modified: tests/scripts/smap.tc.windspeed.imagery_clean.sh
modified: tests/scripts/smap.unsectored.text_winds.sh
modified: tests/scripts/smos.tc.sectored.text_winds.sh
modified: tests/scripts/ssmi.tc.37pct.imagery_clean.sh
modified: tests/scripts/ssmis.color91.unprojected_image.sh
modified: tests/scripts/viirsclearnight.Night-Vis-IR-GeoIPS1.unprojected_image.sh
modified: tests/scripts/viirsday.tc.Night-Vis-IR.imagery_annotated.sh
modified: tests/scripts/viirsmoon.tc.Night-Vis-GeoIPS1.imagery_clean.sh
modified: tests/unit_tests/commandline/test_geoips_list_interface.py
modified: tests/unit_tests/commandline/test_geoips_list_packages.py
modified: tests/unit_tests/commandline/test_geoips_list_scripts.py
modified: tests/unit_tests/commandline/test_geoips_list_test_datasets.py
modified: tests/unit_tests/commandline/test_geoips_list_unit_tests.py
modified: tests/unit_tests/commandline/test_geoips_run.py
modified: tests/unit_tests/commandline/test_geoips_test_script.py

Improve error message when user missing ``pixelmatch``
------------------------------------------------------
Expand Down
Loading
Loading