adopt()
Make an existing folder a Framework project, in place.
The folder's subfolders are scanned (names only, at most three levels) and
each gets a proposed role: a Framework directory key such as
inputs_raw, a folder of its own (extra_directories), or none.
You review the proposal, then settings.yml and .framework/spec.json
are written for the folders that are there. Nothing is moved, and nothing
else is created.
A folder path that contains "private" gets a warning that suggests the Privacy Sensitive layout. The sensitive setting is turned on only when you say yes in the review.
Usage
adopt(path: str | Path = '.', yes: bool = False) -> Path
Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| path | str | Path | '.' |
The project folder. |
| yes | bool | False |
Accept the proposal without asking, as a script must. The sensitive setting stays off. |
Value
The project folder.
Raises
FrameworkError: When the folder doesn't exist or is already a Framework project, or when the review needs a terminal andyesis False.