Skip to content

Commit b0581b2

Browse files
committed
split jupyter_health_client into its own package
1 parent 5493837 commit b0581b2

File tree

10 files changed

+44
-91
lines changed

10 files changed

+44
-91
lines changed

.github/workflows/publish.yaml

Lines changed: 0 additions & 64 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Contributing to JupyterHealth
2+
3+
Welcome! As a [Jupyter](https://jupyter.org) project,
4+
you can follow the [Jupyter contributor guide](https://jupyter.readthedocs.io/en/latest/contributing/content-contributor.html).
5+
6+
JupyterHealth is part of the [JupyterHub subproject](https://jupyterhub-team-compass.readthedocs.io/en/latest/contribute/guide.html).
7+
8+
Make sure to also follow [Project Jupyter's Code of Conduct](https://github.com/jupyter/governance/blob/HEAD/conduct/code_of_conduct.md)
9+
for a friendly and welcoming collaborative environment.
10+
11+
If you need some help, feel free to ask on [Zulip](https://jupyter.zulipchat.com/#narrow/channel/469744-jupyterhub/) or [Discourse](https://discourse.jupyter.org/).
12+

Dockerfile

Lines changed: 0 additions & 10 deletions
This file was deleted.

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
1-
# singleuser-image for Jupyter Health pre-mvp
1+
# JupyterHealth client
22

3-
This repo builds and publishes https://quay.io/repository/jupyterhealth/singleuser-premvp for the jupyter health pre-MVP
3+
A Python client library for the JupyterHealth exchange.
44

5-
The image is based on the scipy-notebook Jupyter image,
6-
adding dependencies for commonhealth cloud API access.
5+
Install:
6+
7+
```
8+
pip install jupyter-health-client
9+
```
10+
11+
Use:
12+
13+
```python
14+
from jupyter_health_client import JupyterHealthClient
15+
16+
client = JupyterHealthClient()
17+
```
18+
19+
20+
For more information, see [examples](https://jupyterhealth.org/software-documentation/)
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77

88
import os
99
import warnings
10+
from collections.abc import Generator
1011
from enum import Enum
11-
from typing import Any, Generator, Literal, cast, overload
12+
from typing import Any, Literal, cast, overload
1213

1314
import pandas as pd
1415
import requests

pyproject.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[project]
2-
name = "jupyter-health"
2+
name = "jupyter-health-client"
33
description = "Jupyter Health client library"
44
authors = [
55
{name = "Jupyter", email = "benjaminrk@gmail.com"},
@@ -13,7 +13,7 @@ classifiers = [
1313
readme = "README.md"
1414
license = {file = "LICENSE"}
1515
dynamic = ["version"]
16-
requires-python = ">=3.7"
16+
requires-python = ">=3.9"
1717
dependencies = [
1818
"pandas",
1919
"requests",
@@ -22,9 +22,9 @@ dependencies = [
2222

2323
[project.urls]
2424
# this will eventually be in its own repo
25-
Documentation = "https://github.com/jupyterhealth/singleuser-image#readme"
26-
Issues = "https://github.com/jupyterhealth/singleuser-image/issues"
27-
Source = "https://github.com/jupyterhealth/singleuser-image"
25+
Documentation = "https://github.com/jupyterhealth/jupyter-health-client#readme"
26+
Issues = "https://github.com/jupyterhealth/jupyter-health-client/issues"
27+
Source = "https://github.com/jupyterhealth/jupyter-health-client"
2828

2929
[project.optional-dependencies]
3030
test = ["pytest"]
@@ -59,7 +59,7 @@ select = [
5959

6060
[tool.tbump]
6161
# this will eventually be in its own repo
62-
github_url = "https://github.com/jupyterhealth/singleuser-image"
62+
github_url = "https://github.com/jupyterhealth/jupyter-health-client"
6363

6464
[tool.tbump.version]
6565
current = "0.0.1a1"
@@ -80,4 +80,4 @@ message_template = "Bump to {new_version}"
8080
tag_template = "{new_version}"
8181

8282
[[tool.tbump.file]]
83-
src = "jupyter_health/__init__.py"
83+
src = "jupyter_health_client/__init__.py"

tests/test_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import os
22
from unittest import mock
33

4-
from jupyter_health import JupyterHealthCHClient
4+
from jupyter_health_client import JupyterHealthClient
55

66

77
def test_client_constructor():
8-
client = JupyterHealthCHClient(token="abc")
8+
client = JupyterHealthClient(token="abc")
99
assert client.session.headers == {"Authorization": "Bearer abc"}
10-
with mock.patch.dict(os.environ, {"CHCS_TOKEN": "xyz"}):
11-
client = JupyterHealthCHClient()
10+
with mock.patch.dict(os.environ, {"JHE_TOKEN": "xyz"}):
11+
client = JupyterHealthClient()
1212
assert client.session.headers == {"Authorization": "Bearer xyz"}
1313

1414

tests/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22
from pandas import Timestamp
33

4-
from jupyter_health.utils import flatten_dict, tidy_observation
4+
from jupyter_health_client.utils import flatten_dict, tidy_observation
55

66
# synthetic records matching real record structure
77
glucose_record = {

0 commit comments

Comments
 (0)