-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
600 additions
and
504 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: CompatHelper | ||
|
||
on: | ||
schedule: | ||
- cron: '00 00 * * *' | ||
|
||
jobs: | ||
CompatHelper: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
julia-version: [1.3.0] | ||
julia-arch: [x86] | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: julia-actions/setup-julia@latest | ||
with: | ||
version: ${{ matrix.julia-version }} | ||
- name: Pkg.add("CompatHelper") | ||
run: julia -e 'using Pkg; Pkg.add("CompatHelper")' | ||
- name: CompatHelper.main() | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: julia -e 'using CompatHelper; CompatHelper.main()' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Unit test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
julia-version: ['1.0', '1.1', '1.2', '1.3', 'nightly'] | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v1.0.0 | ||
- name: "Set up Julia" | ||
uses: julia-actions/setup-julia@v1 | ||
with: | ||
version: ${{ matrix.julia-version }} | ||
|
||
- name: "Unit Test" | ||
uses: julia-actions/julia-runtest@master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
_build/ | ||
_static/ | ||
_templates | ||
/Manifest.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,14 @@ | ||
# Documentation: http://docs.travis-ci.com/user/languages/julia/ | ||
## Documentation: http://docs.travis-ci.com/user/languages/julia/ | ||
# Only used to upload coverage report | ||
language: julia | ||
os: | ||
- linux | ||
- osx | ||
julia: | ||
- 0.6 | ||
- nightly | ||
matrix: | ||
allow_failures: | ||
- julia: nightly | ||
git: | ||
depth: 5000 | ||
- 1.0 | ||
notifications: | ||
email: false | ||
# uncomment the following lines to override the default test script | ||
script: | ||
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi | ||
- julia -e 'Pkg.clone(pwd()); Pkg.build("Augmentor"); Pkg.test("Augmentor"; coverage=VERSION < v"0.7.0-")' | ||
git: | ||
depth: 99999999 | ||
|
||
after_success: | ||
# push coverage results to Coveralls | ||
- julia -e 'if VERSION < v"0.7.0-" cd(Pkg.dir("Augmentor")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder()); end' | ||
- julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder())' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name = "Augmentor" | ||
uuid = "02898b10-1f73-11ea-317c-6393d7073e15" | ||
authors = ["Christof Stocker <stocker.christof@gmail.com>"] | ||
version = "0.6.0-pre" | ||
|
||
[deps] | ||
ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f" | ||
ComputationalResources = "ed09eef8-17a6-5b46-8889-db040fac31e3" | ||
CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298" | ||
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" | ||
IdentityRanges = "bbac6d45-d8f3-5730-bfe4-7a449cd117ca" | ||
ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534" | ||
ImageFiltering = "6a3955dd-da59-5b1f-98d4-e7296123deb5" | ||
ImageTransformations = "02fcd773-0e25-5acc-982a-7f6622650795" | ||
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" | ||
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
MLDataPattern = "9920b226-0b2a-5f5f-9153-9aa70a013f8b" | ||
MappedArrays = "dbb5928d-eab1-5f90-85c2-b9b0edb7c900" | ||
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" | ||
Rotations = "6038ab10-8711-5258-84ad-4b1120ba62dc" | ||
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" | ||
|
||
[compat] | ||
ColorTypes = "0.7, 0.8" | ||
ComputationalResources = "0.3" | ||
CoordinateTransformations = "0.5" | ||
FileIO = "1" | ||
IdentityRanges = "0.3" | ||
ImageCore = "0.8.1" | ||
ImageFiltering = "0.4, 0.5, 0.6" | ||
ImageTransformations = "0.5, 0.6, 0.7, 0.8" | ||
Interpolations = "0.8, 0.9, 0.10, 0.11, 0.12" | ||
MLDataPattern = "0.4, 0.5" | ||
MappedArrays = "0.1, 0.2" | ||
OffsetArrays = "0.8, 0.9, 0.10, 0.11" | ||
Rotations = "0.7, 0.8, 0.9, 0.10, 0.11, 0.12" | ||
StaticArrays = "0.8, 0.9, 0.10, 0.11, 0.12" | ||
julia = "1" | ||
|
||
[extras] | ||
ImageDistances = "51556ac3-7006-55f5-8cb3-34580c88182d" | ||
ImageInTerminal = "d8c32880-2388-543b-8c61-d9f865259254" | ||
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1" | ||
ReferenceTests = "324d217c-45ce-50fc-942e-d289b448e8cf" | ||
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
TestImages = "5e47fb64-e119-507b-a336-dd2b206d9990" | ||
|
||
[targets] | ||
test = ["ImageDistances", "ImageInTerminal", "ImageMagick", "ReferenceTests", "Statistics", "TestImages", "Test"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
if VERSION >= v"1.3" | ||
const safe_rand = rand | ||
else | ||
# rand is thread safe after julia 1.3 | ||
# TODO: delete this when we decide to drop 1.0 compatibility | ||
|
||
# -------------------------------------------------------------------- | ||
# rand() is not threadsafe (https://discourse.julialang.org/t/4683) | ||
|
||
# Because we only require random numbers to sample parameters | ||
# and not the actual expensive computation, this seems like a better | ||
# approach than using separate RNG per thread. | ||
const rand_mutex = Ref{Threads.Mutex}() | ||
|
||
# constant overhead of about 80 ns compared to unsafe rand | ||
function safe_rand(args...) | ||
lock(rand_mutex[]) | ||
result = rand(args...) | ||
unlock(rand_mutex[]) | ||
result | ||
end | ||
end | ||
|
||
# issue #39 | ||
if all(map((FixedPoint, Normed)) do T | ||
isempty(methodswith(AbstractArray{<:T}, Interpolations.tweight)) | ||
end) | ||
# Reached when upstream package (e.g., FixedPoint) doesn't provide a specialization | ||
Interpolations.tweight(A::AbstractArray{T}) where T<:FixedPoint = T | ||
end |
Oops, something went wrong.