Skip to content

doc: move wiki to Doxygen documentation (second attempt)#8516

Merged
MrKevinWeiss merged 3 commits intoRIOT-OS:masterfrom
jia200x:wiki_dox_convertion
Aug 7, 2018
Merged

doc: move wiki to Doxygen documentation (second attempt)#8516
MrKevinWeiss merged 3 commits intoRIOT-OS:masterfrom
jia200x:wiki_dox_convertion

Conversation

@jia200x
Copy link
Copy Markdown
Member

@jia200x jia200x commented Feb 5, 2018

Contribution description

This is a second attempt of moving Board specifications from Wiki to Doxygen. Replaces the work in #8508 .

Wiki entries were copied "as it" and referenced to the corresponding group, with the same format as existing Doxygen entries like Arduino MKRFOX1200
As said in the previous PR, the motivation is to help developers keeping an up-to-date End User documentation for each board without adding too much overhead, and help the End User to find all the documentation in the same place.

  • deduplicate @defgroup and @brief
  • remove tabs
  • split lines to fit 80 chars

NB tables doesn't work if splitted => NR > 80. Also, this PR doesn't intend to update information for each entry.

Some other issues addressed by this PR

  • Fix mulle todo block

Entries with broken imgs (addressed in further PRs)

  • arduino-mega2560
  • samd21-xpro
  • saml21-xpro
  • stm32f3discovery
  • z1

Following steps (PRs coming soon)

  • Add "Family" documentation (ARM, MSP430, etc).
  • Unify the current board documentation structure, so all boards have the same content (Hardware Description, Pin Mapping, Toolchain, etc).

Issues/PRs references

#8508

@jia200x jia200x requested review from aabadie and smlng February 5, 2018 13:06
@jia200x jia200x added Area: doc Area: Documentation Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation labels Feb 5, 2018
@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Feb 5, 2018

Very nice ! I like it.

Unfortunately, with this PR, I think each board group definition (using @defgroup) is duplicated between the doc.txt and the board.h files: the board.h should be updated as well... for each board !

@jia200x
Copy link
Copy Markdown
Member Author

jia200x commented Feb 5, 2018

@aabadie I think I found a way to automate that. I will try :)

*
* ![airfy-beacon](https://raw.githubusercontent.com/wiki/RIOT-OS/RIOT/images/airfy-beacon.jpg)
*
* | MCU | NRF51822QFAA |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use spaces instead of tabs...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original file in the wiki already contains the tabs, maybe the automatic script could also handle that. What do you think @jia200x ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bash magic may do the trick :)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expand may help here

