Skip to content

Keep single --matched and --unmatched CLI flags #59

@fjuniorr

Description

@fjuniorr

The current CLI flags are:

Usage: flowmapper map [OPTIONS] SOURCE TARGET

  Generate mappings between elementary flows lists

Arguments:
  SOURCE  Path to source flowlist  [required]
  TARGET  Path to target flowlist  [required]

Options:
  --fields PATH                   Relationship between fields in source and
                                  target flowlists  [required]
  --output-dir PATH               Directory to save mapping and diagnostics
                                  files  [default: .]
  --format [all|glad|randonneur]  Mapping file output format  [default: all]
  --unmatched-source / --no-unmatched-source
                                  Write original source unmatched flows into
                                  separate file?  [default: unmatched-source]
  --unmatched-target / --no-unmatched-target
                                  Write original target unmatched flows into
                                  separate file?  [default: unmatched-target]
  --matched-source / --no-matched-source
                                  Write original source matched flows into
                                  separate file?  [default: no-matched-source]
  --matched-target / --no-matched-target
                                  Write original target matched flows into
                                  separate file?  [default: no-matched-target]

To simplify the options we can merge --matched and --unmatched and export both source and target flows to the same json file. The CLI would be:

Usage: flowmapper map [OPTIONS] SOURCE TARGET

  Generate mappings between elementary flows lists

Arguments:
  SOURCE  Path to source flowlist  [required]
  TARGET  Path to target flowlist  [required]

Options:
  --fields PATH                   Relationship between fields in source and
                                  target flowlists  [required]
  --output-dir PATH               Directory to save mapping and diagnostics
                                  files  [default: .]
  --format [all|glad|randonneur]  Mapping file output format  [default: all]
  --unmatched / --no-unmatched
                                  Write original unmatched flows into
                                  separate file?  [default: unmatched]
  --matched / --no-matched
                                  Write original matched flows into
                                  separate file?  [default: no-matched]

And the json files (one for unmatched and one for matched)

{
    "source": [
        {},
    ],
    "target": [
        {},
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions