Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
Usage: implement supported_filetypes (#53)
Browse files Browse the repository at this point in the history
* Add supported_filetypes to Usage class.

* Usage example of supported_filetypes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
PeterKraus and pre-commit-ci[bot] authored Mar 19, 2024
1 parent 9245994 commit 4ec5c3a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
6 changes: 6 additions & 0 deletions examples/Usage-cli_filetypes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
method: cli
scope: meta-only
command: parse --type=example --summary {{ file_path }}
supported_filetypes:
- example
12 changes: 10 additions & 2 deletions schemas/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,22 @@ classes:
- >-
For `method: python`, a parametrized function invocation which
should be available after installing and setting up the `Extractor`.
- The templated parameters which can be requested from the user
- >-
The templated parameters which can be requested from the user
are [described by the `UsageTemplate` class](UsageTemplate.md).
scope:
required: false
range: UsageScope
description: >-
Specification of extraction scope.
supported_filetypes:
required: false
multivalued: true
description: >-
An enumeration of the `FileType` that this `Usage` of an `Extractor`
supports, matching one or more of the `FileTypes` present in the
`supported_filetypes` slot of the `Extractor`. Defaults to all
`supported_filetypes` specified in the `Extractor` definition.
Installation:
description: >-
Expand Down

0 comments on commit 4ec5c3a

Please sign in to comment.