Skip to content

Commit 0f242b2

Browse files
committed
more points in specification doc
1 parent 1d9fb69 commit 0f242b2

1 file changed

Lines changed: 35 additions & 3 deletions

File tree

planning/initial_specs.md

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ Plans to replace the old [OmniPath Python client](https://github.com/saezlab/omn
44

55
## Specification
66
* New Python package for accessing data from the new OmniPath web API: https://dev.omnipathdb.org/
7-
* It is a FastAPI web service implemented in https://github.com/saezlab/omnipath-build
7+
* It is a FastAPI web service implemented in https://github.com/saezlab/omnipath-present
88
* The data comes as Parquet files by default
9-
* These can be delivered to pandas, polars or pyarrow data frames
9+
* These can be delivered to pandas, polars or pyarrow data frames and DuckDB
1010
* Network (graph) like data should be delivered as [Annnet objects](https://github.com/saezlab/annnet)
1111
* Validation for query parameters and values
1212
* Access to possible endpoints, parameters and values
@@ -23,4 +23,36 @@ Plans to replace the old [OmniPath Python client](https://github.com/saezlab/omn
2323
## Further Plans
2424
* Evaluate options for async downloads (cache and download manager should be updatednload)
2525

26-
## Structure
26+
## API docs
27+
28+
The web API is documented in https://dev.omnipathdb.org/api-docs (also
29+
available here: https://github.com/saezlab/omnipath-present/blob/main/next-omnipath/src/app/api-docs/page.tsx). The client should populate its inventory of endpoints, arguments and allowed values based on the API docs. This ensures rapid development and updates of the API.
30+
31+
## First plan updates
32+
33+
- Config should be based on generic config solution in pkg_infra, which most
34+
likely doesn't exist, in this case we should create it
35+
- Also for logging we should use the solution in `pkg_infra`, and update it as
36+
required.
37+
- This client package in the future should be able accommodate different
38+
formats and API endpoints than Parquet files, the Parquet route is our
39+
first default solution
40+
- Using `download-manager`, we should still aim for an async operation, and
41+
update the `download-manager` and `cache-manager` accordingly
42+
- Very soon a standard FastAPI/swagger openapi.json will be available, until
43+
now we can rely on a parsing of the HTML API docs; this should be done on
44+
import to populate the Python API here, but download failure should not
45+
blokc import
46+
47+
## Run web service locally
48+
49+
```
50+
git clone git@github.com:saezlab/omnipath-present.git
51+
cd omnipath-present/api-service
52+
uv sync
53+
uv run uvicorn api_service.main:app --reload --port 8081
54+
```
55+
56+
```
57+
curl http://localhost:8081/openapi.json -o openapi.json
58+
```

0 commit comments

Comments
 (0)