Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/test_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
uv pip install --system -r requirements.txt
- name: Install the project
run: uv sync --locked --all-extras --dev

- name: Run tests
run: |
pytest tests/test_automated
pytest tests/test_alembic
uv run pytest tests/test_automated
uv run pytest tests/test_alembic
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
# Set working directory
WORKDIR /app

COPY requirements.txt ./requirements.txt
COPY pyproject.toml uv.lock ./

# Install dependencies
RUN uv pip install --system -r requirements.txt
RUN playwright install chromium
RUN playwright install-deps chromium
RUN uv sync
# Must call from the root directory because uv does not add playwright to path
RUN /app/.venv/bin/playwright install-deps chromium
RUN /app/.venv/bin/playwright install chromium


# Copy project files
COPY api ./api
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ core | A module which integrates other components, such as collector_manager and
api | API for interacting with collector_manager, core, and collector_db
local_database | Resources for setting up a test database for local development

## Installation

```
uv sync
```

## How to use

1. Create an .env file in this directory with these contents, or set the environment variable another way: `VUE_APP_PDAP_API_KEY=KeyGoesHere`
Expand Down
53 changes: 51 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
[project]
name="source-collector"
version="0.1.0"
name = "data-source-identification"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
"aiohttp~=3.11.11",
"alembic~=1.14.0",
"apscheduler~=3.11.0",
"asyncpg~=0.30.0",
"beautifulsoup4>=4.12.3",
"bs4~=0.0.2",
"ckanapi~=4.8",
"datasets~=2.19.1",
"docker~=7.1.0",
"fastapi[standard]~=0.115.6",
"from-root~=1.3.0",
"google-api-python-client>=2.156.0",
"httpx~=0.28.1",
"huggingface-hub~=0.28.1",
"keras~=2.15.0",
"lxml~=5.1.0",
"marshmallow~=3.23.2",
"numpy~=1.26.4",
"openai~=1.60.1",
"pandas~=2.2.3",
"playwright~=1.49.1",
"psycopg2-binary~=2.9.6",
"psycopg[binary]~=3.1.20",
"pydantic~=2.10.6",
"pyjwt~=2.10.1",
"python-dotenv~=1.0.1",
"requests~=2.32.3",
"sqlalchemy~=2.0.36",
"starlette~=0.45.3",
"tensorflow-cpu~=2.15.1",
"tensorflow-io-gcs-filesystem==0.31.0",
"tqdm>=4.64.1",
"transformers~=4.40.2",
"urllib3~=1.26.18",
"uvicorn~=0.34.0",
]

[dependency-groups]
dev = [
"docker>=7.1.0",
"pytest>=7.2.2",
"pytest-asyncio~=0.25.2",
"pytest-mock==3.12.0",
"pytest-timeout~=2.3.1",
]


54 changes: 0 additions & 54 deletions requirements.txt

This file was deleted.

4 changes: 0 additions & 4 deletions start_mirrored_local_app.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
"""
Starts a local instance of the application utilizing a database
mirrored from production.

Because this is used for testing only, the docker module is not included in
requirements.txt, and must be installed separately via
`pip install docker`
"""
import uvicorn

Expand Down
Loading