-
Notifications
You must be signed in to change notification settings - Fork 107
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
consistent use of term id
across layout_properties(), ph_location_type(), plot_layout_properties() (#606)
#608
Merged
davidgohel
merged 26 commits into
davidgohel:master
from
markheckmann:issue_606_consistent_id_term
Sep 17, 2024
Merged
consistent use of term id
across layout_properties(), ph_location_type(), plot_layout_properties() (#606)
#608
davidgohel
merged 26 commits into
davidgohel:master
from
markheckmann:issue_606_consistent_id_term
Sep 17, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- plots layout name, ph id, ph type + index by default now (davidgohel#606). - also rammar correction in docs: 'functions for reading presentation information' => remove s
…n/officer into issue_606_consistent_id_term
- xfrmize(): add `type_idx` column. Index is ordered by ph position top->bottom, left->right - layout_properties(): add `type_idx` column, improve docs - plot_layout_properties(): use new `type_idx` column for type index plotting. Changed index order.
- plots layout name, ph id, ph type + index by default now (davidgohel#606). - also rammar correction in docs: 'functions for reading presentation information' => remove s
- xfrmize(): add `type_idx` column. Index is ordered by ph position top->bottom, left->right - layout_properties(): add `type_idx` column, improve docs - plot_layout_properties(): use new `type_idx` column for type index plotting. Changed index order.
The indexing logic for 'type_idx' is different than for 'id'. To avoid a breaking change, both args and indexing logics can be used. type_idx: index along ph position (top->bottom,left->right => intuitive) id: index along id column. Order of phs id is often arbitrary.
…n/officer into issue_606_consistent_id_term
thank you again @markheckmann |
This was referenced Sep 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR closes the suggestions 1- 3 at the bottom of #606.
Suggestion 4 will be part of another PR.
Summary from
NEWS.md
:layout_properties()
gains atype_idx
column to index phs of the same type on a layout. Indexing is performed based on ph position, following a top-to-bottom, left-to-right order.plot_layout_properties()
plots more information by default now: layout name, ph label, ph id, ph type + index by default.ph_location_type()
: newtype_idx
arg replaces the deprecatedid
arg.1.
layout_properties()
gains a newtype_idx
column.It is an index for placeholders of the same type on a layout. The index is sorted by ph position (top -> bottom, left -> right), for a user-friendly ordering logic (sorted by
offy
, thenoffx
). (See change 2 below for a visual impression).2.
plot_layout_properties()
: with more ph info by defaultThe function now prints the ph label, type, type index, and layout name by default. The new args
type = T/F
andid = T/F
allow to show or hide them. The type index also has an intuitive order (top->bottom, left->right). Previously, the indexing was done along the ph ids, which may result in an arbitrary index order.ph_label
fromlayout_properties()
))type
andtype_index
fromlayout_properties()
)id
fromlayout_properties()
).3.
ph_location_type()
gains newtype_idx
argument.type_idx
will replace theid
arg.id
is preserved for now to avoid a breaking change, but throws a deprecation warning. The arg name is changed to avoid confusion with theid
column fromlayout_properties()
which has another meaning.In the example below, both args (
type_idx
andid
) are used. Note that onlytype_idx
uses the new indexing order. The index order ofid
is unchanged (using the old indexing logic along the ph id) to avoid a breaking change.