Skip to content

Commit

Permalink
fix(docs): updated docs to include changelog, added reference for cal…
Browse files Browse the repository at this point in the history
…ling gpus in session.create
  • Loading branch information
shinybrar committed Nov 15, 2023
1 parent 051e818 commit e58f9be
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ repos:


- repo: https://github.com/asottile/pyupgrade
rev: v3.10.1
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py36-plus]

- repo: https://github.com/psf/black
rev: 23.7.0
rev: 23.11.0
hooks:
- id: black

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
rev: v1.7.0
hooks:
- id: mypy
additional_dependencies: ["types-toml", "types-setuptools", "types-requests", "types-attrs"]
Expand All @@ -46,12 +46,12 @@ repos:
args: [--convention=google, --add-ignore=D104]

- repo: https://github.com/asottile/blacken-docs
rev: 1.15.0
rev: 1.16.0
hooks:
- id: blacken-docs

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
exclude: ^docs/*
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--8<-- "CHANGELOG.md"
6 changes: 4 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
image="images.canfar.net/chimefrb/alpine:keep",
cores=2,
ram=8,
gpu=1,
kind="headless",
cmd="env",
env={"TEST": "test"},
replicas=3,
)
```

[Get Started](get-started.md){: .md-button .md-button--primary }
[Go to GitHub :fontawesome-brands-github:](https://github.com/chimefrb/skaha){: .md-button .md-button--primary }
[Get Started :material-coffee:](get-started.md){: .md-button .md-button--primary }
[Go to GitHub :fontawesome-brands-github:](https://github.com/chimefrb/skaha){: .md-button .md-button--primary }
[Changelog :material-vector-polyline-remove:](changelog.md){: .md-button .md-button--primary }
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,4 @@ nav:
- Images: images.md
- Context: context.md
- Client: client.md
- Change Log: changelog.md
30 changes: 29 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,37 @@
[tool.poetry]
name = "skaha"
version = "1.3.0"
description = "Python Client for Skaha Container Platform in CANFAR"
description = "Python Client for Skaha Container Platform on CANFAR"
authors = ["Shiny Brar <[email protected]>"]
license = "MIT"
readme = "README.md"
keywords = ["skaha", "canfar", "python", "client", "container", "platform"]

homepage = "https://chimefrb.github.io/skaha/"
repository = "https://github.com/chimefrb/skaha"
documentation = "https://chimefrb.github.io/skaha/"

classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: MIT License",
"Natural Language :: English",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Astronomy",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Software Development :: Libraries :: Python Modules",
]

[tool.poetry.urls]
changelog = "https://chimefrb.github.io/skaha/changelog/"

[tool.poetry.dependencies]
python = "^3.7"
Expand Down
2 changes: 2 additions & 0 deletions skaha/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ def create(
cores (int, optional): Number of cores. Defaults to 2.
ram (int, optional): Amount of RAM (GB). Defaults to 4.
kind (str, optional): Type of skaha session. Defaults to "headless".
gpu (Optional[int], optional): Number of GPUs. Defaults to None.
cmd (Optional[str], optional): Command to run. Defaults to None.
args (Optional[str], optional): Arguments to the command. Defaults to None.
env (Optional[Dict[str, Any]], optional): Environment variables to inject.
Expand All @@ -201,6 +202,7 @@ def create(
image='images.canfar.net/skaha/terminal:1.1.1',
cores=2,
ram=8,
gpu=1,
kind="headless",
cmd="env",
env={"TEST": "test"},
Expand Down

0 comments on commit e58f9be

Please sign in to comment.