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

First pass as expand operation #100

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

First pass as expand operation #100

wants to merge 3 commits into from

Conversation

beckyjackson
Copy link
Collaborator

@beckyjackson beckyjackson commented Nov 26, 2021

Resolves #98

expand

The expand module takes an import table and creates an explicit import table that contains all terms that will be in the extracted module and the reason that they are included. The reason will be one of: ancestor, child, descendant, or parent of an included term.

python3 -m gizmos.expand -d [path-to-database] -i [import-table] > [output-tsv]

The default output format is TSV, but if you want to write a CSV, you can include -f csv/--format csv.

By default for each reason, up to three terms are included (e.g. if a term is a descendant of included terms X, Y, Z). When the term is related to more than three terms, the reason will be shown as "descendant of N terms", where N is the number of terms. You can change this limit with -l/--limit. The limit must be a whole integer.

expand also includes the -I/--intermediates option, like extract. You should include this option if you plan to include it when you create your extracted module. For more details on this option, see extract.

@beckyjackson beckyjackson marked this pull request as ready for review November 26, 2021 20:49
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.

Prototype import "expansion" operation
1 participant