Skip to content

Commit e250f56

Browse files
committed
Merge branch 'dev'
2 parents 9d2ddb8 + 4170759 commit e250f56

File tree

12 files changed

+1182
-880
lines changed

12 files changed

+1182
-880
lines changed

docs/api/apps.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Apps
2+
3+
Application discovery and management for DesignSafe computational applications.
4+
5+
## Application Discovery
6+
7+
::: dapi.apps.find_apps
8+
9+
## Application Details
10+
11+
::: dapi.apps.get_app_details

docs/api/auth.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Auth
2+
3+
Authentication and credential management for DesignSafe access.
4+
5+
## Authentication
6+
7+
::: dapi.auth.init

docs/api/client.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# DSClient
2+
3+
The main client interface for all DAPI functionality. DSClient provides organized access to DesignSafe resources through the Tapis V3 API.
4+
5+
::: dapi.client.DSClient
6+
7+
## Service Interfaces
8+
9+
The DSClient provides access to different DesignSafe services through specialized interface classes:
10+
11+
### AppMethods
12+
13+
::: dapi.client.AppMethods
14+
15+
### FileMethods
16+
17+
::: dapi.client.FileMethods
18+
19+
### JobMethods
20+
21+
::: dapi.client.JobMethods
22+
23+
### SystemMethods
24+
25+
::: dapi.client.SystemMethods

docs/api/database.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Database
2+
3+
Database connections and query execution for DesignSafe research databases.
4+
5+
## Database Accessor
6+
7+
::: dapi.db.accessor.DatabaseAccessor
8+
9+
## Database Engine
10+
11+
::: dapi.db.db.DSDatabase
12+
13+
## Database Configuration
14+
15+
::: dapi.db.config.db_config

docs/api/exceptions.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Exceptions
2+
3+
Custom exception classes for DAPI error handling and debugging.
4+
5+
## Base Exception
6+
7+
::: dapi.exceptions.DapiException
8+
9+
## Authentication Exceptions
10+
11+
::: dapi.exceptions.AuthenticationError
12+
13+
## File Operation Exceptions
14+
15+
::: dapi.exceptions.FileOperationError
16+
17+
## Application Discovery Exceptions
18+
19+
::: dapi.exceptions.AppDiscoveryError
20+
21+
## System Information Exceptions
22+
23+
::: dapi.exceptions.SystemInfoError
24+
25+
## Job Management Exceptions
26+
27+
::: dapi.exceptions.JobSubmissionError
28+
29+
::: dapi.exceptions.JobMonitorError

docs/api/files.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Files
2+
3+
File operations and path translation utilities for DesignSafe storage systems.
4+
5+
## Path Translation
6+
7+
::: dapi.files.get_ds_path_uri
8+
9+
::: dapi.files.tapis_uri_to_local_path
10+
11+
## File Operations
12+
13+
::: dapi.files.upload_file
14+
15+
::: dapi.files.download_file
16+
17+
::: dapi.files.list_files
18+
19+
## Utility Functions
20+
21+
::: dapi.files._parse_tapis_uri

