@@ -23,33 +23,35 @@ def create_resource_structure(path: Path) -> list[Path]:
23
23
24
24
Returns:
25
25
A list of the two created directories:
26
+
26
27
- A path to the resource directory and
27
28
- A path to the raw data directory.
28
29
29
30
Raises:
30
31
NotADirectoryError: If path is not an existing directory.
31
32
32
33
Examples:
33
- ```{python}
34
- import tempfile
35
- from pathlib import Path
36
-
37
- import seedcase_sprout.core as sp
38
-
39
- # Create a temporary directory for the example
40
- with tempfile.TemporaryDirectory() as temp_dir:
41
- temp_path = Path(temp_dir)
42
-
43
- # Create a package structure first
44
- sp.create_package_properties(
45
- properties=sp.example_package_properties(),
46
- path=temp_path
47
- )
48
-
49
- # TODO: Update after converting to "local-first"
50
- # Create a resource structure
51
- # sp.create_resource_structure(path=temp_path / "1" / "resources")
52
- ```
34
+ ```{python}
35
+ import tempfile
36
+ from pathlib import Path
37
+
38
+ import seedcase_sprout.core as sp
39
+
40
+ # Create a temporary directory for the example
41
+ with tempfile.TemporaryDirectory() as temp_dir:
42
+ temp_path = Path(temp_dir)
43
+
44
+ # Create a package structure first
45
+ sp.create_package_properties(
46
+ properties=sp.example_package_properties(),
47
+ path=temp_path
48
+ )
49
+
50
+ resource_path = Path(temp_path / "resources")
51
+ resource_path.mkdir()
52
+ # Create a resource structure
53
+ sp.create_resource_structure(path=resource_path)
54
+ ```
53
55
"""
54
56
check_is_dir (path )
55
57
0 commit comments