Skip to content

Commit

Permalink
Ad-hoc package
Browse files Browse the repository at this point in the history
  • Loading branch information
uw0s committed Apr 11, 2024
1 parent f1cb5bd commit c829ed1
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,20 @@ jobs:
uses: actions/checkout@v4
- name: Check code and build
run: |
cd python/python/ && make clean check all && cd ../..
cd python/ && make clean check all && cd ..
cd python/python && make clean check all && cd ..
cd python/ && make clean check all && cd ..
pip:
needs: [make]
strategy:
matrix:
os: [ubuntu-20.04, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Check pip installation
run: |
pip install https://api.github.com/repos/valab-certh/meddisc/tarball/main#subdirectory=python
10 changes: 9 additions & 1 deletion python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1337,8 +1337,13 @@ async def handle_submit_button_click(user_options: UserOptionsClass) -> list[Any
def ndarray_size(arr: NDArray[Any]) -> int:
return arr.itemsize * arr.size

def main_cli() -> None:
import fire

if __name__ == "__main__":
fire.Fire(meddisc)


def meddisc() -> None:
tmp_directories = [
Path("tmp/session-data/raw"),
Path("tmp/session-data/clean"),
Expand Down Expand Up @@ -1374,3 +1379,6 @@ def ndarray_size(arr: NDArray[Any]) -> int:
results = pytest.main(["-rA", "-o", "cache_dir=tmp", __file__])
if results.value != 0: # type: ignore[attr-defined]
sys.exit(results)

if __name__ == "__main__":
meddisc()
9 changes: 8 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
dependencies = [
"aiofiles==23.2.1",
"fastapi==0.110.0",
"fire==0.6.0",
"keras-ocr==0.9.3",
"pydicom==2.4.4",
"pylibjpeg-libjpeg==2.1.0",
Expand All @@ -15,7 +16,7 @@ dependencies = [
"torchvision@https://download.pytorch.org/whl/cpu/torchvision-0.17.1%2Bcpu-cp312-cp312-linux_x86_64.whl",
"uvicorn==0.27.1"
]
name = "UNKNOWN"
name = "meddisc"
version = "0.0.0"

[project.optional-dependencies]
Expand All @@ -27,3 +28,9 @@ dev = [
"ssort==0.12.4",
"toml-sort==0.23.1"
]

[project.scripts]
meddisc = "main:main_cli"

[tool.setuptools]
py-modules = ["main"]

0 comments on commit c829ed1

Please sign in to comment.