Skip to content

Commit 4df9cdb

Browse files
committed
remove ols
1 parent 2636a42 commit 4df9cdb

File tree

279 files changed

+416
-33951
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

279 files changed

+416
-33951
lines changed

.codecov.yml

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

.coveragerc

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

.snyk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ exclude:
33
# Ignore test code
44
- 'tests/**'
55
# Ignore utility scripts that don't ship
6-
- 'scripts/transform_coverage_report.py'
76
- 'scripts/questions_gen.py'
8-
- 'scripts/generate_openapi_schema.py'
97
- 'scripts/evaluation/**'
108
- 'scripts/data_collection/**'

Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ COPY runner.py requirements.txt ./
5454
RUN pip3.11 install --upgrade pip
5555
RUN for a in 1 2 3 4 5; do pip3.11 install --no-cache-dir -r requirements.txt && break || sleep 15; done
5656

57-
COPY ols ./ols
57+
COPY our_ols ./our_ols
5858

5959
# this directory is checked by ecosystem-cert-preflight-checks task in Konflux
6060
COPY LICENSE /licenses/

Makefile

Lines changed: 3 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -64,30 +64,7 @@ run: ## Run the service locally
6464
print-version: ## Print the service version
6565
python runner.py --version
6666

67-
test: test-unit test-integration test-e2e ## Run all tests
68-
69-
benchmarks: ## Run benchmarks
70-
@echo "Running benchmarks..."
71-
pdm run pytest tests/benchmarks --benchmark-histogram
72-
73-
test-unit: ## Run the unit tests
74-
@echo "Running unit tests..."
75-
@echo "Reports will be written to ${ARTIFACT_DIR}"
76-
COVERAGE_FILE="${ARTIFACT_DIR}/.coverage.unit" pdm run pytest tests/unit --cov=ols --cov=runner --cov-report term-missing --cov-report "json:${ARTIFACT_DIR}/coverage_unit.json" --junit-xml="${ARTIFACT_DIR}/junit_unit.xml"
77-
pdm run scripts/transform_coverage_report.py "${ARTIFACT_DIR}/coverage_unit.json" "${ARTIFACT_DIR}/coverage_unit.out"
78-
scripts/codecov.sh "${ARTIFACT_DIR}/coverage_unit.out"
79-
80-
test-integration: ## Run integration tests tests
81-
@echo "Running integration tests..."
82-
@echo "Reports will be written to ${ARTIFACT_DIR}"
83-
COVERAGE_FILE="${ARTIFACT_DIR}/.coverage.integration" pdm run pytest -m 'not redis' tests/integration --cov=ols --cov=runner --cov-report term-missing --cov-report "json:${ARTIFACT_DIR}/coverage_integration.json" --junit-xml="${ARTIFACT_DIR}/junit_integration.xml" --cov-fail-under=60
84-
pdm run scripts/transform_coverage_report.py "${ARTIFACT_DIR}/coverage_integration.json" "${ARTIFACT_DIR}/coverage_integration.out"
85-
scripts/codecov.sh "${ARTIFACT_DIR}/coverage_integration.out"
86-
87-
check-coverage: test-unit test-integration ## Unit tests and integration tests overall code coverage check
88-
coverage combine --keep "${ARTIFACT_DIR}/.coverage.unit" "${ARTIFACT_DIR}/.coverage.integration"
89-
# the threshold should be very high there, in theory it should reach 100%
90-
coverage report -m --fail-under=94
67+
test: test-e2e ## Run all tests
9168

9269
test-e2e: ## Run e2e tests - requires running OLS server
9370
@echo "Running e2e tests..."
@@ -101,19 +78,6 @@ test-eval: ## Run evaluation tests - requires running OLS server
10178
pdm run pytest tests/e2e/evaluation -vv -s --durations=0 -o junit_suite_name="${SUITE_ID}" --junit-prefix="${SUITE_ID}" --junit-xml="${ARTIFACT_DIR}/junit_e2e_${SUITE_ID}.xml" \
10279
--eval_out_dir ${ARTIFACT_DIR}
10380

