Skip to content

Commit

Permalink
Merge pull request #82 from HelmholtzAI-Consultants-Munich/include-hi…
Browse files Browse the repository at this point in the history
…gher-python

include python 3.11 in ci/cd tests
  • Loading branch information
christinab12 authored Feb 26, 2024
2 parents a0c9f52 + d01043e commit cf51bfe
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 12 deletions.
42 changes: 41 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.9, "3.10"]
python-version: [3.9, "3.10", "3.11"]
env:
DISPLAY: ':99.0'
steps:
Expand Down Expand Up @@ -114,4 +114,44 @@ jobs:
files: src/server/coverage.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}


deploy:
# this will run when you have tagged a commit, starting with "v*"
# and requires that you have put your twine API key in your
# github secrets (see readme for details)
needs: [test_client, test_server]
runs-on: ubuntu-latest
if: contains(github.ref, 'tags')
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine
pip install build
- name: Build and publish dcp_client
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
run: |
git tag
python -m build .
twine upload dist/*
working-directory: src/client

- name: Build and publish dcp_server
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }}
run: |
git tag
python -m build .
twine upload dist/*
working-directory: src/server

7 changes: 7 additions & 0 deletions src/client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ The client of our data centric platform for microscopy imaging.
![stability-wip](https://img.shields.io/badge/stability-work_in_progress-lightgrey.svg)

## How to use?

### Installation
This has been tested on Python versions 3.9, 3.10 and 3.11 on latest versions of Windows, Ubuntu and MacOS. In your dedicated environment run:
```
pip install dcp_client
```

### Installation for developers
Before starting, make sure you have navigated to ```data-centric-platform/src/client```. All future steps expect you are in the client directory. This installation has been tested using a conda environment with python version 3.9 on a mac local machine. In your dedicated environment run:
```
pip install -e .
Expand Down
21 changes: 10 additions & 11 deletions src/client/test/test_main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,13 @@ def cleanup_files(request):
# This code runs after all tests from all files have completed
yield
# Clean up
for fname in os.listdir('train_data_path'):
os.remove(os.path.join('train_data_path', fname))
os.rmdir('train_data_path')

for fname in os.listdir('in_prog'):
os.remove(os.path.join('in_prog', fname))
os.rmdir('in_prog')

for fname in os.listdir('eval_data_path'):
os.remove(os.path.join('eval_data_path', fname))
os.rmdir('eval_data_path')
paths_to_clean = ['train_data_path', 'in_prog', 'eval_data_path']
for path in paths_to_clean:
try:
for fname in os.listdir(path):
os.remove(os.path.join(path, fname))
os.rmdir(path)
except FileNotFoundError: pass
except Exception as e:
# Handle other exceptions
print(f"An error occurred while cleaning up {path}: {e}")
6 changes: 6 additions & 0 deletions src/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ The client and server communicate via the [bentoml](https://www.bentoml.com/?gcl
## How to use?

### Installation
This has been tested on Python versions 3.9, 3.10 and 3.11 on latest versions of Windows, Ubuntu and MacOS. In your dedicated environment run:
```
pip install dcp_server
```

### Installation for developers
Before starting make sure you have navigated to ```data-centric-platform/src/server```. All future steps expect you are in the server directory. In your dedicated environment run:
```
pip install -e .
Expand Down

0 comments on commit cf51bfe

Please sign in to comment.