ropensci / stplanr

Sustainable transport planning with R
https://docs.ropensci.org/stplanr
Other
420 stars 66 forks source link

Fix pkgdown configuration for reference #499

Closed maelle closed 1 year ago

maelle commented 2 years ago

Some topics are missing from the configuration file.

 Error in check_missing_topics(rows, pkg) : 
  All topics must be included in reference index
• Missing topics: cents_sf, destinations_sf, flow, flow_dests, flowlines_sf, geo_buffer, geo_length, geo_projected, geo_select_aeq, od_data_lines, od_data_routes, od_data_sample, od_id_order, osm_net_example, overline_intersection, rnet_add_node, rnet_boundary_points, rnet_cycleway_intersection, rnet_get_nodes, rnet_overpass, rnet_roundabout, route_bikecitizens, route_google, route_nearest_point, route_network_sf, route_split, route_split_id, routes_fast_sf, routes_slow_sf, stplanr-deprecated, stplanr-package, zones_sf

Note that for topics you do not want to include in the index you can create an "internal" section https://pkgdown.r-lib.org/reference/build_reference.html?q=internal#missing-topics

To check all topics are listed, after editing the configuration file you can run pkgdown::check_pkgdown().

maelle commented 2 years ago

@Robinlovelace Friendly reminder :smile_cat:

Robinlovelace commented 2 years ago

Thanks for the reminder. PRs welcome, away at a conference this week but will aim to get on it this week unless someone else gets there first. Definitely is a need to update the docs tho...

maelle commented 2 years ago

:wave: @Robinlovelace I've had a look and an efficient fix of the configuration requires knowledge about the package since your current reference configuration has grouping (which is awesome for users!)

reference:
- title: Work with OD data
  contents:
  - has_concept("od")
- title: Work with (desire) lines
  contents:
  - has_concept("lines")
- title: Work with and analyse routes
  contents:
  - has_concept("route_funs")
- title: Routing
  contents:
  - has_concept("routes")
- title: Work with nodes
  contents:
  - has_concept("nodes")
- title: Route network functions
  contents:
  - has_concept("rnet")
- title: Geographic functions
  contents:
  - has_concept("geo")
- title: Get transport data
  contents:
  - has_concept("data")
- title: Example data
  contents:
  - has_concept("example travel data")

I guess some of the @concept or @family tags are missing from your manual pages.

pkgdown docs https://pkgdown.r-lib.org/reference/build_reference.html#topic-matching roxygen2 docs https://roxygen2.r-lib.org/reference/tags-index-crossref.html

maelle commented 1 year ago

@Robinlovelace friendly reminder :smile_cat: (some topic expertise is needed, I can't do a quick PR)

Robinlovelace commented 1 year ago

Thanks for the nudge @maelle, it is on the todo list, just a busy period. Will get on it soon for new release but cannot guarantee it will happen by end of year.

maelle commented 1 year ago

Ok, thank you, I won't bug you again until next year then. A suboptimal but doable workaround would be to delete all the reference grouping from the pkgdown configuration for now (so the website can get updated), and then re-adding it when you have time to include all topics.

Good luck with your current projects!

maelle commented 1 year ago

thank you!!