Skip to content

Commit

Permalink
Merge pull request #9 from kbase/pyrighted
Browse files Browse the repository at this point in the history
Improved type hints and API documentation
  • Loading branch information
jeff-cohere authored Oct 17, 2024
2 parents fae8cb8 + a2fb12f commit bd83fb8
Show file tree
Hide file tree
Showing 9 changed files with 305 additions and 133 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build and deploy gh-pages branch with Mkdocs

on:
push:
# Runs only if documentation is changed
paths:
- 'mkdocs.yml'
- 'docs/**'
# Runs every time main branch is updated
branches: ["main"]
# Runs every time a PR is open against main
pull_request:
branches: ["main"]
workflow_dispatch:

concurrency:
# Prevent 2+ copies of this workflow from running concurrently
group: dts-docs-action

jobs:
Build-and-Deploy-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
fetch-depth: 0 # Needed, or else gh-pages won't be fetched, and push rejected
submodules: false # speeds up clone and not building anything in submodules

- name: Show action trigger
run: echo "= The job was automatically triggered by a ${{github.event_name}} event."

- name: Setting up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Installing dtspy dependencies (${{ matrix.os }})
run: python3 -m pip install -r requirements.txt

- name: Build
run: mkdocs build --verbose

- if: ${{ github.event_name == 'push' }}
name: GitHub Pages action
uses: JamesIves/github-pages-deploy-action@v4
with:
# Do not remove existing pr-preview pages
clean-exclude: pr-preview
folder: ./site/

# If it's a PR from within the same repo, deploy to a preview page
# For security reasons, PRs from forks cannot write into gh-pages for now
- if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
name: Preview docs
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./site/
1 change: 1 addition & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: dts
2 changes: 2 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# dtspy: a Python client for the [Data Transfer System](https://kbase.github.io/dts/)

11 changes: 10 additions & 1 deletion dts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
"""dts: a client for the Data Transfer Service"""
"""dts: a Python client for the Data Transfer Service.
The [Data Transfer System (DTS)](https://kbase.github.io/dts/) offers a federated
search capability for participating organizations in the DOE Biological and
Environmental Research program, and allows the transfer of related data and
metadata between these organizations.
DTS API documentation is available [here](https://lb-dts.staging.kbase.us/docs#/).
"""

from .database import Database
from .transfer_status import TransferStatus
Expand Down
Loading

0 comments on commit bd83fb8

Please sign in to comment.