ctmm-initiative / ctmm

Continuous-Time Movement Modeling. Functions for identifying, fitting, and applying continuous-space, continuous-time stochastic movement models to animal tracking data.
http://biology.umd.edu/movement.html
47 stars 12 forks source link

pkgdown is no longer populating the reference index #18

Closed chfleming closed 6 years ago

chfleming commented 6 years ago

https://ctmm-initiative.github.io/ctmm/reference/index.html

is empty, but the man pages do exist. E.g.:

https://ctmm-initiative.github.io/ctmm/reference/ctmm.fit.html

xhdong-umd commented 6 years ago

Did you update pkgdown package? It has some big updates recently. I tried build_reference() and it's working for me. I also tried build_site which is taking a long time running, it hasn't finish yet.

> library(pkgdown)
> build_reference()
── Building function reference ─────────────────────────────────────────────────
Writing  'reference/index.html'
Loading ctmm
Building 'man/plot.variogram.Rd'
Writing  'reference/plot.variogram.html'
Building 'man/unit.Rd'
Writing  'reference/unit.html'

One error I should fix earlier is there was a typo in _pkgdown.yml:

templates: should be template:.

xhdong-umd commented 6 years ago

build_site finished, it built the reference index for me.

> build_site()
══ Create pkgdown site ══════════════════════════════════════════════ /Users/xhdong/Projects/ctmm/docs ══
── Initialising site ────────────────────────────────────────────────────────────────────────────────────
Copying  '../../../../Library/Frameworks/R.framework/Versions/3.4/Resources/library/pkgdown/assets/jquery.sticky-kit.min.js' to 'jquery.sticky-kit.min.js'
Copying  '../../../../Library/Frameworks/R.framework/Versions/3.4/Resources/library/pkgdown/assets/link.svg' to 'link.svg'
Copying  '../../../../Library/Frameworks/R.framework/Versions/3.4/Resources/library/pkgdown/assets/pkgdown.css' to 'pkgdown.css'
Copying  '../../../../Library/Frameworks/R.framework/Versions/3.4/Resources/library/pkgdown/assets/pkgdown.js' to 'pkgdown.js'
── Building home ────────────────────────────────────────────────────────────────────────────────────────
Writing  'authors.html'
Writing  'index.html'
── Building function reference ──────────────────────────────────────────────────────────────────────────
Writing  'reference/index.html'
chfleming commented 6 years ago

Yeah, I updated pkgdown and I assume that's what caused this. I've now tried changing templates to template.

I assume you are using MacOS?

xhdong-umd commented 6 years ago

Yes I'm using Mac. I can test with my home pc in windows later.

xhdong-umd commented 6 years ago

I tested with windows and didn't find any problem. Did it generate any error in your machine? Did you try to remove the existing site first?

> library(pkgdown)
> build_reference()
-- Building function reference -------------------------------------------------
Writing 'reference/index.html'
...
chfleming commented 6 years ago

There is no error when not starting from scratch. But if I delete the docs directory and try to build the whole site over, I guess this error:

library(ctmm) pkgdown::build_site(run_dont_run=TRUE) == Building pkgdown site ======================================================= Reading from: 'C:/Users/Christen/OneDrive/CTMM/ctmm' Writing to: 'C:/Users/Christen/OneDrive/CTMM/ctmm/docs' -- Initialising site ----------------------------------------------------------- Copying '../../../Documents/R/win-library/3.4/pkgdown/assets/jquery.sticky-kit.min.js' to 'jquery.sticky-kit.min.js' Copying '../../../Documents/R/win-library/3.4/pkgdown/assets/link.svg' to 'link.svg' Copying '../../../Documents/R/win-library/3.4/pkgdown/assets/pkgdown.css' to 'pkgdown.css' Copying '../../../Documents/R/win-library/3.4/pkgdown/assets/pkgdown.js' to 'pkgdown.js' -- Building home --------------------------------------------------------------- Writing 'authors.html' Writing 'index.html' -- Building function reference ------------------------------------------------- Writing 'reference/index.html' Loading ctmm -- Building articles ----------------------------------------------------------- Writing 'articles/index.html' Reading 'vignettes/akde.Rmd' Error: Context topic_index has not been initialised

xhdong-umd commented 6 years ago

I didn't have this error with docs folder deleted, using build_articles() in windows.

chfleming commented 6 years ago

build_articles() seems to work fine on its own...

chfleming commented 6 years ago

The other individual build commands seem to work fine. But build_reference() produces an empty index and doesn't build any man pages either.

xhdong-umd commented 6 years ago

When I was testing I tried 'build_reference` with and without existing files, it both worked.

I searched about the error message you posted and found this one. In some version pkgdown was relying on the package built and loaded by devtools. I did build and load ctmm in rstudio (use the Build tool pane, install and restart), this could be why I didn't meet the errors.

This should not be a requirement but might be temporary workaround before it's fixed.

xhdong-umd commented 6 years ago

The reference index in the site is still empty. Maybe you can use Linux to update the site first? I can also do it with Mac if needed.

xhdong-umd commented 6 years ago

I saw the template is taking effect now, though I'm not sure if that theme is what you want.

The news is showing some extra word in each title. This feature is quite tricky and has some weird requirement on the heading of each section. For ctmmweb I have to avoid using number as title so to add "version" in beginning.

screen shot 2018-04-19 at 10 25 44 am
chfleming commented 6 years ago

I found the problem with building the reference files: I use OneDrive to sync my files between work and home. OneDrive seems to have recently activated an on-demand "feature" that makes files not sync until touched... but this does not work unless OneDrive is running, otherwise any attempt to access an unsynced file will fail. However, I don't keep OneDrive running while working, because OneDrive locks files during sync, making it impractical to work on them while it is running.

Anyhow, I turned off this "feature" and now everything seems functional.

chfleming commented 6 years ago

pkgdown now wants the package name then version number in NEWS.md and then it automatically appends the CRAN release date after or "Unreleased" otherwise.

xhdong-umd commented 6 years ago

Good to know the problem of OneDrive. That explained why I didn't meet the problem in my windows machine.

The NEWS requirement is kind of too subtle, too many assumptions.