diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c672022 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +.git +.venv +.cache +**/.pytest_cache +**/.DS_Store + +dist +data +**/node_modules \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e69de29..59ab20b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM python:3-slim-bookworm + +RUN apt update && apt install -y curl + +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + +RUN pip install poetry + + +ADD . /sand + +WORKDIR /sand + +RUN python -m venv .venv + +ENV PATH="/sand/.venv/bin:$PATH" + +RUN poetry install \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1158de0..d4abcbe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,8 +14,8 @@ sand = 'sand.__main__:cli' [tool.poetry.dependencies] python = ">= 3.10, < 3.14" -kgdata = "^7.0.2" -sem-desc = "^6.11.1" +kgdata = "^7.0.4" +sem-desc = "^6.11.2" peewee = "^3.15.2" Flask = "^2.2.2" python-dotenv = ">= 0.19.0, < 0.20.0" @@ -36,6 +36,9 @@ dependency-injector = "^4.41.0" [tool.poetry.dev-dependencies] pytest = "^7.1.3" +[tool.poetry.group.dev.dependencies] +ipykernel = "^6.29.4" + [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" diff --git a/tests/resources/data/make.ipynb b/tests/resources/data/make.ipynb new file mode 100644 index 0000000..6a74706 --- /dev/null +++ b/tests/resources/data/make.ipynb @@ -0,0 +1,70 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Overview\n", + "\n", + "This notebook provides scripts to help generate the data for testing automatically." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "vscode": { + "languageId": "plaintext" + } + }, + "source": [ + "### Make KGDB" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Volumes/research/sand/.venv/lib/python3.11/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", + " from .autonotebook import tqdm as notebook_tqdm\n" + ] + } + ], + "source": [ + "from kgdata.wikidata.db import WikidataDB" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": ".venv", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.6" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}