forked from enviPath/enviPy
## Major Changes - Implement a REST style API app in epapi - Currently implements a GET method for all entity types in the browse menu (both package level and global) - Provides paginated results per default with query style filtering for reviewed vs unreviewed. - Provides new paginated templates with thin wrappers per entity types for easier maintainability - Implements e2e tests for the API ## Minor changes - Added more comprehensive gitignore to cover coverage reports and other test/node.js etc. data. - Add additional CI file for API tests that only gets triggered on API relevant changes. ## ⚠️ Currently only works with session-based authentication. Token based will be added in new PR. Co-authored-by: Tim Lorsbach <tim@lorsba.ch> Co-authored-by: jebus <lorsbach@envipath.com> Reviewed-on: enviPath/enviPy#243 Co-authored-by: Tobias O <tobias.olenyi@envipath.com> Co-committed-by: Tobias O <tobias.olenyi@envipath.com>
145 lines
4.4 KiB
TOML
145 lines
4.4 KiB
TOML
[project]
|
||
name = "envipy"
|
||
version = "0.1.0"
|
||
description = "Add your description here"
|
||
readme = "README.md"
|
||
requires-python = ">=3.12"
|
||
dependencies = [
|
||
"celery>=5.5.2",
|
||
"django>=5.2.1",
|
||
"django-extensions>=4.1",
|
||
"django-model-utils>=5.0.0",
|
||
"django-ninja>=1.4.5",
|
||
"django-ninja-extra>=0.30.6",
|
||
"django-oauth-toolkit>=3.0.1",
|
||
"django-polymorphic>=4.1.0",
|
||
"enviformer",
|
||
"envipy-additional-information",
|
||
"envipy-ambit>=0.1.0",
|
||
"envipy-plugins",
|
||
"epam-indigo>=1.30.1",
|
||
"gunicorn>=23.0.0",
|
||
"networkx>=3.4.2",
|
||
"psycopg2-binary>=2.9.10",
|
||
"python-dotenv>=1.1.0",
|
||
"rdkit>=2025.3.2",
|
||
"redis>=6.1.0",
|
||
"requests>=2.32.3",
|
||
"scikit-learn>=1.6.1",
|
||
"sentry-sdk[django]>=2.32.0",
|
||
"setuptools>=80.8.0",
|
||
"nh3==0.3.2",
|
||
"polars==1.35.1",
|
||
]
|
||
|
||
[tool.uv.sources]
|
||
enviformer = { git = "ssh://git@git.envipath.com/enviPath/enviformer.git", rev = "v0.1.4" }
|
||
envipy-plugins = { git = "ssh://git@git.envipath.com/enviPath/enviPy-plugins.git", rev = "v0.1.0" }
|
||
envipy-additional-information = { git = "ssh://git@git.envipath.com/enviPath/enviPy-additional-information.git", rev = "v0.1.7" }
|
||
envipy-ambit = { git = "ssh://git@git.envipath.com/enviPath/enviPy-ambit.git" }
|
||
|
||
[project.optional-dependencies]
|
||
ms-login = ["msal>=1.33.0"]
|
||
dev = [
|
||
"celery-stubs==0.1.3",
|
||
"django-stubs>=5.2.4",
|
||
"poethepoet>=0.37.0",
|
||
"pre-commit>=4.3.0",
|
||
"ruff>=0.13.3",
|
||
"pytest-playwright>=0.7.1",
|
||
"pytest-django>=4.11.1",
|
||
"pytest-cov>=7.0.0",
|
||
]
|
||
|
||
[tool.ruff]
|
||
line-length = 100
|
||
|
||
[tool.ruff.lint]
|
||
# Allow fix for all enabled rules (when `--fix`) is provided.
|
||
fixable = ["ALL"]
|
||
# Allow unused variables when underscore-prefixed.
|
||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
||
|
||
[tool.ruff.format]
|
||
docstring-code-format = true
|
||
|
||
# 4. Ignore `E402` (import violations) in all `__init__.py` files, and in selected subdirectories.
|
||
[tool.ruff.lint.per-file-ignores]
|
||
"__init__.py" = ["E402"]
|
||
"**/{tests,docs,tools}/*" = ["E402"]
|
||
|
||
[tool.poe.tasks]
|
||
# Main tasks
|
||
setup = { sequence = [
|
||
"db-up",
|
||
"migrate",
|
||
"bootstrap",
|
||
], help = "Complete setup: start database, run migrations, and bootstrap data" }
|
||
dev = { cmd = "uv run python scripts/dev_server.py", help = "Start the development server with CSS watcher", deps = [
|
||
"db-up",
|
||
"js-deps",
|
||
] }
|
||
build = { sequence = [
|
||
"build-frontend",
|
||
"collectstatic",
|
||
], help = "Build frontend assets and collect static files" }
|
||
|
||
# Database tasks
|
||
db-up = { cmd = "docker compose -f docker-compose.dev.yml up -d", help = "Start PostgreSQL database using Docker Compose" }
|
||
db-down = { cmd = "docker compose -f docker-compose.dev.yml down", help = "Stop PostgreSQL database" }
|
||
|
||
# Frontend tasks
|
||
js-deps = { cmd = "uv run python scripts/pnpm_wrapper.py install", help = "Install frontend dependencies" }
|
||
|
||
# Full cleanup tasks
|
||
clean = { sequence = [
|
||
"clean-db",
|
||
], help = "Remove model files and database volumes (WARNING: destroys all data!)" }
|
||
clean-db = { cmd = "docker compose -f docker-compose.dev.yml down -v", help = "Removes the database container and volume." }
|
||
|
||
# Django tasks
|
||
migrate = { cmd = "uv run python manage.py migrate", help = "Run database migrations" }
|
||
bootstrap = { shell = """
|
||
echo "Bootstrapping initial data..."
|
||
echo "This will take a bit ⏱️. Get yourself some coffee..."
|
||
uv run python manage.py bootstrap
|
||
echo "✓ Bootstrap complete"
|
||
echo ""
|
||
echo "Default admin credentials:"
|
||
echo " Username: admin"
|
||
echo " Email: admin@envipath.com"
|
||
echo " Password: SuperSafe"
|
||
""", help = "Bootstrap initial data (anonymous user, packages, models)" }
|
||
shell = { cmd = "uv run python manage.py shell", help = "Open Django shell" }
|
||
|
||
|
||
build-frontend = { cmd = "uv run python scripts/pnpm_wrapper.py run build", help = "Build frontend assets using pnpm", deps = [
|
||
"js-deps",
|
||
] } # Build tasks
|
||
|
||
|
||
collectstatic = { cmd = "uv run python manage.py collectstatic --noinput", help = "Collect static files for production", deps = [
|
||
"build-frontend",
|
||
] }
|
||
|
||
frontend-test-setup = { cmd = "playwright install", help = "Install the browsers required for frontend testing" }
|
||
|
||
[tool.pytest.ini_options]
|
||
addopts = "--verbose --capture=no --durations=10"
|
||
testpaths = ["tests", "*/tests"]
|
||
pythonpath = ["."]
|
||
norecursedirs = [
|
||
"env",
|
||
"venv",
|
||
"envipy-plugins",
|
||
"envipy-additional-information",
|
||
"envipy-ambit",
|
||
"enviformer",
|
||
]
|
||
markers = [
|
||
"api: API tests",
|
||
"frontend: Frontend tests",
|
||
"end2end: End-to-end tests",
|
||
"slow: Slow tests",
|
||
]
|