Skip to content

Commit

Permalink
fix skeletonization. (#79)
Browse files Browse the repository at this point in the history
* upgrade to Julia 1.4; fix skeletonize by not reversing the coordinate from xyz to zyx;

* fix travis build

* fix Pkg.PackageSpec

* delete installing the package.

* fix documenter build

* drop support of julia1.0
  • Loading branch information
xiuliren authored Jul 6, 2020
1 parent e6f19dd commit 3d66e68
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
docs/build/
Manifest.toml
*.log
*.dat
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ language: julia
os: linux

julia:
- 1.0
- 1.3
- 1.4
- nightly

notifications:
Expand All @@ -14,10 +15,9 @@ install:
- sudo apt-get install -y -qq hdf5-tools

script:
- julia -e 'import Pkg; Pkg.clone("https://github.com/seung-lab/BigArrays.jl.git")'
- julia -e 'import Pkg; Pkg.clone(pwd()); Pkg.test("RealNeuralNetworks", coverage=true)'
- julia -e 'using Pkg; Pkg.add("Documenter")'
- julia -e 'using Pkg; cd(Pkg.dir("RealNeuralNetworks")); include(joinpath("docs", "make.jl"))'
- julia -e 'using Pkg; Pkg.develop(PackageSpec(name="BigArrays", url="https://github.com/seung-lab/BigArrays.jl.git"))'
- julia -e 'using Pkg; Pkg.test("RealNeuralNetworks", coverage=true)'
- julia -e 'using Pkg; Pkg.add("Documenter"); cd(Pkg.dir("RealNeuralNetworks")); include(joinpath("docs", "make.jl"))'


#jobs:
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM julia:1.3
FROM julia:1.4
LABEL maintainer="Jingpeng Wu <[email protected]>" \
function="skeletonization"

Expand All @@ -20,9 +20,11 @@ RUN julia -e 'using Pkg; Pkg.update(); Pkg.instantiate();'
RUN julia -e 'using Pkg; Pkg.develop(PackageSpec(name="BigArrays", url="https://github.com/seung-lab/BigArrays.jl.git"))'
#Pkg.resolve(); \
#Pkg.develop(PackageSpec(url="https://github.com/seung-lab/RealNeuralNetworks.jl.git")); \
RUN julia -e 'using Pkg; Pkg.develop(PackageSpec(name="RealNeuralNetworks", path=pwd())); \

RUN julia -e 'using Pkg; Pkg.develop(PackageSpec(name="RealNeuralNetworks", path=joinpath(pwd(), "RealNeuralNetworks"))); \
Pkg.develop("RealNeuralNetworks"); Pkg.instantiate();'
# install registered packages later

RUN julia -e 'using Pkg; Pkg.add("LightGraphs"); \
Pkg.add("MetaGraphs"); \
Pkg.add("ArgParse");\
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "RealNeuralNetworks"
uuid = "4491297b-8966-5840-8cb9-b189d60f3398"
version = "1.0.1"
version = "1.3.1"

[deps]
BigArrays = "c2a8506f-1b35-5b08-8aa1-bb4a7b47a05e"
Expand Down
26 changes: 20 additions & 6 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
using Documenter, RealNeuralNetworks
using Documenter
using RealNeuralNetworks
using RealNeuralNetworks.Neurons
using RealNeuralNetworks.Neurons.Segments
using RealNeuralNetworks.Neurons.Segments.Synapses
using RealNeuralNetworks.SWCs

# The DOCSARGS environment variable can be used to pass additional arguments to make.jl.
# This is useful on CI, if you need to change the behavior of the build slightly but you
# can not change the .travis.yml or make.jl scripts any more (e.g. for a tag build).
if haskey(ENV, "DOCSARGS")
for arg in split(ENV["DOCSARGS"])
(arg in ARGS) || push!(ARGS, arg)
end
end

makedocs(
modules=[RealNeuralNetworks, Neurons, Segments, Synapses, SWCs],
sitename="RealNeuralNetworks.jl",
authors="Jingpeng Wu",
format=:html,
format = Documenter.HTML(
# Use clean URLs, unless built as a "local" build
prettyurls = !("local" in ARGS),
canonical = "https://seung-lab.github.io/RealNeuralNetworks.jl/latest/",
assets = ["assets/favicon.ico"],
analytics = "UA-136089579-2",
highlights = ["yaml"],
),
linkcheck = !("skiplinks" in ARGS),
pages = [
"Home" => "index.md",
"Manual" => Any[
Expand All @@ -26,15 +44,11 @@ makedocs(
],
"man/contributing.md",
],
# use clean URLs, unless built as a "local" build
html_prettyurls = !("local" in ARGS),
html_canonical = "https://seung-lab.github.io/RealNeuralNetworks.jl/latest",
)

deploydocs(
repo="github.com/seung-lab/RealNeuralNetworks.jl",
target="build",
julia="0.7",
deps=nothing,
make=nothing
)
2 changes: 1 addition & 1 deletion scripts/skeletonize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end

function parse_commandline()
s = ArgParseSettings()
@add_arg_table s begin
@add_arg_table! s begin
"--neuronid", "-i"
help = "the segment id to skeletonize"
arg_type = Int
Expand Down
2 changes: 1 addition & 1 deletion src/Manifests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function Manifest( ranges::Vector, ba::BigArray{D,T} ) where {D,T}
rangesList = map( BigArrays.Indexes.string2unit_range, ranges )
# convert from z,y,x to x,y,z
# this is due to a bug in chunkflow, we should not need this in the future
rangesList = map( reverse, rangesList)
# rangesList = map( reverse, rangesList)
@show rangesList
Manifest( ba, obj_id, rangesList )
end
Expand Down
6 changes: 3 additions & 3 deletions src/Utils/RangeIndexingArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ function range_string_list2septa_list(rangeStringList::Vector)
septaList
end

@inline function range_string_list2septa_list(rangeStringList::CSV.Column{String, String})
range_string_list2septa_list(map(string, rangeStringList))
end
#@inline function range_string_list2septa_list(rangeStringList::CSV.Column{String, String})
# range_string_list2septa_list(map(string, rangeStringList))
#end


"""
Expand Down

0 comments on commit 3d66e68

Please sign in to comment.