Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #8260 (closed)

Opened 12 years ago

Closed 8 years ago

RFE: Refactor command line tools

Reported by: mlinkert Owned by: sbesson
Priority: minor Milestone: Unscheduled
Component: Bio-Formats Version: 4.4.8
Keywords: tools Cc: jamoore, cxallan, jballanco-x, mtbcarroll
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

Right now there is a lot of duplicated code in the command line tools (argument parsing, reader setup, logging, etc.). It would be nice to come up with a place to put common code for the tools, and then refactor all of the duplicated stuff there.

See https://github.com/melissalinkert/bioformats/commit/37deaa080c52046f65148807ca98202af88b5ede#commitcomment-1072430

Change History (12)

comment:1 Changed 11 years ago by mlinkert

  • Milestone changed from Unscheduled to Testing
  • Sprint set to Testing and Docs (1)
  • Version set to 4.4.8

comment:2 Changed 11 years ago by jamoore

  • Milestone changed from Testing and Docs to Testing2
  • Sprint Testing and Docs (1) deleted

comment:3 Changed 10 years ago by mlinkert

  • Milestone changed from Testing2 to 5.0.3

comment:4 Changed 10 years ago by mlinkert

  • Milestone changed from 5.0.3 to 5.1.0

comment:5 Changed 10 years ago by mlinkert

  • Milestone changed from 5.1.0 to 5.x

comment:6 Changed 8 years ago by jamoore

  • Milestone changed from 5.x to Unscheduled

comment:7 Changed 8 years ago by mlinkert

  • Cc cxallan jballanco-x added
  • Keywords tools added
  • Owner mlinkert deleted

Expanding CC as this has been mentioned on various calls.

comment:8 Changed 8 years ago by jballanco-x

Currently experimenting with argparse4j (https://argparse4j.github.io) for simplifying management of command-line options. It is a near-direct port of Python's argparse library to Java, including the capability of nesting sub-parsers, which would open the possibility to write ./bin/omero style sub-commands (should we want to).

comment:9 Changed 8 years ago by sbesson

  • Cc mtbcarroll added
  • Owner set to sbesson

Assuming no-one has made significant progress on this ticket on a private branch, I might try to define a common location for command-line utility methods while trying to tackle #13226

comment:10 Changed 8 years ago by jballanco-x

On the Glencoe side, we've had good success using argparse4j to handle command-line arguments. As an added benefit, just like its Python namesake, it's possible to create nested parsers (similar to how the current omero CLI is designed), though this is not a feature that we made use of. We also haven't done any sort of refactoring of the CLI interface. However, I'd be happy to share what we've learned about the library so far if we decide to go down that path.

comment:11 Changed 8 years ago by sbesson

See https://github.com/openmicroscopy/bioformats/pull/2451 which defines a central place for this refactoring. Once reviewed and accepted, I would be inclined to close this ticket and decompose the various proposals into individual tickets/cards.

comment:12 Changed 8 years ago by sbesson

  • Resolution set to fixed
  • Status changed from new to closed

Closing this ticket as per the PR above. Individual refactoring can happen in following efforts.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.67494 sec.)

We're Hiring!