File tree Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Original file line number Diff line number Diff line change 22
33import seedcase_sprout .core as sp
44
5+ default_properties = sp .PackageProperties .default ().compact_dict
6+
57properties = sp .PackageProperties (
8+ ** default_properties ,
69 name = "dung-beetle-activity" ,
710 title = (
811 "Dung beetle activity affects rainforest seed bank dynamics "
6164
6265# Create the path to the package
6366package_path = Path (__file__ ).resolve ().parent .parent
64- package_path = sp .create_package_properties (properties = properties , path = package_path )
67+
68+ sp .write_package_properties (
69+ properties = properties , path = sp .PackagePath (package_path ).properties ()
70+ )
Original file line number Diff line number Diff line change 22
33import seedcase_sprout .core as sp
44
5- properties = sp .PackageProperties (
5+ package_path = Path (__file__ ).resolve ().parent .parent
6+
7+ current_properties = sp .read_properties (
8+ path = sp .PackagePath (package_path ).properties (),
9+ )
10+
11+ updated_properties = sp .PackageProperties (
612 description = (
713 "Dung beetles relocate vertebrate feces under the soil surface, "
814 "and this behavior has many ecological consequences. In tropical forests, "
1117 ),
1218)
1319
14- package_path = Path (__file__ ).resolve ().parent .parent / "datapackage.json"
15-
16- updated_package_properties = sp .edit_package_properties (
17- path = package_path ,
18- properties = properties ,
20+ updated_package_properties = sp .update_package_properties (
21+ current_properties = current_properties ,
22+ update_properties = updated_properties ,
1923)
2024
21- package_path = sp .write_package_properties (
22- properties = updated_package_properties , path = package_path
25+ sp .write_package_properties (
26+ properties = updated_package_properties ,
27+ path = sp .PackagePath (package_path ).properties (),
2328)
You can’t perform that action at this time.
0 commit comments