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

Set travis to fail if errors in doctests #34

Open
DominiqueMakowski opened this issue Sep 11, 2018 · 6 comments
Open

Set travis to fail if errors in doctests #34

DominiqueMakowski opened this issue Sep 11, 2018 · 6 comments
Labels
help us if you're reading this Help is needed to implement something

Comments

@DominiqueMakowski
Copy link
Member

Must find how to set that travis errors in a doctest fails.

@DominiqueMakowski DominiqueMakowski added the help us if you're reading this Help is needed to implement something label Sep 11, 2018
@mortenpi
Copy link

Followed the label 🙂

You should use a build stage for Documenter and also pass strict = true to makedocs. strict will make make.jl error on a doctest failure, and if it happens in a build stage then Travis knows to fail the build.

@mortenpi
Copy link

Forgot to add the link. Here's more info on setting up the build stage: https://juliadocs.github.io/Documenter.jl/latest/man/hosting/#.travis.yml-Configuration-1

DominiqueMakowski added a commit that referenced this issue Sep 15, 2018
@DominiqueMakowski
Copy link
Member Author

@mortenpi Thanks!! I added it (it seems that strict=true is not documented in the docs)

@DominiqueMakowski
Copy link
Member Author

@mortenpi mmh seems like travis errors:

> running doctests.
 > checking footnote links.
Documenter: populating indices.
ERROR: LoadError: `makedocs` encountered an error. Terminating build
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] runner(::Type{Documenter.Builder.RenderDocument}, ::Documenter.Documents.Document) at /home/travis/.julia/packages/Documenter/RJhiR/src/Builder.jl:203
 [3] dispatch(::Type{Documenter.Builder.DocumentPipeline}, ::Documenter.Documents.Document) at /home/travis/.julia/packages/Documenter/RJhiR/src/Selectors.jl:168
 [4] #2 at /home/travis/.julia/packages/Documenter/RJhiR/src/Documenter.jl:204 [inlined]
 [5] cd(::getfield(Documenter, Symbol("##2#3")){Documenter.Documents.Document}, ::String) at ./file.jl:96
 [6] #makedocs#1(::Bool, ::Base.Iterators.Pairs{Symbol,Any,NTuple{7,Symbol},NamedTuple{(:format, :sitename, :authors, :analytics, :modules, :strict, :pages),Tuple{Symbol,String,String,String,Array{Module,1},Bool,Array{String,1}}}}, ::Function) at /home/travis/.julia/packages/Documenter/RJhiR/src/Documenter.jl:203
 [7] (::getfield(Documenter, Symbol("#kw##makedocs")))(::NamedTuple{(:format, :sitename, :authors, :analytics, :modules, :strict, :pages),Tuple{Symbol,String,String,String,Array{Module,1},Bool,Array{String,1}}}, ::typeof(makedocs)) at ./none:0
 [8] top-level scope at none:0
 [9] include at ./boot.jl:317 [inlined]
 [10] include_relative(::Module, ::String) at ./loading.jl:1038
 [11] include(::Module, ::String) at ./sysimg.jl:29
 [12] include(::String) at ./client.jl:388
 [13] top-level scope at none:0
in expression starting at /home/travis/build/neuropsychology/Psycho.jl/docs/make.jl:3

is something wrong with the make.jl?

@mortenpi
Copy link

So, with strict the build will now throw an error if there is anything at all wrong with the build. In this instance the problem is the missing docstrings.

To get rid of that error you should remove DataFrames and GLM from modules. Was there a particular reason why you added them there?

@DominiqueMakowski
Copy link
Member Author

Right it makes sense!

Indeed, it says above that they are like 158 missing docstrings, with many things from the GLM and Dataframes packages.

In my package, I document some methods for types of the GLM and DataFrames packages (for instance, report(df::DataFrames.DataFrame; kwargs...)). And if I remember correctly I added GLM and DataFrames to modules because otherwise the autodocs wouldn't work. Thanks a lot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help us if you're reading this Help is needed to implement something
Projects
None yet
Development

No branches or pull requests

2 participants