104-
coverage-report: unit-tests-coverage-report integration-tests-coverage-report ## Export coverage reports into interactive HTML
105-
106-
unit-tests-coverage-report: test-unit ## Export unit test coverage report into interactive HTML
107-
coverage html --data-file="${ARTIFACT_DIR}/.coverage.unit" -d htmlcov-unit
108-
109-
integration-tests-coverage-report: test-integration ## Export integration test coverage report into interactive HTML
110-
coverage html --data-file="${ARTIFACT_DIR}/.coverage.integration" -d htmlcov-integration
111-
112-
check-types: ## Checks type hints in sources
113-
pdm run mypy --explicit-package-bases --disallow-untyped-calls --disallow-untyped-defs --disallow-incomplete-defs ols/
114-
115-
security-check: ## Check the project for security issues
116-
bandit -c pyproject.toml -r .
11781

11882
format: ## Format the code into unified format
11983
pdm run black .
@@ -123,51 +87,19 @@ verify: install-woke install-deps-test ## Verify the code using various linters
12387
pdm run black . --check
12488
pdm run ruff check .
12589
./woke . --exit-1-on-failure
126-
pylint ols scripts tests runner.py
127-
pdm run mypy --explicit-package-bases --disallow-untyped-calls --disallow-untyped-defs --disallow-incomplete-defs ols/
128-
129-
schema: ## Generate OpenAPI schema file
130-
python scripts/generate_openapi_schema.py docs/openapi.json
90+
pylint our_ols scripts tests runner.py
91+
pdm run mypy --explicit-package-bases --disallow-untyped-calls --disallow-untyped-defs --disallow-incomplete-defs our_ols/
13192

13293
requirements.txt: pyproject.toml pdm.lock ## Generate requirements.txt file containing hashes for all non-devel packages
13394
pdm export --prod --format requirements --output requirements.txt --no-extras --without evaluation
13495

135-
verify-packages-completeness: requirements.txt ## Verify that requirements.txt file contains complete list of packages
136-
pip download -d /tmp/ --use-pep517 --verbose -r requirements.txt
137-
13896
get-rag: ## Download a copy of the RAG embedding model and vector database
13997
podman create --replace --name tmp-rag-container $$(grep 'ARG LIGHTSPEED_RAG_CONTENT_IMAGE' Containerfile | awk 'BEGIN{FS="="}{print $$2}') true
14098
rm -rf vector_db embeddings_model
14199
podman cp tmp-rag-container:/rag/vector_db vector_db
142100
podman cp tmp-rag-container:/rag/embeddings_model embeddings_model
143101
podman rm tmp-rag-container
144102

145-
config.puml: ## Generate PlantUML class diagram for configuration
146-
pyreverse ols/app/models/config.py --output puml --output-directory=docs/
147-
mv docs/classes.puml docs/config.puml
148-
149-
docs/config.png: docs/config.puml ## Generate an image with configuration graph
150-
pushd docs && \
151-
java -jar ${PATH_TO_PLANTUML}/plantuml.jar --theme rose config.puml && \
152-
mv classes.png config.png && \
153-
popd
154-
155-
llms.puml: ## Generate PlantUML class diagram for LLM plugin system
156-
pyreverse ols/src/llms/ --output puml --output-directory=docs/
157-
mv docs/classes.puml docs/llms_classes.uml
158-
mv docs/packages.puml docs/llms_packages.uml
159-
160-
distribution-archives: ## Generate distribution archives to be uploaded into Python registry
161-
pdm run python -m build
162-
163-
upload-distribution-archives: ## Upload distribution archives into Python registry
164-
pdm run python -m twine upload --repository ${PYTHON_REGISTRY} dist/*
165-
166-
shellcheck: ## Run shellcheck
167-
wget -qO- "https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz" | tar -xJv \
168-
shellcheck --version
169-
shellcheck -- */*.sh
170-
171103
help: ## Show this help screen
172104
@echo 'Usage: make <OPTIONS> ... <TARGETS>'
173105
@echo ''

logs/.gitkeep

Whitespace-only changes.

ols/__init__.py

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

ols/app/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

ols/app/endpoints/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

ols/app/endpoints/authorized.py

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

ols/app/endpoints/feedback.py

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

0 commit comments

Comments
 (0)