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

Commit

Permalink
Add associated_file_extensions to FileType schema (#48)
Browse files Browse the repository at this point in the history
* Add `associated_file_extensions` to `FileType` schema

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

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

* Tweak wording from review

Co-authored-by: Peter Kraus <peter.kraus@tu-berlin.de>

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

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

* Add regexp for file extensions field

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Peter Kraus <peter.kraus@tu-berlin.de>
  • Loading branch information
3 people authored Jan 23, 2024
1 parent 58fd978 commit aae2f7e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions examples/FileType-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ subject:
associated_instruments:
- Example Machine
- Bunch of Junk
associated_file_extensions:
- dat
- txt
associated_software:
- Example Software
- Bitrot Software
5 changes: 3 additions & 2 deletions examples/FileType-netcdf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ associated_vendors:
- UCAR
subject:
- climatology
- meteorology
- oceanography
- meteorology - oceanography
associated_file_extensions:
- nc
associated_software:
- ArcGIS
- OriginPro
7 changes: 7 additions & 0 deletions schemas/filetype.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ classes:
description: >-
A list of any known software (proprietary or otherwise) that produces
such `FileType`.
associated_file_extensions:
multivalued: true
description: >-
A list of any known file extensions that files of this `FileType`
are found with. These may be used as a hint for `FileType` detection.
Should omit the leading `'.'`, e.g. 'json' or 'txt'.
pattern: ^[A-z,0-9]*[A-z,0-9]+$
base_formats:
multivalued: true
range: FileType
Expand Down

0 comments on commit aae2f7e

Please sign in to comment.