Biotope Add
Draft stage
Biotope is in draft stage. Functionality may be missing or incomplete.
The API is subject to change.
biotope add is the structural entrypoint for tracking data in a biotope
project.
biotope add <file>creates one JSON-LD for that file.biotope add <dir>recurses by default and creates one JSON-LD for the rooted tree.- Parseable files get croissant-baker structure.
- Unhandled files are still tracked as
cr:FileObjectpointers.
Command Signature
Options
--force, -f: force add even if a file is already tracked--name: dataset name override--description: dataset description override--license: dataset license--creator: dataset creator name--creator-email: dataset creator email--url: dataset URL--citation: dataset citation text--version: dataset version--keyword: dataset keyword, repeatable--access-restrictions: dataset access restrictions--legal-obligations: dataset legal obligations--collaboration-partner: dataset collaboration partner--rai KEY=VALUE: Croissant RAI field, repeatable
Examples
Add a single file
Add a directory
biotope add data/opentargets \
--license CC-BY-4.0 \
--creator "Open Targets" \
--description "Open Targets release"
Force re-add a tracked file
What It Does
- Validates that you are inside a biotope project and Git repository.
- Creates or refreshes metadata in
.biotope/datasets/. - Uses croissant-baker for parseable files.
- Appends
cr:FileObjectpointers for unparseable files in directory adds. - Stages
.biotope/changes in Git.
When you add a directory, biotope also writes <dir>/.biotope.yaml so the
dataset can be refined collaboratively with biotope annotate apply.
Follow-on workflow
biotope add data/opentargets --license CC-BY-4.0 --creator "Open Targets"
biotope annotate apply data/opentargets
biotope status
biotope commit -m "Track Open Targets dataset"
Output shape
Single-file adds always emit a cr:FileObject. When baker can infer structure,
the same JSON-LD may also contain recordSet entries.
Directory adds emit one aggregate JSON-LD:
cr:FileSetandrecordSetentries for handled formatscr:FileObjectentries for uncovered files
Add command implementation for tracking data files and metadata.
add(paths, force, name, description, license_value, creator, creator_email, url, citation, version, keywords, access_restrictions, legal_obligations, collaboration_partner, rai_pairs, status_override, derived_from)
Add data files or rooted directories to a biotope project.
Source code in biotope/biotope/commands/add.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | |