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

Parsing of +n<length>[<unit>] should not override the default unit for data input #178

Merged
merged 2 commits into from
Nov 12, 2018

Conversation

PaulWessel
Copy link
Member

The bug was that +n1c would change the default dimension to cm for data input even though --PROJ_LENGTH_UNIT=inch was given. Now, the length is parsed and converted to inches but no unit is recorded. Furthermore, arrowline.sh had some bugs (used - instead of -- to set a default value) and vectors.sh were affected by the +n bug so I just changed its unit so the PS is the same. The arrowline.ps file needed to be updated as well.

…t for data input

The bug was that +n1c would change the deafult dimension to cm for data input even though --PROJ_LENGTH_UNIT=inch was given.  Now, the length is parsed and converted to inchs but no unit is recorded.  Furthermore, arrowline.sh had some bugs (used - instead of -- to set a default value) and vectors.sh were affected by the +n bug so I just changed its unit so the PS is the same.  The arrowline.ps file needed to be updated as well.
@PaulWessel PaulWessel requested a review from a team November 11, 2018 20:41
Missed a word and repeted -E twice.
Copy link
Member

@joa-quim joa-quim left a comment

Choose a reason for hiding this comment

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

OK, but a part of this goes against what I defend. All our scripts should use SI, not inches. It would also help to uncover issues with units conversions.

@PaulWessel PaulWessel merged commit 807f4b8 into master Nov 12, 2018
@PaulWessel PaulWessel deleted the fixshrinklength branch November 12, 2018 02:44
obaney pushed a commit to obaney/gmt that referenced this pull request Aug 18, 2021
The shared library was being loaded in `__init__`, which is not a good
design pattern. Instead, now it's loaded the first time it gets used by
the new method `get_libgmt_func` that gets the ctypes function and sets
the return and argument types. This removes some redundancy from the
other methods (setting ctypes type conversions) and also removes the
usage of a private variable `_libgmt` from other methods. Now, only
methods that set a private variable need to know of it's existence.
The same applies to `_session_id` which is entirely encapsulated by
`current_session`.
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.

None yet

2 participants