Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs and project with resource_usage #254

Merged
merged 1 commit into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/plugins/resource_usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`fps-resource-usage` implements the [resource usage](https://github.com/jupyter-server/jupyter-resource-usage) API, for monitoring memory and CPU usage.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ nav:
- 'fps-kernels': plugins/kernels.md
- 'fps-terminals': plugins/terminals.md
- 'fps-yjs': plugins/yjs.md
- 'fps-resource-usage': plugins/resource_usage.md

markdown_extensions:
- admonition
Expand Down
6 changes: 3 additions & 3 deletions plugins/resource_usage/fps_resource_usage/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from fps.config import PluginModel, get_config
from fps.hooks import register_config
from pydantic import BaseSettings
from fps.config import PluginModel, get_config # type: ignore
from fps.hooks import register_config # type: ignore
from pydantic import BaseSettings # type: ignore


class ResourceUsageConfig(PluginModel, BaseSettings):
Expand Down
8 changes: 4 additions & 4 deletions plugins/resource_usage/fps_resource_usage/routes.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import psutil
import psutil # type: ignore
from anyio import to_thread
from fastapi import APIRouter, Depends
from fps.hooks import register_router
from fps_auth_base import User, current_user
from fastapi import APIRouter, Depends # type: ignore
from fps.hooks import register_router # type: ignore
from fps_auth_base import User, current_user # type: ignore

from .config import get_resource_usage_config

Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ dependencies = [
"fps-kernels>=0.0.42",
"fps-terminals>=0.0.42",
"fps-nbconvert>=0.0.42",
"fps-yjs>=0.0.42"
"fps-yjs>=0.0.42",
"fps-resource-usage>=0.0.42",
]

[[project.authors]]
Expand Down Expand Up @@ -56,6 +57,7 @@ pre-install-commands = [
"pip install -e ./plugins/nbconvert",
"pip install -e ./plugins/terminals",
"pip install -e ./plugins/yjs",
"pip install -e ./plugins/resource_usage",
]
dependencies = ["fastapi>=0.87.0"]
features = ["test"]
Expand Down Expand Up @@ -93,6 +95,7 @@ typecheck = [
"mypy plugins/auth/fps_auth",
"mypy plugins/nbconvert/fps_nbconvert",
"mypy plugins/yjs/fps_yjs",
"mypy plugins/resource_usage/fps_resource_usage",
"mypy plugins/terminals/fps_terminals",
"mypy plugins/login/fps_login",
]
Expand Down Expand Up @@ -131,8 +134,9 @@ python_packages = [
"plugins/retrolab:fps-retrolab",
"plugins/terminals:fps-terminals",
"plugins/yjs:fps-yjs",
"plugins/resource_usage:fps-resource-usage",
"plugins/login:fps-login",
".:jupyverse:fps-auth-base,fps-noauth,fps-auth,fps-auth-fief,fps-contents,fps-jupyterlab,fps-kernels,fps-lab,fps-frontend,fps-nbconvert,fps-retrolab,fps-terminals,fps-yjs"
".:jupyverse:fps-auth-base,fps-noauth,fps-auth,fps-auth-fief,fps-contents,fps-jupyterlab,fps-kernels,fps-lab,fps-frontend,fps-nbconvert,fps-retrolab,fps-terminals,fps-yjs,fps-resource-usage"
]

[tool.hatch.version]
Expand Down