Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #650

Merged
merged 4 commits into from
Jun 26, 2024
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
13 changes: 8 additions & 5 deletions .github/workflows/test-python-client-on-many-python-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Image
- name: Install Dependencies
working-directory: ${{github.workspace}}/python-client
run: |
sudo apt-get install -y openjdk-11-jdk
pip3 install .[test,dev]
- name: Running Tests
working-directory: ${{github.workspace}}/python-client
run: |
cd python-client
pip3 install twine coverage-badge python-terrier coverage ir_datasets pytest docker approvaltests
echo running on branch ${GITHUB_REF##*/}
pytest

2 changes: 2 additions & 0 deletions python-client/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ RUN mkdir -p /usr/share/umlet \
&& cd /usr/share/umlet \
&& unzip download.zip
# Install sphinx dependencies
## TODO: use "pip install .[test,dev,docs]" from setup.cfg ; not done for now since this Docker file should be
## superseded anyway
RUN pip3 install sphinx furo myst-parser sphinx-design sphinxcontrib-plantuml sphinxcontrib-umlet
RUN apt-get update && apt-get install -y plantuml
RUN pip3 install tira approvaltests \
Expand Down
16 changes: 0 additions & 16 deletions python-client/Dockerfile.dev-python3.7

This file was deleted.

6 changes: 0 additions & 6 deletions python-client/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ run-tests:
docker run -u root --rm -v /var/run/docker.sock:/var/run/docker.sock -v ${PWD}:/app -w /app --entrypoint pytest webis/tira:python-client-dev-0.0.5-python3.7
docker run -u root --rm -v /var/run/docker.sock:/run/user/0/podman/podman.sock -v ${PWD}:/app -w /app --entrypoint pytest webis/tira:python-client-dev-0.0.5-python3.7

run-tests-legacy:
../application/venv/bin/coverage run --data-file=tests/test-coverage/.coverage ../application/venv/bin/pytest \
&& ../application/venv/bin/coverage report --data-file=tests/test-coverage/.coverage > tests/test-coverage/coverage-report \
&& cd tests/test-coverage \
&& ../../../application/venv/bin/coverage-badge -o coverage.svg

docs:
docker run --rm -ti -v ${PWD}:/app -w /app webis/tira:python-client-dev-0.0.3 bash -c \
'sphinx-apidoc -o docs tira/ && cd docs && make html'
10 changes: 7 additions & 3 deletions python-client/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,19 @@ include_package_data = True
packages = find:
install_requires =
requests>=2.26,==2.*
docker>=6.0.0,==6.*
docker>=7.1.0,==7.*
numpy==1.*
pandas
tqdm

[options.extras_require]
test =
pytest>=6.2,==6.*
pytest-cov>=3.0,==3.*
pytest>=8.0,==8.*
pytest-cov>=5.0,==5.*
approvaltests
dev =
python-terrier
ir-datasets

[options.entry_points]
console_scripts =
Expand Down
Loading