Comments (18)
The tests could do with a little work. The examples could all be doctests to make sure they actually run (not necessarily testing the output). I see they're already @example
- but does an error in an @example
cause CI to fail? I seem to remember that not happening for me in the past, but I'm not sure.
Also setting checkdocs=:all
and strict=true
in makedocs
can be a good idea to make sure the docs aren't broken. Maybe that will catch errors in @example
as well. But after that yeah!
from neutrallandscapes.jl.
When we do tag, should we just go right ahead and tag version 1.0?
I like to think of 1.0
as "production ready", so maybe we want to tag 0.1, and still allow some flexibility in case we want to adapt the API a bit?
from neutrallandscapes.jl.
We do I think! 🎉
only wondering if we should go just a little deeper on the tests and make sure all the methods are in the docs gallery and all docstrings are defined? 🤔 And adding the page to ecojulia.org, and maybe also hosting it on ecojulia.org/NeutralLandscapes.jl ?
These are the kinds of small maintenance things that tend to get left a little behind unless we self-require them before the tag :-)
from neutrallandscapes.jl.
We have a lot of unexported methods documented, but not included in the docs - and a few things in the docs that aren't found. The unexported docstrings could just be code comments?
┌ Warning: undefined binding '_landscape!' in `@docs` block in src/index.md:22-26
│ ```@docs
│ rand!
│ rand
│ _landscape!
│ ```
└ @ Documenter.Expanders ~/.julia/packages/Documenter/bFHi4/src/Expanders.jl:298
┌ Warning: undefined binding 'mask!' in `@docs` block in src/index.md:30-32
│ ```@docs
│ mask!
│ ```
└ @ Documenter.Expanders ~/.julia/packages/Documenter/bFHi4/src/Expanders.jl:298
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
┌ Error: 25 docstrings not included in the manual:
│
│ NeutralLandscapes.NearestNeighborCluster
│ NeutralLandscapes._landscape! :: Union{Tuple{IT}, Tuple{Any,Union{DiamondSquare, MidpointDisplacement}}} where IT<:Integer
│ NeutralLandscapes._edgeMidpointCoordinates :: Tuple{AbstractArray{Tuple{Int64,Int64},1}}
│ NeutralLandscapes._rescale! :: Tuple{Any}
│ NeutralLandscapes.DiamondSquare :: Tuple{}
│ NeutralLandscapes.DiamondSquare
│ NeutralLandscapes.MidpointDisplacement
│ NeutralLandscapes._isPowerOfTwo :: Union{Tuple{IT}, Tuple{IT}} where IT<:Integer
│ NeutralLandscapes.blend :: Union{Tuple{Any,AbstractArray{T,1} where T}, Tuple{Any,AbstractArray{T,1} where T,AbstractArray{var"#s61",1} where var"#s61"<:Number}}
│ NeutralLandscapes.blend :: Union{Tuple{Any}, Tuple{Any,AbstractArray{var"#s61",1} where var"#s61"<:Number}}
│ NeutralLandscapes._subsquareCornerCoordinates :: Tuple{Int64,Int64,Int64}
│ NeutralLandscapes.label :: Union{Tuple{Any}, Tuple{Any,Any}}
│ NeutralLandscapes.classify! :: Union{Tuple{Any,Any}, Tuple{Any,Any,Any}}
│ NeutralLandscapes._initializeDiamondSquare! :: Tuple{Any,Any}
│ NeutralLandscapes._diamond! :: Tuple{Any,Any,Int64,AbstractArray{Tuple{Int64,Int64},1}}
│ NeutralLandscapes._centerCoordinate :: Tuple{AbstractArray{Tuple{Int64,Int64},1}}
│ NeutralLandscapes._ycoord :: Tuple{Tuple{Int64,Int64}}
│ NeutralLandscapes._square! :: Tuple{Any,MidpointDisplacement,Int64,AbstractArray{Tuple{Int64,Int64},1}}
│ NeutralLandscapes._square! :: Tuple{Any,DiamondSquare,Int64,AbstractArray{Tuple{Int64,Int64},1}}
│ NeutralLandscapes._diamondsquare! :: Tuple{Any,Any}
│ NeutralLandscapes.mask! :: Tuple{AbstractArray{var"#s15",N} where N where var"#s15"<:Float64,AbstractArray{var"#s16",N} where N where var"#s16"<:Bool}
│ NeutralLandscapes.classify :: Union{Tuple{Any,Any}, Tuple{Any,Any,Any}}
│ NeutralLandscapes._xcoord :: Tuple{Tuple{Int64,Int64}}
│ NeutralLandscapes._displace :: Tuple{Float64,Int64}
│ NeutralLandscapes._interpolate :: Tuple{Any,AbstractArray{Tuple{Int64,Int64},1}}
from neutrallandscapes.jl.
agreed!
from neutrallandscapes.jl.
Ok PR on the way
from neutrallandscapes.jl.
Also our constructors aren't documented or consistent. Do we actually want keyword args with defaults for everything?
from neutrallandscapes.jl.
yeah e.g. we need mask
to be a keyword arg throughout. But you're talking the algorithm constructors? Honestly I don't really think we need default values at all but don't care much.
from neutrallandscapes.jl.
There's also a bit of maybe an inconsistency between distancegradient and nearestneighborelement, where the first takes a vector of sources whereas the second takes an Int and generates that many sources. But maybe that's OK...
oh I guess we also need some badges on the readme
from neutrallandscapes.jl.
I actually also think we may want to replace
function demolandscape(alg::T) where {T <: NeutralLandscapeMaker}
heatmap(rand(alg, (200, 200)), frame=:none, aspectratio=1, c=:davos)
end
demolandscape(alg())
with
default(frame=:none, aspectratio=1, c=:davos)
gridsize = (200, 200)
heatmap(rand(alg(), gridsize))
Which gives a lot more flexibility, and also leads to example code closer to what a user would be writing
from neutrallandscapes.jl.
We also need the blend functions and the nearestneighborcluster in the gallery. Wow I should really make a checklist
from neutrallandscapes.jl.
When we do tag, should we just go right ahead and tag version 1.0?
from neutrallandscapes.jl.
I think maybe give a few minor versions to correct the mistakes weve probably made in the interface!
Currently every alg has defaults, but they aren't all documented and they are for args not kwargs so it's all or nothing.
Personally I like to use keywords, especially in demonstrating things for a paper as it's more explicit, and it's a little more flexible and loses nothing on the defualt constructors we have - so I've moved all the defaults to keywords and standardised the docs.
from neutrallandscapes.jl.
And we aren't actually exporting mask!
now?
from neutrallandscapes.jl.
Yeah probably need a checklist!!
from neutrallandscapes.jl.
And we aren't actually exporting mask! now?
We're not - and it would conflict with SimpleSDMLayers. But maybe we could document it and keep it as an undocumented convenience function?
from neutrallandscapes.jl.
Ok sure I'll document it with NeutralLandscapes.mask!
And probably we shouldn't export rand!
or rand
? rand
is default, and rand!
is using Random
?
from neutrallandscapes.jl.
Also should nope I get it it's basically the sameMidpointDisplacement
be in its own file? it breaks the pattern
from neutrallandscapes.jl.
Related Issues (17)
- Problem with wavesurface
- two abstract types of landscape makers HOT 1
- Progress on landscape makers HOT 21
- Euclidean Distance Transform HOT 9
- code organisation HOT 2
- Add voronoi grid HOT 13
- PerlinNoise() requires square matrices? HOT 7
- DiamondSquare and MidpointDisplacement are not rescaled HOT 2
- DiamondSquare warning? HOT 2
- Readme organisation HOT 1
- TagBot trigger issue HOT 16
- MethodError: no method matching NearestNeighborCluster(::Float64) HOT 6
- NearestNeighborCluser is broken with :queen HOT 2
- [RFC] adding methods for temporal change in neutral landscapes HOT 3
- `normalize` can't handle NaNs HOT 3
- HaltonSequences is misbehaving HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neutrallandscapes.jl.