Skip to content

Commit

Permalink
Merge pull request #26 from epoch8/0.3.5
Browse files Browse the repository at this point in the history
0.3.5
  • Loading branch information
bobokvsky authored Aug 29, 2024
2 parents 75d52dc + a6cb5b8 commit ca50fc7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
"python.testing.pytestEnabled": true,
"python.linting.pycodestyleEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.enabled": true
}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 0.3.5
* Update datapipe-core dependency 0.14+

# 0.3.4
* Update label_studio_sdk dependency (allow >2 pydantic)

Expand Down
9 changes: 5 additions & 4 deletions datapipe_label_studio_lite/pipeline.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import numpy as np
import pandas as pd
from typing import Any, Dict, Union, List, Optional
from typing import Any, Dict, Union, List, Optional, cast
from datetime import datetime, timezone
from dataclasses import dataclass
from datapipe.run_config import RunConfig
Expand All @@ -21,6 +21,7 @@
DataStore,
Table,
Catalog,
ComputeStep,
)
from datapipe.step.batch_transform import BatchTransformStep
from datapipe.step.datatable_transform import DatatableTransformStep
Expand Down Expand Up @@ -178,7 +179,7 @@ def _convert_data_if_need(self, value: Any):

def build_compute(
self, ds: DataStore, catalog: Catalog
) -> List[DatatableTransformStep]:
) -> List[ComputeStep]:
input_dt = catalog.get_datatable(ds, self.input)
input_uploader_dt = ds.get_or_create_table(
f"{self.input}_upload",
Expand Down Expand Up @@ -343,7 +344,7 @@ def _cleanup(values):
return values

sync_datetime_df = sync_datetime_dt.get_data(
idx=pd.DataFrame({"project_id": [self.project.id]})
idx=cast(IndexDF, pd.DataFrame({"project_id": [self.project.id]}))
)

if sync_datetime_df.empty:
Expand Down Expand Up @@ -407,7 +408,7 @@ def _cleanup(values):
DatatableTransformStep(
name=f"{self.name_prefix}get_annotations_from_ls",
labels=self.labels,
func=get_annotations_from_ls,
func=get_annotations_from_ls, # type: ignore
input_dts=[],
output_dts=[output_dt],
check_for_changes=False,
Expand Down
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "datapipe-label-studio-lite"
version = "0.3.4"
version = "0.3.5"
description = ""
authors = [
"Alexander Kozlov <[email protected]>",
Expand All @@ -10,17 +10,16 @@ authors = [
exclude = ["tests", "experiments"]

[tool.poetry.dependencies]
python = ">=3.8, <3.12"
python = ">=3.9,<3.12"
requests = ">=2.24.0, <3"
datapipe-core = ">=0.13.0, <0.14"
datapipe-core = { version = ">=0.14.0-alpha.1, <0.15", allow-prereleases = true }
label-studio-sdk = ">=1.0.3, <1.1"

[tool.poetry.dev-dependencies]
flake8 = "*"
black = "*"

datapipe-core = {version=">=0.13.0, <0.14", extras=["sqlite"]}

datapipe-core = { version = ">=0.14.0-alpha.1, <0.15", allow-prereleases = true, extras=["sqlite"] }
pytest = "^7.4.3"
pytest-xdist = "*"
pytest-cases = "^3.6.4"
Expand Down

0 comments on commit ca50fc7

Please sign in to comment.