Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
ece2735
adds a flow data generator specific for segmentation tasks, and a ima…
Sajtospoga01 Mar 12, 2023
70186e1
add instructions to readme on installation
Sajtospoga01 Mar 12, 2023
31746d6
updates gitignore to cover python cache files, adds image onehot enco…
Sajtospoga01 Mar 12, 2023
0b247a6
separates seed variables out of flowreader.py and image_encoder.py
Sajtospoga01 Mar 13, 2023
144ea68
Merge pull request #11 from guorbit/tests
Sajtospoga01 Mar 13, 2023
57435b3
changes the package name from image_encoder to ImagePreprocessor, rem…
Sajtospoga01 Mar 13, 2023
c63f988
adds tests for preprocessing queue
Sajtospoga01 Mar 13, 2023
e16aa57
formats testing queue
Sajtospoga01 Mar 13, 2023
24ecb3c
adds test for main flowreader
Sajtospoga01 Mar 14, 2023
a2086ec
remove dependency of main flowreader test on preprocess function
Sajtospoga01 Mar 14, 2023
87a3db7
adds test for preprocessing function in flowgenerator
Sajtospoga01 Mar 14, 2023
3d2a4d7
add todo to flow reader test
Sajtospoga01 Mar 14, 2023
4411ea2
adds tests for the processing pipeline, adds functionality for the au…
Sajtospoga01 Mar 14, 2023
6d5941d
updates preprocessing pipeline to reshape images in the pipeline for …
Sajtospoga01 Mar 14, 2023
7845371
adds tests for flow generator
Sajtospoga01 Mar 14, 2023
b6e7ce9
updates flowreader, and imagepreprocessor to accept both column tenso…
Sajtospoga01 Mar 15, 2023
c4dc9dd
abstract lambda mock functions and generator arguments to variable fo…
Sajtospoga01 Mar 15, 2023
226876f
update condition for get_generator test, adds extra comments
Sajtospoga01 Mar 15, 2023
09ea838
add tests for imagepreprocessor to test if no default queue is provid…
Sajtospoga01 Mar 15, 2023
45f75c5
adds new test to image_preprocessor, adds requirements
Sajtospoga01 Mar 15, 2023
5a1f02b
Merge pull request #15 from guorbit/processing_queue_dataclass
Sajtospoga01 Mar 15, 2023
3724ed9
adds valueerror testing for flowreader output values
Sajtospoga01 Mar 15, 2023
7f23911
adds random state for the image augmentation pipeline
Sajtospoga01 Mar 15, 2023
aeb4dc9
updates documentation
Sajtospoga01 Mar 15, 2023
4670bf9
update gitignore and update documentation on flowreader
Sajtospoga01 Mar 15, 2023
77cbb92
Create LICENSE
Sajtospoga01 Mar 15, 2023
8a2f96e
adds documentation files, adds rst files to gitignore
Sajtospoga01 Mar 16, 2023
b966ebe
update documentation theme
Sajtospoga01 Mar 16, 2023
fe59467
updates documentation to include all packages on the index page
Sajtospoga01 Mar 16, 2023
6602376
updates styling of the documentation
Sajtospoga01 Mar 16, 2023
4b0bdb0
Create .github/workflows/static.yml
Sajtospoga01 Mar 16, 2023
6eddc04
Merge pull request #18 from guorbit/Sajtospoga01-patch-2
Sajtospoga01 Mar 16, 2023
bdd5040
updates deployment configuration
Sajtospoga01 Mar 16, 2023
80db988
Update static.yml
Sajtospoga01 Mar 16, 2023
589e859
Update static.yml
Sajtospoga01 Mar 16, 2023
7fe3f03
Update static.yml
Sajtospoga01 Mar 16, 2023
e84bad4
update CD to save artifacts between jobs
Sajtospoga01 Mar 16, 2023
dded00c
update path for pages
Sajtospoga01 Mar 16, 2023
04ab41b
update documentation on utilities repo
Sajtospoga01 Mar 17, 2023
dbd4eb0
remove pregenerated modules
Sajtospoga01 Mar 17, 2023
01a7178
updates CD pipeline
Sajtospoga01 Mar 17, 2023
9ebf9b3
add extension to sphinx to allow parsion of multiple documentation types
Sajtospoga01 Mar 18, 2023
44b5619
removes unnecessary import
Sajtospoga01 Mar 18, 2023
ebb5fc8
adds setup.py for build specification
Sajtospoga01 Mar 18, 2023
51a7015
fixes bug in flow reader and agumentation pipeline that causes masks …
Sajtospoga01 Mar 18, 2023
9c06dbe
remove napoleon from sphinx
Sajtospoga01 Mar 18, 2023
cc94418
updates tests to mainly rely on tensors, and to adapt to the changes …
Sajtospoga01 Mar 18, 2023
79df3ee
Merge branch 'sphinx_documentation' of github.com:guorbit/utilities i…
Sajtospoga01 Mar 18, 2023
3f6ffcc
moves documentation branch to staging
Sajtospoga01 Mar 18, 2023
c208828
Merge pull request #20 from guorbit/sphinx_documentation
Sajtospoga01 Mar 18, 2023
40aaf0c
updates flowreader to generate the default queue instead of augmentat…
Sajtospoga01 Mar 18, 2023
968be45
fixes bug in flowreader where some important variable assignments wer…
Sajtospoga01 Mar 18, 2023
f47bb25
point documentation to master temporarily
Sajtospoga01 Mar 18, 2023
349ab63
adds seed assignment in preprocess
Sajtospoga01 Mar 18, 2023
abdd648
adds karg assignment for preprocessor call
Sajtospoga01 Mar 18, 2023
e67f9f1
adds ability to disable the preprocessing pipeline
Sajtospoga01 Mar 18, 2023
ccf7e94
updates image preprocessor and flowreader to comply with linting
Sajtospoga01 Mar 18, 2023
65c7ba4
adds pylint configuration file
Sajtospoga01 Mar 18, 2023
18d88ee
updates flowreader test for proper linting
Sajtospoga01 Mar 19, 2023
bb4c1cf
updates linting on image_preprocessor_test
Sajtospoga01 Mar 19, 2023
6d80db9
updates environment name of documentation environment
Sajtospoga01 Mar 19, 2023
a211592
checkout changes
Sajtospoga01 Mar 19, 2023
060a58c
update documentation deployment workflow to only trigger on main
Sajtospoga01 Mar 19, 2023
6e26011
test pipeline status badge
Sajtospoga01 Mar 19, 2023
3473774
Update python-app.yml
Sajtospoga01 Mar 19, 2023
f59ea5d
Merge pull request #21 from guorbit/Sajtospoga01-patch-2
Sajtospoga01 Mar 19, 2023
58f1828
updates image transform tools with to match the new documentation sta…
Sajtospoga01 Mar 19, 2023
ee6ec85
Merge pull request #17 from guorbit/Sajtospoga01-patch-1
Jan-Loettgen Mar 19, 2023
ee03281
Merge pull request #16 from guorbit/migrating_segmentation_utils
Jan-Loettgen Mar 19, 2023
7213e03
update linting, updates directories to be initialized, by py
Sajtospoga01 Mar 21, 2023
46b8301
possible fix to bug in image cutter where it doesnt pass test, adds e…
Sajtospoga01 Mar 21, 2023
d5cc718
removes unnecessary import
Sajtospoga01 Mar 21, 2023
bec72e7
updates experimental cutter to remove slack
Sajtospoga01 Mar 21, 2023
50d09d6
Adds error handing tests for image cutter
Sajtospoga01 Mar 22, 2023
46921a4
updates tests for image cutter
Sajtospoga01 Mar 22, 2023
6823508
Adds precommit configuration file to catch bad git commit messages
Sajtospoga01 Mar 25, 2023
6ac7692
Create LICENSE
Sajtospoga01 Mar 15, 2023
d4e6369
updates github ci to run stages sequentially, adds coverage, and lint…
Sajtospoga01 Mar 25, 2023
ab1e621
fixes possible error in the github CI configuration
Sajtospoga01 Mar 25, 2023
6382026
possibly addresses issue with coverage file not uploading
Sajtospoga01 Mar 25, 2023
95e5326
possibly addresses crash in github CI when running image cutting test
Sajtospoga01 Mar 25, 2023
ef32313
updates requirements.txt to include additionaly packages
Sajtospoga01 Mar 25, 2023
1cc3c7c
possibly addresses the issue when CI can't find package by buidling it
Sajtospoga01 Mar 25, 2023
950a5b5
add secretkey reference to github ci for codecov
Sajtospoga01 Mar 25, 2023
078b9ce
Update README.md badges to point to main
Sajtospoga01 Mar 25, 2023
dfed950
Create README.md
Sajtospoga01 Mar 25, 2023
f8be4a9
Merge pull request #25 from guorbit/ci-update
Sajtospoga01 Mar 25, 2023
bc23f33
updates tests for image cutter, fixes bug in image cutter experimenta…
Sajtospoga01 Mar 26, 2023
8a07108
update readme with up to date instructions
Sajtospoga01 Mar 26, 2023
c2e5b1b
updates runner to install all test dependencies
Sajtospoga01 Mar 26, 2023
585d8fe
renames workflow name to master
Sajtospoga01 Mar 26, 2023
f1199a3
updates image_cutting_test to pass linting
Sajtospoga01 Mar 26, 2023
f41198d
fixes small erros in code
Sajtospoga01 Apr 1, 2023
442feec
fixes linting and, and adds documentation, modify loader to read in b…
Sajtospoga01 Apr 3, 2023
19205bb
updates requirements.txt to include tqdm and gitignore to ignore imag…
Sajtospoga01 Apr 3, 2023
0fa507b
Create clean.yml
Sajtospoga01 Apr 3, 2023
4ea566f
Merge pull request #27 from guorbit/Sajtospoga01-patch-1
Sajtospoga01 Apr 3, 2023
60ede87
updates file format of the images to tiff for much much faster export
Sajtospoga01 Apr 16, 2023
ca6dc1a
Removes unnecessary print statement from image cutting, adds function…
Sajtospoga01 Apr 17, 2023
34a4d59
remove unnecessary print statement from image stats
Sajtospoga01 Apr 17, 2023
1f6206a
fixes errors in typing, fixes possible error where preprocessing seed…
Sajtospoga01 May 6, 2023
9923975
update tests, and documentation to pass
Sajtospoga01 May 6, 2023
8976d09
removes white spaces, and changes similarly named variables
Sajtospoga01 May 6, 2023
c182195
cleans up documentation for better displayability
Sajtospoga01 May 9, 2023
9ffc0f1
remove privatization of preprocessing function in flowreader.py
Sajtospoga01 May 9, 2023
66ef5b1
add code-workspace file
Sajtospoga01 May 16, 2023
9da4f10
update typing
Sajtospoga01 May 19, 2023
3b46894
fix error when assigning data to tensor
Sajtospoga01 May 19, 2023
1da4580
fixes docs in image stats, updates image stats to able to export doc …
Sajtospoga01 May 19, 2023
7d0b1b1
fixes linting errors in image_stats
Sajtospoga01 May 19, 2023
c1a8e32
Merge pull request #26 from guorbit/refactoring-image-tools
Jan-Loettgen Jun 2, 2023
1ea5efc
updates image preprocessor by removing squeezing from onehot encode m…
Sajtospoga01 May 23, 2023
6a37482
adds experimental implementation of the flowreader object changing th…
Sajtospoga01 May 23, 2023
3ee7736
updates flowreader experimental to run with training
Sajtospoga01 May 23, 2023
952ed85
specifies datatypes for the mask store array
Sajtospoga01 May 24, 2023
f913e50
removes uint declaration
Sajtospoga01 May 24, 2023
7cc5ae3
fixes possible indexing issue and changes default reader library from…
Sajtospoga01 May 25, 2023
39fd65b
adds bicubic interpolation to the image reader
Sajtospoga01 May 25, 2023
38e16a9
removes some unnecessary things
Sajtospoga01 May 25, 2023
10653a9
adds possible fix for image flips not being determinable
Sajtospoga01 May 25, 2023
0c58719
adds function to validate dataset
Sajtospoga01 May 25, 2023
bea1882
updates, flowreader and processing pipeline to be able to read images
Sajtospoga01 Jun 1, 2023
1068f61
Improves code quality, updates documentation
Sajtospoga01 Jun 4, 2023
4ee21bd
update flowgenerator so it reads weights, doesnt return them
Sajtospoga01 Jun 6, 2023
2eed73a
adds sorting to weight reader
Sajtospoga01 Jun 6, 2023
591c276
fixes dtype errors in image preprocessor casting, and fixes weight re…
Sajtospoga01 Jun 6, 2023
1dfaa9d
update tests to fit new changes, add pd to requirements
Sajtospoga01 Jun 26, 2023
fad0b63
add arguments to image cutting loop so parameters are changable
Sajtospoga01 Jun 26, 2023
f3c59f2
in __len__ function added self.mini_batch
AyleenSohaib Jul 30, 2023
81c5efc
Merge pull request #40 from guorbit/reader_reimplementation
AyleenSohaib Jul 30, 2023
c54b79a
Class variables moved to constructor to make them instance variables.
AyleenSohaib Jul 31, 2023
a755c68
Merge pull request #52 from guorbit/flowreader_class_to_inst_var
Sajtospoga01 Aug 1, 2023
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
33 changes: 33 additions & 0 deletions .github/workflows/clean.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: cleanup caches by a branch
on:
pull_request:
types:
- closed

jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Cleanup
run: |
gh extension install actions/gh-actions-cache

REPO=${{ github.repository }}
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"

echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )

## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63 changes: 52 additions & 11 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application
name: master

on:
push:
Expand All @@ -13,27 +13,68 @@ permissions:
contents: read

jobs:
build:

dependency-install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

test:
needs: dependency-install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
pip install pytest pytest-mock
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
python -m pytest

devops:
needs: test
environment: development
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with pylint
run: |
pip install pylint
pylint --fail-under=9.8 --rcfile=.pylintrc utilities
- name: code coverage
run: |
mkdir -p ./coverage
pip install pytest-cov pytest-mock
python -m pytest --cov --cov-report=xml:./coverage/coverage.xml

- name: Upload coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./coverage/coverage.xml # optional
79 changes: 79 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy Documentation on Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -U sphinx
pip install furo

- name: Build documentation
run: |
cd docs


sphinx-apidoc -e -M --force -o . ..
make html
- name: Upload build data
uses: actions/upload-artifact@v3
with:
name: documentation
path: ./docs/_build/html

deploy:
needs: build
environment:
name: documentation
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Download built directory
uses: actions/download-artifact@v3
with:
name: documentation
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
with:
folder: build
145 changes: 145 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
/archive/
/archive_resized/
/checkpoints/
/exported_models/
archive.lnk

colab_notebook.ipynb
/.vscode/

/cut_ims/
/ims/

/cut_masks/
/masks/


17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

repos:


# - repo: https://github.com/jendrikseipp/vulture
# rev: v2.3
# hooks:
# # dead code detector
# - id: vulture

- repo: https://github.com/jorisroovers/gitlint
rev: v0.17.0
hooks:
# git commit message linter
- id: gitlint
Loading