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

TODOs #1

Open
14 of 15 tasks
ruestefa opened this issue Jan 6, 2021 · 2 comments
Open
14 of 15 tasks

TODOs #1

ruestefa opened this issue Jan 6, 2021 · 2 comments
Assignees

Comments

@ruestefa
Copy link
Contributor

ruestefa commented Jan 6, 2021

  • Don't check for data directory if an infile is provided
    • Current workaround: Create empty "./data" directory
  • Implement reuse of installations and plots
    • Plots: Determine expected plots with dry run and reuse only if files match (by name)
    • Implement selective reuse to, e.g., reuse old installation/plots or only the installation etc.
  • Add option to pass a case name used as a subdirectory in the work directory
    • Prevents plots from being overwritten if, e.g., the same preset is run for two different input files
    • Edit: Already possible with --work (formerly --work-dir)
  • Make diff creation more rubust
    • Don't abort execution if creation of a diff fails, but instead issue an error and carry on
    • Deal with diffs of plots of different size, e.g., by passing the smaller plot (maybe compare can has an option)
  • Improve diff creation output
    • Show the total number of plots and the percentage of plots that differ
    • Show the full (relative) paths to the diff plots, not just their names (so they can easily be copied)
  • Summarize the diff for a whole directory
    • Create animated diff of all diff files
    • Create a composite diff over all diff files
  • Write/adapt HISTORY.md/README.md
@ruestefa ruestefa self-assigned this Jan 6, 2021
@ruestefa
Copy link
Contributor Author

Before

$ pyflexplot-test -V
0.2.1
$ pyflexplot-test -h
Usage: pyflexplot-test [OPTIONS]

Options:
  --data-path PATHLIB.PATH  path to data directory
  -f, --force               overwrite existing repos etc.
  --infile TEXT             input file (netcdf) overriding that specified in
                            the preset; --infile must not be passed more often
                            than --preset; if both --preset and --infile are
                            passed more than once, their numbers must match

  --only INTEGER            restrict the number of plots per preset
  --preset TEXT             preset used to create plots; may be repeated
  --num-procs INTEGER       number of parallel processes during plotting
  --old-rev TEXT            old revision of pyflexplot; defaults to lanew tag;
                            may be anything that git can check out (tag name,
                            branch name, commit hash)

  --repo TEXT               pyflexplot repository path
  --new-rev TEXT            new revision of pyflexplot; defaults to 'dev'
                            (head of development branch); may be anything that
                            git can check out (tag name, branch name, commit
                            hash

  --work-dir PATHLIB.PATH   working directory
  -v                        increase verbosity
  -V, --version             Show the version and exit.
  -h, --help                Show this message and exit.

@ruestefa
Copy link
Contributor Author

ruestefa commented Apr 21, 2021

After

$ pyflexplot-test -V
0.4.5
$ pyflexplot-test -h                                                                                                       
Usage: pyflexplot-test [OPTIONS]

Options:
  --data PATH                     path to data directory; defaults to data;
                                  overridden by --old-data and --new-data;
                                  ignored if --infile and/or --infiles-old-new
                                  are passed
                                                             
  --infile PATH                   input file path overriding the input file
                                  specified in the preset; incompatible with
                                  --infiles-old-new; may be omitted, passed
                                  once (in which case the same infile is used
                                  for all presets), passed the same number of
                                  times as --preset/--presets-old-new (in
                                  which case the infiles and presets are
                                  paired in order) or passed an arbitrary
                                  number of times if --preset/--presets-old-
                                  new is not passed more than once (in which
                                  case the same preset is used for all
                                  infiles)                                                                                
                                                                                                                          
  --infiles-old-new PATH...       pair of input file paths overriding the
                                  input file specified in the old and new     
                                  preset, respectively; may be repeated (see
                                  --infile for details); equivalent to but  
                                  incompatible with --infile
                                                             
  --install-dir PATH              install directory in which git clones and
                                  their venvs are saved                                                                   
                                                                                                                          
  --new-data PATH                 path to data directory for --old-rev;  
                                  overrides or defaults to --data; ignored if
                                  --infile and/or --infiles-old-new are passed
                                                                                                                          
  --new-rev TEXT                  new revision of pyflexplot; defaults to
                                  'dev' (head of development branch); may be
                                  anything that git can check out (tag name,
                                  branch name, commit hash

  --num-procs INTEGER             number of parallel processes during plotting
  --old-data PATH                 path to data directory for --new-rev;
                                  overrides or defaults to --data; ignored if
                                  --infile and/or --infiles-old-new are passed

  --presets-old-new TEXT...       pair of presets used to create old and new
                                  plots, respectively; may be repeated (see
                                  --preset for details); equivalent to but
                                  incompatible with --preset

  --old-rev TEXT                  old revision of pyflexplot; defaults to
                                  lanew tag; may be anything that git can
                                  check out (tag name, branch name, commit
                                  hash)

  --only INTEGER                  restrict the number of plots per preset
  --preset TEXT                   preset used to create plots; may be
                                  repeated; equivalent to but incompatible
                                  with --presets-old-new; may be omitted,
                                  passed once (in which case the same preset
                                  is used for all infiles), passed the same
                                  number of times as --infile/--infiles-old-
                                  new (in which case the presets and infiles
                                  are paired in order) or passed an arbitrary
                                  number of times if --infile/--infiles-old-
                                  new is not passed more than once (in which
                                  case the same infile is used for all
                                  presets)

  --repo TEXT                     pyflexplot repository URL
  --reuse-installs / --reinstall  reuse venvs of existing repo clones instead
                                  of reinstalling them; overriddenby --reuse-(
                                  old|new)-install/--reinstall-(old|new)

  --reuse-new-install / --reinstall-new
                                  reuse venv of existing clones of new repo
                                  instead of reinstalling it; overrides
                                  --reuse-installs/--reinstall for new repo

  --reuse-old-install / --reinstall-old
                                  reuse venv of existing clones of old repo
                                  instead of reinstalling it; overrides
                                  --reuse-installs/--reinstall for old repo

  --reuse-new-plots / --replot-new
                                  reuse existing new plots rather than
                                  recomputing them; overrides --reuse-
                                  plots/--replot for new plots

  --reuse-old-plots / --replot-old
                                  reuse existing old plots rather than
                                  recomputing them; overrides --reuse-
                                  plots/--replot for old plots

  --reuse-plots / --replot        reuse existing plots rather than recomputing
                                  them; overridden by
                                  --reuse-(old|new)-plots/--replot-(old|new)

  -v                              increase verbosity
  -V, --version                   Show the version and exit.
  --work-dir PATH                 working directory in which plots and diffs
                                  are saved in subdirectories; may be passed
                                  repeatedly, specifically once for every
                                  --preset/--presets-old-new in order to
                                  prevent plots based on the same prefix but
                                  different input files from overwriting each
                                  other

  -h, --help                      Show this message and exit.

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

No branches or pull requests

1 participant