-
Notifications
You must be signed in to change notification settings - Fork 2
Initial commit with PyPI project release #1
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| ci: | ||
| autofix_prs: true | ||
| autoupdate_commit_msg: '[pre-commit.ci] pre-commit autofix suggestions' | ||
|
|
||
| repos: | ||
| - repo: https://github.com/charliermarsh/ruff-pre-commit | ||
| rev: 'v0.5.5' | ||
| hooks: | ||
| - id: ruff | ||
| args: ['--fix', '--exit-non-zero-on-fix'] | ||
|
|
||
| - repo: https://github.com/psf/black | ||
| rev: 24.3.0 | ||
| hooks: | ||
| - id: black | ||
| exclude: notebooks|^tests/test_data$ | ||
| args: ['--config=./pyproject.toml'] | ||
|
|
||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v3.1.0 | ||
| hooks: | ||
| - id: check-ast | ||
| - id: check-docstring-first | ||
| - id: check-json | ||
| - id: check-merge-conflict | ||
| - id: debug-statements | ||
| - id: detect-private-key | ||
| - id: end-of-file-fixer | ||
| - id: pretty-format-json | ||
| - id: trailing-whitespace | ||
| - id: check-added-large-files | ||
| args: ['--maxkb=100'] | ||
| - id: requirements-txt-fixer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| default: help; | ||
|
|
||
| help: | ||
| @echo "🔥 Official VLM Run Python SDK" | ||
| @echo "" | ||
| @echo "Usage: make <target>" | ||
| @echo "" | ||
| @echo "Targets:" | ||
| @echo " clean Remove all build, test, coverage and Python artifacts" | ||
| @echo " clean-build Remove build artifacts" | ||
| @echo " clean-pyc Remove Python file artifacts" | ||
| @echo " clean-test Remove test and coverage artifacts" | ||
| @echo " lint Format source code automatically" | ||
| @echo " test Basic testing" | ||
| @echo " dist Builds source and wheel package" | ||
| @echo "" | ||
|
|
||
| clean: clean-build clean-pyc clean-test ## remove all build, test, coverage and Python artifacts | ||
|
|
||
| clean-build: ## remove build artifacts | ||
| rm -fr build/ | ||
| rm -fr dist/ | ||
| rm -fr .eggs/ | ||
| rm -fr site/ | ||
| find . -name '*.egg-info' -exec rm -fr {} + | ||
| find . -name '*.egg' -exec rm -f {} + | ||
|
|
||
|
|
||
| clean-pyc: ## remove Python file artifacts | ||
| find . -name '*.pyc' -exec rm -f {} + | ||
| find . -name '*.pyo' -exec rm -f {} + | ||
| find . -name '*~' -exec rm -f {} + | ||
| find . -name '__pycache__' -exec rm -fr {} + | ||
|
|
||
| clean-test: ## remove test and coverage artifacts | ||
| rm -fr .tox/ | ||
| rm -f .coverage | ||
| rm -fr htmlcov/ | ||
| rm -fr .pytest_cache | ||
|
|
||
| lint: ## Format source code automatically | ||
| pre-commit run --all-files # Uses pyproject.toml | ||
|
|
||
| test: ## Basic CPU testing | ||
| pytest -sv tests | ||
|
|
||
| dist: clean ## builds source and wheel package | ||
| python -m build --sdist --wheel | ||
| ls -lh dist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,16 @@ | ||
| # vlmrun-python-sdk | ||
| Official Python SDK for VLM Run Client | ||
| Python SDK for VLMRun. | ||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| pip install vlmrun | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| ```python | ||
| from vlmrun.client import Client | ||
|
|
||
| client = Client() | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| VLMRUN_SDK_VERSION := $(shell python -c 'from vlmrun.version import __version__; print(__version__.replace("-", "."))') | ||
| PYPI_USERNAME := | ||
| PYPI_PASSWORD := | ||
|
|
||
| WHL_GREP_PATTERN := .*\$(VLMRUN_SDK_VERSION).*\.whl | ||
|
|
||
| create-pypi-release-test: | ||
| @echo "looking for vlmrun whl file..." | ||
| @for file in dist/*; do \ | ||
| echo "examining file: $$file"; \ | ||
| if [ -f "$$file" ] && echo "$$file" | grep -qE "$(WHL_GREP_PATTERN)"; then \ | ||
| echo "Uploading: $$file"; \ | ||
| twine upload --repository testpypi "$$file"; \ | ||
| fi; \ | ||
| done | ||
| @echo "Upload completed" | ||
|
|
||
|
|
||
| create-pypi-release: | ||
| @echo "looking for vlmrun whl file..." | ||
| @for file in dist/*; do \ | ||
| echo "examining file: $$file"; \ | ||
| if [ -f "$$file" ] && echo "$$file" | grep -qE "$(WHL_GREP_PATTERN)"; then \ | ||
| echo "Uploading: $$file"; \ | ||
| twine upload "$$file"; \ | ||
| fi; \ | ||
| done | ||
| @echo "Upload completed" | ||
|
|
||
| create-tag: | ||
| git tag -a ${VLMRUN_SDK_VERSION} -m "Release ${VLMRUN_SDK_VERSION}" | ||
| git push origin ${VLMRUN_SDK_VERSION} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
|
|
||
| [build-system] | ||
| requires = ["setuptools>=40.1.0", "wheel"] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [project] | ||
| name = "vlmrun" | ||
| description = "Official Python SDK for VLM Run" | ||
| authors = [{name = "VLM Support", email = "[email protected]"}] | ||
| readme = "README.md" | ||
| requires-python = ">=3.10" | ||
| classifiers = [ | ||
| "Development Status :: 4 - Beta", | ||
| "Programming Language :: Python", | ||
| "Environment :: Console", | ||
| "Intended Audience :: Developers", | ||
| "Intended Audience :: Education", | ||
| "Intended Audience :: Information Technology", | ||
| "Intended Audience :: Science/Research","Topic :: Software Development :: Libraries", | ||
| "Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
| "Topic :: Scientific/Engineering :: Image Processing", | ||
| "License :: OSI Approved :: MIT License", | ||
| "Programming Language :: Python :: 3 :: Only", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: 3.11", | ||
| ] | ||
| license = {file = "LICENSE"} | ||
| dynamic = ["version", "dependencies"] | ||
|
|
||
| [project.optional-dependencies] | ||
| test = ["pytest"] | ||
| build = ["twine", "build"] | ||
|
|
||
| [tool.setuptools.dynamic] | ||
| version = {attr = "vlmrun.version.__version__"} | ||
| dependencies = {file = ["requirements/requirements.txt"]} | ||
|
|
||
| [tool.setuptools.packages.find] | ||
| include = ["vlmrun*"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| def test_client(): | ||
| from vlmrun.client import Client | ||
|
|
||
| client = Client() | ||
| assert client is not None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from .client import Client # noqa: F401 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| from dataclasses import dataclass | ||
|
|
||
|
|
||
| @dataclass | ||
| class Client: ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| __version__ = "0.1.0" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Package publish will be handled by github CI?