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

feat: lean package for testing build #423

Closed
wants to merge 7 commits into from
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.11'
- name: update pip
run: python -m pip install -U pip
- name: install python deps
run: python -m pip install -U numpy==1.23 scikit-image==0.20.0 pyproj==3.6.0 rasterio==1.3.7 requests==2.31.0 skyfield==1.45.0 pandas==2 jinja2==3.1
run: python -m pip install -U -r requirements.txt
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/doc-preview-cleanup.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/documentation.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/trigger-docker-julia.yml

This file was deleted.

8 changes: 8 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
numpy==1.23.2
scikit-image==0.20.0
pyproj==3.6.0
rasterio==1.3.7
requests==2.31.0
skyfield==1.45.0
pandas==2.1
jinja2==3.1
107 changes: 3 additions & 104 deletions src/IceFloeTracker.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,6 @@ export DataFrames, DataFrame, nrow, Not, select!
export Dates, Time, Date, DateTime, @dateformat_str
export addlatlon!, getlatlon, convertcentroid!, converttounits!, dropcols!

include("utils.jl")
include("persist.jl")
include("landmask.jl")
include("cloudmask.jl")
include("normalization.jl")
include("ice-water-discrimination.jl")
include("anisotropic_image_diffusion.jl")
include("bwtraceboundary.jl")
include("resample-boundary.jl")
include("psi-s.jl")
include("crosscorr.jl")
include("register-mismatch.jl")
include("bwareamaxfilt.jl")
include("hbreak.jl")
include("bridge.jl")
include("branch.jl")
include("special_strels.jl")

const sk_measure = PyNULL()
const getlatlon = PyNULL()

Expand All @@ -90,90 +72,7 @@ function __init__()
end

include("regionprops.jl")
include("segmentation_a_direct.jl")
include("segmentation_b.jl")
include("segmentation_watershed.jl")
include("bwperim.jl")
include("find_ice_labels.jl")
include("segmentation_f.jl")
include("tracker/tracker-funcs.jl")
include("tracker/matchcorr.jl")
include("tracker/tracker.jl")

"""
MorphSE

Module for morphological operations with structuring element functionality adapted from ImageMorphology v0.4.3.

This module is temporary until v0.5 of ImageMorphology is released.

Main functionality is `dilate(img, se)` for landmask computations.

# Example

```jldoctest; setup = :(using IceFloeTracker)
julia> a = zeros(Int, 11, 11); a[6, 6] = 1;

julia> a
11×11 Matrix{Int64}:
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0

julia> se = trues(5,5);

julia> IceFloeTracker.MorphSE.dilate(a, se)
11×11 Matrix{Int64}:
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 1 1 1 1 0 0 0
0 0 0 1 1 1 1 1 0 0 0
0 0 0 1 1 1 1 1 0 0 0
0 0 0 1 1 1 1 1 0 0 0
0 0 0 1 1 1 1 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
```
"""
module MorphSE
using ImageCore
using ColorTypes
using LoopVectorization
using OffsetArrays
using TiledIteration: EdgeIterator
using DataStructures
include("morphSE/StructuringElements.jl")
using .StructuringElements
include("morphSE/extreme_filter.jl")
include("morphSE/utils.jl")
include("morphSE/dilate.jl")
include("morphSE/erode.jl")
include("morphSE/opening.jl")
include("morphSE/closing.jl")
include("morphSE/bothat.jl")
include("morphSE/mreconstruct.jl")
include("morphSE/fill_holes.jl")
end

module Register
include("Register/CenterIndexedArrays.jl-0.2.0/CenterIndexedArrays.jl")
include("Register/RegisterCore.jl-0.2.4/src/RegisterCore.jl")
include("Register/RegisterMismatchCommon.jl-master/RegisterMismatchCommon.jl")
include("Register/RegisterUtilities.jl-master/RegisterUtilities.jl")
include("Register/RFFT.jl-master/RFFT.jl")
include("Register/RegisterDeformation.jl-0.4.4/RegisterDeformation.jl")
include("Register/QuadDIRECT.jl-master/QuadDIRECT.jl")
include("Register/RegisterQD.jl-0.3.1/RegisterQD.jl")
include("Register/RegisterMismatch.jl-0.4.0/RegisterMismatch.jl")
end
include("utils.jl")
include("persist.jl")
include("bwareamaxfilt.jl")
end
10 changes: 5 additions & 5 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,20 @@ include("config.jl")

# Setting things up (see config.jl)

## Get all test files filenames "test-*" in test folder and their corresponding names/label
## Get all test files filenames "test-*" in test folder and their corresponding names/label
alltests = [f for f in readdir() if startswith(f, "test-")]
testnames = [n[6:(end - 3)] for n in alltests]

## Put the filenames to test below

to_test = alltests # uncomment this line to run all tests or add individual files below
to_test = #alltests # uncomment this line to run all tests or add individual files below
[
# "test-create-landmask.jl",
# "test-create-cloudmask.jl",
# "test-normalize-image.jl",
# "test-persist.jl",
# "test-utils-padding.jl",
"test-persist.jl",
"test-utils-padding.jl",
"test-regionprops.jl",
# "test-discrim-ice-water.jl",
# "test-find-ice-labels.jl",
# "test-segmentation-a.jl",
Expand All @@ -33,7 +34,6 @@ to_test = alltests # uncomment this line to run all tests or add individual file
# "test-segmentation-f.jl",
# "test-bwtraceboundary.jl",
# "test-resample-boundary.jl",
# "test-regionprops.jl",
# "test-psi-s.jl",
# "test-crosscorr.jl"
# "test-bwperim.jl",
Expand Down
Loading