Skip to content

Re-work how the user-specified filename and output grouping templates are constructed in clipper.py #9

@emprzy

Description

@emprzy

In clipper::group_and_clip(), I reconstruct the user-input template from this list of columns previously extracted from the user-input template. This is possibly bad for a few reasons:

  • It's redundant, because the user already created this template themselves
  • It nullifies the two template validation checks run in main.py
  • If the user writes: "{col1}-{col2}", this will fail early in main::main(), but it actually would work with this manual reconstruction of the template, which would write it from ["col1", "col2"] to {col1}_{col2}, e.g. This is good for overall flexibility I guess but, again, is unreachable if the user inputs a bad template.
  • It may not even be functioning correctly, I haven't tested it yet

My current opinion is that if there is an easy, more Pythonic way to create these templates for use in clipper.py, then I should implement that. Otherwise, if this works it works, and redundancy is okay for now (product doesn't have to be polished yet).

Metadata

Metadata

Assignees

Labels

code enhancementEnhance or polish a pre-existing code featureinvestigativeInvestigate a possibility; potentially no action required

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions