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
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
RecordType.COURT_CASES: RecordTypeCoarse.JAILS_AND_COURTS,
RecordType.INCARCERATION_RECORDS: RecordTypeCoarse.JAILS_AND_COURTS,
# Other
RecordType.OTHER: RecordTypeCoarse.OTHER,
None: RecordTypeCoarse.NOT_RELEVANT
}

Expand Down
4 changes: 2 additions & 2 deletions src/external/huggingface/hub/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ def format_as_huggingface_dataset(outputs: list[GetForLoadingToHuggingFaceOutput
d['url_id'].append(output.url_id)
d['url'].append(output.url)
d['relevant'].append(output.relevant)
d['record_type_fine'].append(output.record_type_fine)
d['record_type_coarse'].append(output.record_type_coarse)
d['record_type_fine'].append(output.record_type_fine.value)
d['record_type_coarse'].append(output.record_type_coarse.value)
d['html'].append(output.html)
return Dataset.from_dict(d)

26 changes: 26 additions & 0 deletions tests/manual/core/tasks/scheduled/test_push_to_huggingface.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import pytest

Check warning on line 1 in tests/manual/core/tasks/scheduled/test_push_to_huggingface.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] tests/manual/core/tasks/scheduled/test_push_to_huggingface.py#L1 <100>

Missing docstring in public module
Raw output
./tests/manual/core/tasks/scheduled/test_push_to_huggingface.py:1:1: D100 Missing docstring in public module

from environs import Env

from src.core.env_var_manager import EnvVarManager

Check warning on line 5 in tests/manual/core/tasks/scheduled/test_push_to_huggingface.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] tests/manual/core/tasks/scheduled/test_push_to_huggingface.py#L5 <401>

'src.core.env_var_manager.EnvVarManager' imported but unused
Raw output
./tests/manual/core/tasks/scheduled/test_push_to_huggingface.py:5:1: F401 'src.core.env_var_manager.EnvVarManager' imported but unused
from src.core.tasks.scheduled.impl.huggingface.operator import PushToHuggingFaceTaskOperator
from src.db.client.async_ import AsyncDatabaseClient
from src.external.huggingface.hub.client import HuggingFaceHubClient

env = Env()
env.read_env()

@pytest.mark.asyncio
@pytest.mark.manual
async def test_push_to_huggingface():

Check warning on line 15 in tests/manual/core/tasks/scheduled/test_push_to_huggingface.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] tests/manual/core/tasks/scheduled/test_push_to_huggingface.py#L15 <103>

Missing docstring in public function
Raw output
./tests/manual/core/tasks/scheduled/test_push_to_huggingface.py:15:1: D103 Missing docstring in public function
operator = PushToHuggingFaceTaskOperator(
adb_client=AsyncDatabaseClient(
db_url=env.str("PROD_DATABASE_URL")
),
hf_client=HuggingFaceHubClient(
env.str("HUGGINGFACE_HUB_TOKEN")
)
)

await operator.inner_task_logic()

Check warning on line 26 in tests/manual/core/tasks/scheduled/test_push_to_huggingface.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] tests/manual/core/tasks/scheduled/test_push_to_huggingface.py#L26 <391>

blank line at end of file
Raw output
./tests/manual/core/tasks/scheduled/test_push_to_huggingface.py:26:1: W391 blank line at end of file
Empty file.
3 changes: 0 additions & 3 deletions tests/manual/migration_with_prod_data/README.md

This file was deleted.

83 changes: 0 additions & 83 deletions tests/manual/unsorted/test_root_url_cache_unit.py

This file was deleted.