Documenter.jl - Docs empty unless manually created? Old references to moved functions?

When I build my docs, references to an older version of my package documentation persists? Functions that were documented and refactored to other files are being displayed. Despite the old docs being deleted each time I try, and them not being added to my git. For example: https://caseykneale.github.io/ChemometricsTools.jl/man/Analysis/
The function Q is no longer in this file? Why is it being generated?

While many of my docs pages are blank?
https://caseykneale.github.io/ChemometricsTools.jl/man/classMetrics/

Whatever is going on it is killing my CI/CD? IE:

CICD failed saying “Documenter” not present, so I added it to the package (again?). Being met with the same error?

edit - update I was able to fix the CICD issue I think? Latest Travis: Travis CI - Test and Deploy with Confidence

I am really bad at this DevOps stuff. Any help would be really appreciated.

The last time I ran my docs build script everything was fine?

You don’t seem to have deployment configured for the documentation – docs/make.jl is missing the call to deploydocs. See the Hosting Documentation page on how to set all that up.

You have also committed the generated .html files onto the master branch. They should be committed to gh-pages (which deploydocs does automatically if set up correctly). You also need to change the GitHub repository settings probably, to make sure it publishes the GitHub pages page from the gh-pages branch and not from the docs/ directory.

Finally, I would recommend that you remove the environment manipulation stuff from docs/make.jl. The correct environment should be activate by starting Julia with julia --project=docs/ (which needs to be changed too).

4 Likes

Thank you! It appears a lot has changed since I last configured this.

So far I’ve done the following to address these suggestions:

  1. I set up a gh-pages
  2. Added deploy docs line
  3. Removed environment stuff from make.jl
  4. Updated the travis.yml to mirror the one in the docs. Ie:
        - julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
                                               Pkg.instantiate()'
        - julia --project=docs/ docs/make.jl
      after_success: skip

but now I’m getting an error:(Travis CI - Test and Deploy Your Code with Confidence)

julia --project=docs/ docs/make.jl

ERROR: LoadError: ArgumentError: Package Documenter not found in current path:

- Run `import Pkg; Pkg.add("Documenter")` to install the Documenter package.

Without those environment things in my make.jl Travis can’t find Documenter? Any advice.

You don’t have a docs/Project.toml file with e.g. Documenter.
Edit: https://github.com/caseykneale/ChemometricsTools.jl/pull/14

1 Like

Thanks Fred!

But now my docs page is completely empty when I check it?

Travis is now passing but not deploying because of “DOCUMENTER_KEY”?

┌ Info: Deployment criteria:
│ - ✔ ENV["TRAVIS_REPO_SLUG"]="caseykneale/ChemometricsTools.jl" occurs in repo="github.com/caseykneale/ChemometricsTools.jl.git"
│ - ✔ ENV["TRAVIS_PULL_REQUEST"]="false" is "false"
│ - ✔ ENV["TRAVIS_TAG"]="" is (i) empty or (ii) a valid VersionNumber
│ - ✔ ENV["TRAVIS_BRANCH"]="master" matches devbranch="master" (if tag is empty)
│ - ✘ ENV["DOCUMENTER_KEY"] exists
│ - ✔ ENV["TRAVIS_EVENT_TYPE"]="push" is not "cron"
└ Deploying: ✘

Sounds like you’re almost there! Deploy keys are documented here: Hosting Documentation · Documenter.jl

1 Like

Whew Okay!

I did all of that. Somehow someone named zeptodoctor :smiley: posted my pages(I think), here: https://github.com/caseykneale/ChemometricsTools.jl/tree/gh-pages

Unfortunately some of the same errors in my documentation persist. Namely some files do not get documented? Other’s do?
https://caseykneale.github.io/ChemometricsTools.jl/dev/
Doesn’t: Regression Models · ChemometricsTools
Does: Ensemble Models · ChemometricsTools

I was able to fix a lot of my docs by removing my code to generate a page for the entire API.

Now I’m just chasing down why this page isn’t displaying?
https://caseykneale.github.io/ChemometricsTools.jl/dev/man/modelanalysis/

I think I’ll close this thread because this is “good enough” for me for right now.

I’d like to explicitly thank @mortenpi @fredrikekre @ericphanson for helping me through this.

1 Like

As I suggested previously, using one of the package template generators to set up these things would spare you from most of the problems encountered in this topic.

I am not sure why you are doing this the hard way.

Thanks for the suggestion Tamas, This was how I set it up in the past before the package template generator was ready/stable. It’s what I am comfortable with.

Also the problem - I think - was that I had a docs/src file that generated doc for my entire module as well as page-wise docs. So this made a lot of duplicate documentation. Not sure why but doing this lead to really unreliable results.

1 Like