-
-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Milestone
Description
Purpose
Make the future deep rearrangement of the code safe and easy.
Context
The increasingly common typing hints (#107) are changing the scope of Argh and making many things easier. Now it makes sense to rely on type hints and make type guessing (from defaults, choices, etc.) secondary or even optional/deprecated. This calls for a serious restructuring of the code. We'll want to test the following transformations separately:
- building arg definitions from function signature (including type hints);
- augmenting signature-derived argh definitions from the
@argdecorator; - augmenting these further by guessing types from defaults/options when hints or explicit
typearen't present; - processing return value, potentially according to typing hints (probably going through a deprecation cycle with the current solution + adding some hooks for custom handlers);
- assembling multiple commands into parser(s).
Acceptance criteria
- only public methods are tested; tests for private methods, if still relevant, are moved to public ones.
- add more coverage on higher level, with actual use cases
Scope
In scope:
- rearranging existing unit tests;
- possibly increasing top-level coverage of currently supported cases.
Out of scope:
- rearranging the code itself;
- writing unit tests for future layers/components.
Reactions are currently unavailable