You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update projects docs with DataFrame API and data source details
- Update examples to show DataFrame default output
- Add "How it works" section explaining the portal API and PRJ resolution
- Fix pi field description (now a display name string, not dict)
Copy file name to clipboardExpand all lines: docs/projects.md
+43-23Lines changed: 43 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,49 +1,58 @@
1
1
# Projects
2
2
3
+
DesignSafe projects (MyProjects) are collaborative workspaces where team members share files, curate datasets, and publish research. Each project has a PRJ number (e.g., PRJ-6270), a UUID, and a corresponding Tapis storage system.
4
+
5
+
Project metadata is fetched from the [DesignSafe portal API](https://designsafe-ci.org) (`/api/projects/v2/`), which provides project details, team information, and DOIs. File listings use the Tapis Files API against the project's storage system (`project-<uuid>`).
6
+
3
7
## List your projects
4
8
9
+
Returns a DataFrame by default. Use `output="list"` for a list of dicts.
10
+
5
11
```python
6
12
from dapi import DSClient
7
13
ds = DSClient()
8
14
9
-
projects = ds.projects.list()
10
-
for p inprojects[:5]:
11
-
pi = p['pi']
12
-
pi_name =f"{pi['fname']}{pi['lname']}"if pi else"N/A"
`ds.files.to_uri()` also accepts project paths. dapi resolves the PRJ number to the Tapis system UUID automatically:
@@ -81,6 +93,14 @@ files = ds.files.list(uri)
81
93
82
94
Both `/MyProjects/PRJ-XXXX/` and `/projects/PRJ-XXXX/` are accepted.
83
95
96
+
## How it works
97
+
98
+
1.**Project listing and metadata** — dapi queries the DesignSafe portal API (`https://designsafe-ci.org/api/projects/v2/`) using your Tapis authentication token. This API returns project metadata including the project UUID.
99
+
100
+
2.**PRJ-to-UUID resolution** — Each project's Tapis storage system ID is `project-<uuid>`. When you use a PRJ number (e.g., `PRJ-6270`), dapi looks up the UUID via the portal API.
101
+
102
+
3.**File operations** — File listings use the standard Tapis Files API (`t.files.listFiles`) against the resolved `project-<uuid>` system.
103
+
84
104
## Error handling
85
105
86
106
-**Project not found**: raised if the PRJ number doesn't match any project you have access to.
0 commit comments