-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds auto generating docs from docstrings * Deploy docs with reusable workflow * Split models into own docs * Change Pipeline.apps to AnyHttpUrl * Move test deps into test group, made optional * Adds poetry_args to pytest workflow * Fix flake errors
- Loading branch information
Showing
14 changed files
with
782 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: 📖 Docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- docs | ||
jobs: | ||
build: | ||
name: 📓 Build and deploy docs | ||
uses: WGBH-MLA/.github/.github/workflows/docs.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# Coverage files | ||
htmlcov | ||
.coverage | ||
coverage.lcov | ||
coverage.lcov | ||
|
||
# Docs | ||
site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
FROM python | ||
RUN pip install -U pip uvicorn | ||
|
||
WORKDIR /app | ||
|
||
COPY ./pyproject.toml . | ||
COPY ./README.md . | ||
COPY ./fastclam /app/fastclam | ||
COPY pyproject.toml poetry.lock README.md ./ | ||
COPY fastclam fastclam | ||
|
||
RUN pip install . uvicorn | ||
RUN pip install . | ||
|
||
|
||
CMD [ "uvicorn", "fastclam.app:app", "--host", "0.0.0.0" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# FastCLAM | ||
|
||
FastAPI for CLAMS | ||
|
||
## install | ||
|
||
Clone the repository | ||
|
||
```bash | ||
git clone https://github.com/WGBH-MLA/FastCLAM | ||
cd FastCLAM/ | ||
``` | ||
|
||
### Poetry (Recommended) | ||
|
||
Install with poetry | ||
|
||
```bash | ||
poetry install | ||
``` | ||
|
||
### Pip | ||
|
||
```bash | ||
pip3 install . | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# App | ||
|
||
::: fastclam.app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Reference | ||
|
||
::: fastclam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Models | ||
|
||
::: fastclam.models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
"""# FastCLAM | ||
FastAPI for CLAMS | ||
Example: | ||
Run the server: | ||
`$ uvicorn fastclam.app` | ||
Use the API docs to make requests: | ||
[localhost:8000/docs](http://localhost:8000/docs) | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
"""Models | ||
Pipeline validation models | ||
""" | ||
|
||
from pydantic import BaseModel, AnyHttpUrl | ||
from typing import List | ||
|
||
|
||
class Inputs(BaseModel): | ||
"""Inputs | ||
Accepts list of files as input | ||
Attributes: | ||
files: A List of file paths as strings | ||
""" | ||
|
||
files: List[str] | ||
|
||
|
||
class Pipeline(Inputs): | ||
"""Pipeline | ||
A simple pieline validator, based on Inputs | ||
Attributes: | ||
apps: A List of apps to run, where each appp is a url string for the service | ||
""" | ||
|
||
apps: List[AnyHttpUrl] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
site_name: FastCLAM | ||
site_description: FastAPI for CLAMS | ||
repo_url: https://github.com/WGBH-MLA/FastCLAM | ||
edit_uri: '' | ||
|
||
markdown_extensions: | ||
- pymdownx.highlight | ||
- pymdownx.superfences | ||
- pymdownx.tabbed: | ||
alternate_style: true | ||
- pymdownx.inlinehilite | ||
- pymdownx.snippets | ||
- pymdownx.emoji: | ||
emoji_index: !!python/name:materialx.emoji.twemoji | ||
emoji_generator: !!python/name:materialx.emoji.to_svg | ||
- def_list | ||
- admonition | ||
- pymdownx.details | ||
- attr_list | ||
- md_in_html | ||
- tables | ||
|
||
theme: | ||
name: material | ||
palette: | ||
- media: '(prefers-color-scheme: dark)' | ||
scheme: slate | ||
toggle: | ||
icon: material/lightbulb-outline | ||
name: Switch to light mode | ||
- media: '(prefers-color-scheme: light)' | ||
scheme: default | ||
toggle: | ||
icon: material/lightbulb-on-outline | ||
name: Switch to dark mode | ||
features: | ||
- navigation.instant | ||
- navigation.tracking | ||
- navigation.tabs | ||
- navigation.tabs.sticky | ||
- navigation.sections | ||
- navigation.expand | ||
- navigation.indexes | ||
- toc.integrate | ||
- navigation.top | ||
- content.code.annotate | ||
|
||
plugins: | ||
- search | ||
- mkdocstrings | ||
|
||
watch: | ||
- fastclam | ||
|
||
extra: | ||
social: | ||
- icon: fontawesome/brands/github | ||
link: https://github.com/WGBH-MLA/FastCLAM | ||
version: | ||
provider: mike |
Oops, something went wrong.