-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable the option to install weaviatest as a pip package in order to facilitate the consumption from other repositories and maximize the resuability Signed-off-by: Rodrigo Lopez <[email protected]>
- Loading branch information
1 parent
4183dbb
commit 269915f
Showing
25 changed files
with
154 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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,23 +1,8 @@ | ||
# Step 1: Use an official Python runtime as a parent image | ||
FROM python:3.10-slim | ||
FROM python:3.12-slim | ||
|
||
# Step 2: Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Step 3: Copy the requirements file to the container | ||
COPY requirements.txt . | ||
|
||
# Step 4: Install the required Python packages | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Step 5: Copy the rest of the application code to the container | ||
COPY . . | ||
RUN pip install -e . | ||
|
||
# Step 6: Set the default entry point for the container | ||
# Use the `cli.py` script as the entry point for the container | ||
ENTRYPOINT ["python", "weaviatest.py"] | ||
|
||
# Optionally, provide a default command to the entrypoint | ||
# CMD ["--help"] | ||
|
||
|
This file contains 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 @@ | ||
.PHONY: default env_install test build_container clean | ||
|
||
ENV := .venv | ||
SYSTEM_PYTHON := python3 | ||
PYTHON_VERSION := 3.12.5 | ||
ENV_PYTHON := ${ENV}/bin/python3 | ||
ENV_SITE_PACKAGES := ${ENV}/lib/python${PYTHON_VERSION}/site-packages | ||
PROJECT_PACKAGE_NAME := eco_pytests | ||
ENV_PROJECT_PACKAGE_PATH := ${ENV_SITE_PACKAGES}/${PROJECT_PACKAGE_NAME}-% | ||
CONTAINER_NAME := weaviatest | ||
VERSION ?= latest #$(shell git rev-parse --short HEAD) | ||
PUSH_TAG ?= latest | ||
|
||
default: test | ||
|
||
${ENV_PYTHON}: | ||
@echo "Creating Python ${PYTHON_VERSION} environment..." >&2 | ||
@${SYSTEM_PYTHON} -m venv ${ENV} | ||
@${ENV_PYTHON} -m pip install -U pip setuptools | ||
|
||
${ENV_PROJECT_PACKAGE_PATH}: ${ENV_PYTHON} | ||
@echo "Installing Python project in ${ENV_SITE_PACKAGES}" | ||
@${ENV_PYTHON} -m pip install . | ||
|
||
env_install: ${ENV_PROJECT_PACKAGE_PATH} | ||
|
||
test: ${ENV_PROJECT_PACKAGE_PATH} | ||
|
||
build_container: | ||
docker build -t ${CONTAINER_NAME}:${VERSION} . | ||
|
||
clean: | ||
@rm -rf ${ENV} |
This file contains 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 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,3 @@ | ||
pre-commit | ||
flake8==7.1.1 | ||
black==24.4.2 |
This file contains 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,7 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools >= 65", | ||
"setuptools_scm[toml] >6.2", | ||
"wheel >= 0.38.1", | ||
] | ||
build-backend = 'setuptools.build_meta' |
This file was deleted.
Oops, something went wrong.
This file contains 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,55 @@ | ||
[metadata] | ||
name = weaviatests | ||
provides = weaviatests | ||
description = Weaviate library for testing | ||
url = https://github.com/weaviate/weaviatest | ||
download_url = https://github.com/weaviate/weaviatest | ||
author = weaviate | ||
author_email = | ||
keywords = python3, sql | ||
license = GPL-3 | ||
platforms = Linux | ||
version = 0.0.1 | ||
project_urls = | ||
Docs = https://github.com/weaviate/weaviatest/blob/main/README.md | ||
Bugs = https://github.com/weaviate/weaviatest/issues | ||
|
||
license_files = | ||
LICENSE | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
classifiers = | ||
Development Status :: 3 - Alpha | ||
Environment :: Console | ||
Intended Audience :: Developers | ||
Intended Audience :: Other Audience | ||
Natural Language :: English | ||
License :: OSI Approved :: GNU General Public License (GPL) | ||
License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+) | ||
Operating System :: POSIX :: Linux | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3 :: Only | ||
Programming Language :: Python :: 3.12 | ||
Programming Language :: Python :: Implementation :: CPython | ||
Topic :: Software Development | ||
|
||
[options] | ||
include_package_data = True | ||
python_requires = | ||
>=3.12 | ||
install_requires = | ||
weaviate-client | ||
numpy | ||
semver | ||
click | ||
setup_requires = | ||
pip | ||
setuptools | ||
zip_safe = False | ||
packages = | ||
weaviatest | ||
|
||
[options.package_data] | ||
# If any package or subpackage contains *.txt, *.rst or *.md files, include them: | ||
*: ["*.txt", "*.rst", "*.md", LICENSE], |
This file contains 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,3 @@ | ||
from setuptools import setup | ||
|
||
setup() |
This file contains 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 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 @@ | ||
# __init__.py |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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,4 +1,4 @@ | ||
import lib.common as common | ||
import weaviatest.common as common | ||
import json | ||
import numpy as np | ||
import random | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.
This file contains 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 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
File renamed without changes.
File renamed without changes.
This file contains 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
File renamed without changes.