Skip to content

Commit

Permalink
Use dev-containers to develop ir-measures integration and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mam10eks committed Jul 17, 2023
1 parent 1ddf65a commit 344b8ae
Show file tree
Hide file tree
Showing 9 changed files with 313 additions and 225 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pycache__
13 changes: 13 additions & 0 deletions ir-measures/.devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"image": "webis/ir_measures_evaluator:dev-1.0.6",
//"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter"
]
}
}
}
7 changes: 7 additions & 0 deletions ir-measures/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
4 changes: 1 addition & 3 deletions ir-measures/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FROM python:3.10

RUN pip3 install ir-measures approvaltests pytest
FROM webis/ir_measures_evaluator:dev-1.0.6

COPY ir_measures_evaluator.py /

Expand Down
4 changes: 4 additions & 0 deletions ir-measures/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM webis/tira-ir-datasets-starter:0.0.54

RUN apk add jq libffi-dev && pip3 install ir-datasets ir-measures approvaltests exceptiongroup pytest jupyter

3 changes: 2 additions & 1 deletion ir-measures/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
IMAGE_VERSION=1.0.5
IMAGE_VERSION=1.0.6

build-docker-image:
docker build -t webis/ir_measures_evaluator:dev-${IMAGE_VERSION} -f Dockerfile.dev .
docker build -t webis/ir_measures_evaluator:${IMAGE_VERSION} .

.PHONY: tests
Expand Down
3 changes: 2 additions & 1 deletion ir-measures/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ name = "pypi"
ir-measures = "*"
pytest = "*"
approvaltests = "*"
exceptiongroup = "*"

[dev-packages]

[requires]
python_version = "3.9"
python_version = "3.8"
277 changes: 162 additions & 115 deletions ir-measures/Pipfile.lock

Large diffs are not rendered by default.

Loading

0 comments on commit 344b8ae

Please sign in to comment.