Skip to content
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
19 changes: 6 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,16 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: pip-${{ hashFiles('**/requirements-dev.txt') }}
restore-keys: |
pip-${{ secrets.CACHE_VERSION }}-
- name: Install development dependencies
run: pip install -r requirements-dev.txt
- name: Install package & dependencies
run: pip install .
cache: "pip"
- name: Install dependencies
run: python -m pip install -r requirements.txt -r requirements-dev.txt .
- name: Test
run: pytest
run: python -m pytest

release:
name: "Release"
Expand Down
21 changes: 21 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "replicate"
version = "0.7.0"
description = "Python client for Replicate"
readme = "README.md"
license = { file = "LICENSE" }
authors = [{ name = "Replicate, Inc." }]
requires-python = ">=3.8"
dependencies = ["packaging", "pydantic>1", "requests>2"]
optional-dependencies = { dev = ["black", "pytest", "responses"] }

[project.urls]
homepage = "https://replicate.com"
repository = "https://github.com/replicate/replicate-python"

[tool.pytest.ini_options]
testpaths = "tests/"
2 changes: 0 additions & 2 deletions pytest.ini

This file was deleted.

4 changes: 3 additions & 1 deletion replicate/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__version__ = "0.7.0"
from importlib.metadata import version

__version__ = version(__package__)
1 change: 0 additions & 1 deletion replicate/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from .__about__ import __version__
from .client import Client

default_client = Client()
Expand Down
56 changes: 53 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
packaging==21.3
pytest==7.1.2
responses==0.21.0
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --extra=dev --output-file=requirements-dev.txt pyproject.toml
#
attrs==22.2.0
# via pytest
black==23.3.0
# via replicate (pyproject.toml)
certifi==2022.12.7
# via requests
charset-normalizer==3.1.0
# via requests
click==8.1.3
# via black
idna==3.4
# via requests
iniconfig==2.0.0
# via pytest
mypy-extensions==1.0.0
# via black
packaging==23.0
# via
# black
# pytest
# replicate (pyproject.toml)
pathspec==0.11.1
# via black
platformdirs==3.2.0
# via black
pluggy==1.0.0
# via pytest
pydantic==1.10.7
# via replicate (pyproject.toml)
pytest==7.2.2
# via replicate (pyproject.toml)
pyyaml==6.0
# via responses
requests==2.28.2
# via
# replicate (pyproject.toml)
# responses
responses==0.23.1
# via replicate (pyproject.toml)
types-pyyaml==6.0.12.9
# via responses
typing-extensions==4.5.0
# via pydantic
urllib3==1.26.15
# via
# requests
# responses
22 changes: 22 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --output-file=requirements.txt pyproject.toml
#
certifi==2022.12.7
# via requests
charset-normalizer==3.1.0
# via requests
idna==3.4
# via requests
packaging==23.0
# via replicate (pyproject.toml)
pydantic==1.10.7
# via replicate (pyproject.toml)
requests==2.28.2
# via replicate (pyproject.toml)
typing-extensions==4.5.0
# via pydantic
urllib3==1.26.15
# via requests
27 changes: 0 additions & 27 deletions setup.py

This file was deleted.