Skip to content

Commit

Permalink
Merge pull request #117 from hCaptcha/IMI-17005-move-dims-to-task-data
Browse files Browse the repository at this point in the history
Move entity dims to task data
  • Loading branch information
KamalM9 authored Sep 30, 2024
2 parents 90d02c2 + 6bf0675 commit fcf3e12
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 82 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ In order to get going you need [Docker](https://www.docker.com/) installed on yo
First build the image that contains all the code and dependencies:

```
docker-compose build
docker compose build
```

Run the tests:
```
docker-compose run basemodels ./bin/test
docker compose run basemodels ./bin/test
```

Lint the python files:
```
docker-compose run basemodels ./bin/lint
docker compose run basemodels ./bin/lint
```

### Manual
Expand Down Expand Up @@ -65,8 +65,6 @@ manifest = basemodels.Manifest.model_construct(**model)
```
## Note for maintainers: Deploying to PyPi

A build will automatically be deployed to PyPi from master if tagged with a version number. This version number should match the version in the `setup.py` file.

The tags will need to be pushed to master via a user that has the proper privileges (see the contributors of this repo).

Versioning should follow the [semver](https://semver.org/) versioning methodology and not introduce breaking changes on minor or patch-level changes.
Expand Down
1 change: 1 addition & 0 deletions basemodels/manifest/data/taskdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Entity(BaseModel):
entity_id: UUID
entity_uri: AnyHttpUrl
coords: Tuple[int, int]
size: Tuple[int, int]


class TaskDataEntry(BaseModel):
Expand Down
2 changes: 2 additions & 0 deletions basemodels/manifest/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ class Manifest(Model):
rejected_uri: Optional[AnyHttpUrl] = None
rejected_count: Optional[int] = None

enable_skip_text: Optional[bool] = False

is_verification: bool = False

# #### Validators
Expand Down
114 changes: 42 additions & 72 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pydantic = "^2.5.3"

[tool.poetry.dev-dependencies]
httpretty = "^1.0.5"
mypy = "^0.812"
mypy = "^1.0.0"
yapf = "^0.31.0"
pytest = "^7.1.2"

Expand Down
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setuptools.setup(
name="hmt-basemodels",
version="1.1.0",
version="1.2.0",
author="HUMAN Protocol",
description="Common data models shared by various components of the Human Protocol stack",
url="https://github.com/hCaptcha/hmt-basemodels",
Expand All @@ -14,7 +14,5 @@
"Programming Language :: Python",
],
packages=setuptools.find_packages(),
install_requires=[
"requests>=2", "typing-extensions", "pydantic>=2.5.3"
],
install_requires=["requests>=2", "typing-extensions", "pydantic>=2.5.3"],
)

0 comments on commit fcf3e12

Please sign in to comment.