Copy link
Copy Markdown
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The board.h should be adapted as well (remove the @defgroup and @brief at the very beginning of the doxygen block.
Is your automatic script able to do that ?

* ## Overview
*
* The Airfy Beacon is utilizing a Nordics NRF51822QFAA SoC.
* The SoC features 16Kb of RAM, 256Kb of flash ROM and comes on top of the usual micro-controller peripherals with a 2.4GHz radio that supports both Nordics proprietary ShockBurst as well as Bluetooth Low Energy (BLE).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great to split the line so that they fit in the 80 characters maximum length. Do you think it's possible to adapt your script for this ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I think so

@jia200x
Copy link
Copy Markdown
Member Author

jia200x commented Feb 9, 2018

@aabadie thanks a lot for reviewing!

@jia200x jia200x added Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable labels Feb 27, 2018
@jia200x
Copy link
Copy Markdown
Member Author

jia200x commented Mar 2, 2018

@aabadie @gebart could you help me with the review of this?

@@ -0,0 +1 @@
*/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a bug: your script is creating a doc.txt when the board is not documented in the code base and not present in the wiki. I saw a few others like this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's a bug. I will fix it when I'm back

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -0,0 +1,4 @@
/**
* @ingroup boards_iotlab-m3
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a problem here, the group should be boards_iotlaba-a8-m3. This is because the initial group of the A8 was invalid.

*
* @todo Work around missing RESET pin on Mulle v0.6x
* @{
*/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need to close the doxygen block here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will try again, but I strange error on make doc without splitting this block. I will paste the results here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is my output when I don't split the block:

( cat riot.doxyfile ; echo "GENERATE_HTML = yes" ) | doxygen -
todo:17: warning: Unexpected character `b'
todo:17: warning: Unexpected character `o'
todo:17: warning: Unexpected character `a'
todo:17: warning: Unexpected character `r'
todo:17: warning: Unexpected character `d'
todo:17: warning: Unexpected character `s'
todo:17: warning: Unexpected character `/'
todo:17: warning: Unexpected character `m'
todo:17: warning: Unexpected character `u'
todo:17: warning: Unexpected character `l'
todo:17: warning: Unexpected character `l'
todo:17: warning: Unexpected character `e'
todo:17: warning: Unexpected character `/'
todo:17: warning: Unexpected character `i'
todo:17: warning: Unexpected character `n'
todo:17: warning: Unexpected character `c'
todo:17: warning: Unexpected character `l'
todo:17: warning: Unexpected character `u'
todo:17: warning: Unexpected character `d'
todo:17: warning: Unexpected character `e'
todo:17: warning: Unexpected character `/'
sh: latex: no se encontró la orden
error: Problems running latex. Check your installation or look for typos in _formulas.tex and check _formulas.log!
sh: dvips: no se encontró la orden
error: Problems running dvips. Check your installation!
make[1]: se sale del directorio '/home/jialamos/Development/RIOT/doc/doxygen

Maybe a Doxygen bug?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about moving the @todo before the @{ ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same results. Does it work for you? Maybe my Doxygen version has a bug

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can drop the todo. It's not important

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also have the issue, but it works with the actual version of your branch. So let's keep it like this

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or maybe I just drop the @todo as @gebart proposed, so the change is minimal

* @{
*/

/** @todo Work around missing RESET pin on Mulle v0.6x
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and repoen it here

* @defgroup boards_nucleo144-f413 STM32 Nucleo144-F413
* @ingroup boards_common_nucleo144
* @brief Support for the STM32 Nucleo144-F413
* @ingroup boards__nucleo144-f413common_nucleo144
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a bug here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for pointing it out

* @defgroup boards_nucleo144-f429 STM32 Nucleo144-F429
* @ingroup boards_common_nucleo144
* @brief Support for the STM32 Nucleo144-F429
* @ingroup boards__nucleo144-f429common_nucleo144
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here as well


/**
* @ingroup nz32-sc151
* @ingroup boards_nz32-sc151
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't this fixed already in master ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, forgot to rebase

* @defgroup boards_reva RE-Mote Revision A
* @ingroup boards
* @brief Support for the RE-Mote board Revision A
* @ingroup boards_reva
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original group name of this board could have been more specific and then consistent with other remote boards: boards_remote-reva

@@ -0,0 +1,121 @@
pause/*2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was suffering this bug in my local vim.

@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Mar 7, 2018

@jia200x, I opened #8748 and #8749 for the problem found with doxygen groups.

Otherwise, this PR is getting close from being merged I think. Unfortunately (for me), it will conflict a lot with #8649 #8650 and #8651 since they touch the same parts of the code. But we should merge your PR first because mines are changing the doxygen group names of the boards and I think your automatic script will not work anymore if we merge them first.

@jia200x
Copy link
Copy Markdown
Member Author

jia200x commented Mar 7, 2018

@jia200x, I opened #8748 and #8749 for the problem found with doxygen groups. Otherwise, this PR is getting close from being merged I think. Unfortunately (for me), it will conflict a lot with #8649 #8650 and #8651 since they touch the same parts of the code. But we should merge your PR first because mines are changing the doxygen group names of the boards and I think your automatic script will not work anymore if we merge them first.

Great. OK, I will try to fix these issues asap and contribute to merge the other PRs.

Regarding the changes of ST platforms, it seems the problem would be solved with a small script that moves @defgroup and @brief from periph_conf.h to doc.txt. Not sure if there are any other files to update.
What do you think?

@jia200x jia200x force-pushed the wiki_dox_convertion branch from 4a4f8ab to f5e73b9 Compare March 7, 2018 10:41
@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Mar 7, 2018

I built locally the documentation to have a look at the result. My first impression is that the board documentation is making a big step forward.

Some problems:

  • some table cells are missing sometimes
  • the size of some images could be adjusted (maybe in follow-up PRs)
  • some links to board images are broken (stm32f3disco)
  • doxygen groups are invalid for some Nucleo boards

@jia200x jia200x force-pushed the wiki_dox_convertion branch 4 times, most recently from 879244d to b3516a2 Compare July 26, 2018 13:32
Copy link
Copy Markdown
Contributor

@jcarrano jcarrano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Code is not changed, should not break anything. If we don't merge this people will continue to modify the wiki and this PR will drag on forever.

@jia200x
Copy link
Copy Markdown
Member Author

jia200x commented Jul 26, 2018

@miri64 @smlng are you ok with the actual state?

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 30, 2018

side note: images for samd21 and saml21 are not working anymore (broken in wiki, too) because microchip overtook atmel. I fixed in the wiki, so you might want to update this here too?

@jia200x
Copy link
Copy Markdown
Member Author

jia200x commented Jul 30, 2018

side note: images for samd21 and saml21 are not working anymore (broken in wiki, too) because microchip overtook atmel. I fixed in the wiki, so you might want to update this here too?

Good catch. Thanks

Sure, no problem

@jcarrano
Copy link
Copy Markdown
Contributor

images for samd21 and saml21 are not working anymore

We should not be deep-linking content.

@smlng
Copy link
Copy Markdown
Member

smlng commented Jul 30, 2018

@jcarrano I agree, but currently we have no common strategy where to put or link images to/from - I guess copyright might be an issue, so putting them into the repo is not an option I guess.

Hence, for now it was the easiest (and quickest) to fix the links by replacing the URLs.

@jia200x jia200x force-pushed the wiki_dox_convertion branch from b3516a2 to 2531487 Compare August 1, 2018 13:27
@jia200x
Copy link
Copy Markdown
Member Author

jia200x commented Aug 1, 2018

@smlng alles gut. Fixed SAML21 and SAMD21 entries.

@jia200x
Copy link
Copy Markdown
Member Author

jia200x commented Aug 2, 2018

ping @miri64

@miri64 miri64 dismissed their stale review August 2, 2018 16:34

As I only asked for a community discussion that wasn't really picked up on, I won't block this PR (sorry for doing this earlier).

@miri64 miri64 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Aug 2, 2018
@jia200x
Copy link
Copy Markdown
Member Author

jia200x commented Aug 7, 2018

As I only asked for a community discussion that wasn't really picked up on, I won't block this PR (sorry for doing this earlier).

No problem! :) Then, let's merge

@MrKevinWeiss MrKevinWeiss merged commit 8468fe1 into RIOT-OS:master Aug 7, 2018
@aabadie
Copy link
Copy Markdown
Contributor

aabadie commented Aug 7, 2018

Finally !!!

@smlng
Copy link
Copy Markdown
Member

smlng commented Aug 7, 2018

Nice works, congrats @jia200x

@jia200x
Copy link
Copy Markdown
Member Author

jia200x commented Aug 7, 2018

Thank you to all people involved! I will put deprecation warnings in the wiki's board entries

@miri64
Copy link
Copy Markdown
Member

miri64 commented Aug 7, 2018

I will put deprecation warnings in the wiki's board entries

But please with link to knew place ;-) (I think http://doc.riot-os.org/group__boards.html should suffice).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: doc Area: Documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants