Skip to content

Commit

Permalink
attempting to update flows
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmanderson committed Aug 16, 2024
1 parent ec556a3 commit f5861d7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 49 deletions.
42 changes: 18 additions & 24 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,34 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package
name: Publish Python Package

on:
release:
types: [published]

permissions:
contents: read
push:
tags:
- 'v*' # Triggers the workflow on tag pushes that match the pattern v*

jobs:
deploy:

build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4 # Update to the latest version

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v5 # Update to the latest version
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m pip install --upgrade twine
python -m twine upload dist/*
36 changes: 12 additions & 24 deletions Examples/DICOMRTTool_Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 1,
"metadata": {
"pycharm": {
"name": "#%%\n"
Expand Down Expand Up @@ -147,7 +147,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 4,
"metadata": {
"pycharm": {
"name": "#%%\n"
Expand All @@ -160,20 +160,11 @@
"text": [
"Zipped images already downloaded.\n",
"Unzipping images...\n",
"Estimated unzip time is 2 minutes\n"
]
},
{
"ename": "BadZipFile",
"evalue": "File is not a zip file",
"output_type": "error",
"traceback": [
"\u001B[1;31m---------------------------------------------------------------------------\u001B[0m",
"\u001B[1;31mBadZipFile\u001B[0m Traceback (most recent call last)",
"File \u001B[1;32m<timed exec>:19\u001B[0m, in \u001B[0;36m<module>\u001B[1;34m\u001B[0m\n",
"File \u001B[1;32mc:\\users\\b5anderson\\appdata\\local\\programs\\python\\python38\\lib\\zipfile.py:1269\u001B[0m, in \u001B[0;36mZipFile.__init__\u001B[1;34m(self, file, mode, compression, allowZip64, compresslevel, strict_timestamps)\u001B[0m\n\u001B[0;32m 1267\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[0;32m 1268\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m mode \u001B[38;5;241m==\u001B[39m \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mr\u001B[39m\u001B[38;5;124m'\u001B[39m:\n\u001B[1;32m-> 1269\u001B[0m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_RealGetContents\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m\n\u001B[0;32m 1270\u001B[0m \u001B[38;5;28;01melif\u001B[39;00m mode \u001B[38;5;129;01min\u001B[39;00m (\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mw\u001B[39m\u001B[38;5;124m'\u001B[39m, \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mx\u001B[39m\u001B[38;5;124m'\u001B[39m):\n\u001B[0;32m 1271\u001B[0m \u001B[38;5;66;03m# set the modified flag so central directory gets written\u001B[39;00m\n\u001B[0;32m 1272\u001B[0m \u001B[38;5;66;03m# even if no files are added to the archive\u001B[39;00m\n\u001B[0;32m 1273\u001B[0m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_didModify \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;01mTrue\u001B[39;00m\n",
"File \u001B[1;32mc:\\users\\b5anderson\\appdata\\local\\programs\\python\\python38\\lib\\zipfile.py:1336\u001B[0m, in \u001B[0;36mZipFile._RealGetContents\u001B[1;34m(self)\u001B[0m\n\u001B[0;32m 1334\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m BadZipFile(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mFile is not a zip file\u001B[39m\u001B[38;5;124m\"\u001B[39m)\n\u001B[0;32m 1335\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;129;01mnot\u001B[39;00m endrec:\n\u001B[1;32m-> 1336\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m BadZipFile(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mFile is not a zip file\u001B[39m\u001B[38;5;124m\"\u001B[39m)\n\u001B[0;32m 1337\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mdebug \u001B[38;5;241m>\u001B[39m \u001B[38;5;241m1\u001B[39m:\n\u001B[0;32m 1338\u001B[0m \u001B[38;5;28mprint\u001B[39m(endrec)\n",
"\u001B[1;31mBadZipFile\u001B[0m: File is not a zip file"
"Estimated unzip time is 2 minutes\n",
"Done unzipping images.\n",
"All required files downloaded and unzipped!\n",
"CPU times: total: 31.8 s\n",
"Wall time: 36.1 s\n"
]
}
],
Expand Down Expand Up @@ -296,8 +287,7 @@
"metadata": {
"pycharm": {
"name": "#%%\n"
},
"scrolled": false
}
},
"outputs": [],
"source": [
Expand All @@ -313,8 +303,7 @@
"metadata": {
"pycharm": {
"name": "#%%\n"
},
"scrolled": false
}
},
"outputs": [
{
Expand Down Expand Up @@ -507,8 +496,7 @@
"metadata": {
"pycharm": {
"name": "#%%\n"
},
"scrolled": false
}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -1164,9 +1152,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.8.0"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
}
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ recursive-include src *.dcm
recursive-include src *.ipynb
recursive-include src *.py
recursive-include src *.txt
include requirements.txt
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ check-manifest
tqdm~=4.64.0
pytest

PlotScrollNumpyArrays~=0.0.1
PlotScrollNumpyArrays
setuptools~=62.1.0

0 comments on commit f5861d7

Please sign in to comment.