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

Enable CI testing for long options #2305

Merged
merged 1 commit into from
Dec 20, 2019
Merged

Conversation

seisman
Copy link
Member

@seisman seisman commented Dec 20, 2019

Add following statements to CI cmake script.

add_definitions(-DUSE_COMMON_LONG_OPTIONS) 	# Turn on testing of upcoming long-option syntax for common GMT options
add_definitions(-DUSE_MODULE_LONG_OPTIONS) 	# Turn on testing of upcoming long-option syntax for module options

@seisman seisman requested a review from PaulWessel December 20, 2019 00:28
@seisman seisman merged commit ea731fd into longoptionsparsing Dec 20, 2019
@seisman seisman deleted the longoption-ci branch December 20, 2019 00:29
PaulWessel added a commit that referenced this pull request Dec 21, 2019
* WIP Explore adding long-format GMT options

This branch is work in progress on adding long-format option parsing to GMT.  E.g., --region=w/e/s/n instead of -Rw/e/s/n, --registration=pixel instead of -r, and so on.  At the moment only the common options and their most basic forms have been implemented, as well as local options for blockmean.
I will write more later about how this all works and what is required to be added to each module - blockmean.c static variable local_kw shows how.

* More common option long-format words

Update long-syntax for -U and -s.

* Update mgd77track.c

Merge from master missed the new NULL argument..

* Add separator variable to GMT_KW_DICT

Needed to split parsing of options that are given as a series of arguments separated by slashes (e.g., xinc/yinc) or commas (e.g., input columns).

* Let -T option be a modifer under -C

The -T and -C are dealing with the same issue: The text bounding box atrributes.  I have combined these with -T now being a modifer +t<shape> under -C.  Tests pass, documentation has been updated.

* Remove the ifdef USE_GMT_KWD

No point having this since this is a separate branch for testing anyway.

* Implement parsing of sections

Added code to handle multi-section arguments such as --increments=30+e/50+n

* Documentation

Improve the documentation of the new gmtinit_kw_replace function that converts long-format GMT options to standard short-format options.

* Fix a few issues

missing args to gmt_init_module.

* Seppl out structure name

KEYWORD_DICTIONARY

* rename a few keywords

Sucn as read-columns and write-columns.

* Add grdinterpolate to the mix and fix some errors

* Let keyword dictionary be ifdef under USE_LONG_OPTIONS

This means it can be merged into master with no side-effects since developers must define USE_LONG_OPTIONS for any keywords to be defined.

* Minor text improvements

* Fix the use of USE_LONG_OPTIONS

* Update ConfigUserTemplate.cmake

Forgot it has to be a define, not  cmake variable.

* Add --frame

* Rename kw arrays to make it clearer that one is module-specific

* Update src/blockmean.c

Co-Authored-By: Dongdong Tian <[email protected]>

* Fix issues in block_subs.c

* Update src/gmt_init.c

Co-Authored-By: Dongdong Tian <[email protected]>

* Update src/gmt_init.c

Co-Authored-By: Dongdong Tian <[email protected]>

* Adding axes as keyword

Better docs for code, longer variables, fixing some bugs.

* Escape +? strings that should not be seen as modifiers

* Move --increment to block_subs.c, update commons, use --axis

--frame=axes sets which axes to draw, and --axis specifies the settings of an axis.

* Enable CI testing for long options (#2305)

* Add a long-format option test to test/modern

* Improve coments only

Co-authored-by: Leonardo Uieda <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
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.

2 participants