docs/api/index.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# API Reference
2+
3+
This section provides comprehensive API documentation for all DAPI modules and classes, automatically generated from docstrings.
4+
5+
## 📋 Overview
6+
7+
The DAPI package is organized into several core modules:
8+
9+
### **Core Client**
10+
- **[DSClient](client.md)** - Main client interface for all DAPI functionality
11+
12+
### **Service Modules**
13+
- **[Jobs](jobs.md)** - Job submission, monitoring, and management
14+
- **[Files](files.md)** - File operations and path translation
15+
- **[Apps](apps.md)** - Application discovery and details
16+
- **[Systems](systems.md)** - System information and queue management
17+
- **[Auth](auth.md)** - Authentication and credential management
18+
19+
### **Database Access**
20+
- **[Database](database.md)** - Database connections and query execution
21+
22+
### **Utilities**
23+
- **[Exceptions](exceptions.md)** - Custom exception classes
24+
25+
## 🚀 Quick Navigation
26+
27+
### **Getting Started**
28+
```python
29+
from dapi import DSClient
30+
31+
# Initialize client
32+
client = DSClient()
33+
34+
# Access different services
35+
client.jobs.generate_request(...)
36+
client.files.upload(...)
37+
client.db.ngl.read_sql(...)
38+
```
39+
40+
### **Common Operations**
41+
- **Submit Jobs**: `client.jobs.submit_request(job_dict)`
42+
- **Monitor Jobs**: `submitted_job.monitor()`
43+
- **File Upload**: `client.files.upload(local_path, remote_uri)`
44+
- **File Download**: `client.files.download(remote_uri, local_path)`
45+
- **Database Query**: `client.db.ngl.read_sql("SELECT * FROM table")`
46+
47+
### **Advanced Features**
48+
- **Archive Management**: Custom job result organization
49+
- **Path Translation**: Seamless local/cloud path conversion
50+
- **Parametric Studies**: Batch job submission and monitoring
51+
- **Error Handling**: Comprehensive exception hierarchy
52+
53+
## 📖 Documentation Conventions
54+
55+
### **Parameter Types**
56+
- `Optional[Type]` - Parameter can be `None`
57+
- `Union[Type1, Type2]` - Parameter accepts multiple types
58+
- `List[Type]` - List containing elements of specified type
59+
- `Dict[str, Any]` - Dictionary with string keys and any values
60+
61+
### **Return Types**
62+
- Methods clearly document return types and formats
63+
- Async methods return appropriate async types
64+
- Error conditions are documented in `Raises` sections
65+
66+
### **Examples**
67+
Each method includes practical usage examples showing:
68+
- Basic usage patterns
69+
- Parameter combinations
70+
- Error handling
71+
- Integration with other DAPI components
72+
73+
## 🔗 Cross-References
74+
75+
The API documentation includes extensive cross-references:
76+
- **Method signatures** link to parameter and return types
77+
- **Related methods** are referenced in descriptions
78+
- **Example workflows** demonstrate method integration
79+
- **Error handling** shows exception hierarchies
80+
81+
---
82+
83+
**Browse the API documentation using the navigation menu to explore specific modules and their functionality.**

docs/api/jobs.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Jobs
2+
3+
Job submission, monitoring, and management functionality for DesignSafe computational workflows.
4+
5+
## Job Request Generation
6+
7+
::: dapi.jobs.generate_job_request
8+
9+
## Job Submission
10+
11+
::: dapi.jobs.submit_job_request
12+
13+
## Job Monitoring
14+
15+
::: dapi.jobs.get_job_status
16+
17+
::: dapi.jobs.get_runtime_summary
18+
19+
::: dapi.jobs.interpret_job_status
20+
21+
## SubmittedJob Class
22+
23+
::: dapi.jobs.SubmittedJob
24+
25+
## Status Constants
26+
27+
::: dapi.jobs.STATUS_TIMEOUT
28+
29+
::: dapi.jobs.STATUS_INTERRUPTED
30+
31+
::: dapi.jobs.STATUS_MONITOR_ERROR
32+
33+
::: dapi.jobs.STATUS_UNKNOWN
34+
35+
::: dapi.jobs.TAPIS_TERMINAL_STATES

docs/api/systems.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Systems
2+
3+
System information and queue management for DesignSafe execution systems.
4+
5+
## System Queues
6+
7+
::: dapi.systems.list_system_queues

mkdocs.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,21 @@ theme:
3737

3838
plugins:
3939
- search
40+
- autorefs
41+
- mkdocstrings:
42+
handlers:
43+
python:
44+
options:
45+
docstring_style: google
46+
show_source: true
47+
show_if_no_docstring: true
48+
inherited_members: true
49+
members_order: source
50+
separate_signature: true
51+
unwrap_annotated: true
52+
filters: ["!^_"]
53+
merge_init_into_class: true
54+
docstring_section_style: spacy
4055

4156
markdown_extensions:
4257
- pymdownx.highlight:
@@ -67,6 +82,16 @@ nav:
6782
- MPM Job Submission: examples/mpm.md
6883
- OpenSees Job Submission: examples/opensees.md
6984
- Database Queries: examples/database.md
85+
- API Reference:
86+
- Overview: api/index.md
87+
- DSClient: api/client.md
88+
- Jobs: api/jobs.md
89+
- Files: api/files.md
90+
- Apps: api/apps.md
91+
- Systems: api/systems.md
92+
- Database: api/database.md
93+
- Auth: api/auth.md
94+
- Exceptions: api/exceptions.md
7095

7196
extra:
7297
social:

0 commit comments

Comments
 (0)