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

chore: Add support for Python 3.8 and 3.9 #117

Merged
merged 7 commits into from
Dec 19, 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
2 changes: 1 addition & 1 deletion .github/workflows/python-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
strategy:
matrix:
os: [ macos-latest ]
python-version: [ "3.10" ]
python-version: [ "3.8", "3.9", "3.10" ]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand Down
27 changes: 26 additions & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,32 @@ To build `phoenix`, run
```shell
hatch build
```
If successful, the build will appear in the `dist` folder at the repo base directory.
If successful, a source distribution (a tarball) and a Python `wheel` will appear in the `dist` folder at the repo base directory.

### Install the Built Package

We recommend using a separate virtual environment (e.g., `phoenix-test-env`) for installing and testing the builds created above.

To install `phoenix` from the source distribution (i.e., tarball), run
```shell
pip install /path/to/source/distribution/tarball.tar.gz
```

To install `phoenix` from the Python `wheel`, you must first install `wheel` with
```shell
pip install wheel
```
Then run
```shell
pip install /path/to/wheel.whl
```
(You should only install one of the source distribution or the `wheel` at a time.)

To make sure everything works, install `jupyter` with
```shell
pip install jupyter
```
and run the notebooks in the `examples` directory.

## Useful Resources
- [Hatch Quickstart](https://hatch.pypa.io/latest/)
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "phoenix"
description = "WRITE A BRIEF SUMMARY OF THE PROJECT."
readme = "README.md"
requires-python = ">=3.10, <3.11"
requires-python = ">=3.8, <3.11"
# license = "None"
keywords = [
"Observability",
Expand All @@ -16,8 +16,9 @@ maintainers = []
classifiers = [
"Development Status :: 1 - Planning",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"numpy",
Expand All @@ -27,7 +28,6 @@ dependencies = [
"starlette",
"uvicorn",
"psutil",
"tables",
"strawberry-graphql",
]
dynamic = ["version"]
Expand Down
7 changes: 0 additions & 7 deletions src/phoenix/utils/utils.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
from os import path
from typing import Any, List, Sequence, TypeGuard, TypeVar

T = TypeVar("T", bound=type[Any])


def is_list_of(lst: Sequence[object], tp: T) -> TypeGuard[List[T]]:
return isinstance(lst, list) and all(isinstance(x, tp) for x in lst)


def is_url(filepath: str) -> bool:
Expand Down