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

Refactor manual to better include contributed modules #253

Closed
GiovanniBussi opened this issue Jun 28, 2017 · 39 comments
Closed

Refactor manual to better include contributed modules #253

GiovanniBussi opened this issue Jun 28, 2017 · 39 comments
Labels
Milestone

Comments

@GiovanniBussi
Copy link
Member

I open an issue related to manual refactoring so that we can public comment on it.

The goal is to end up with a manual where there is a sub menu for each contributed module including:

  • a sort of summary of the module functionalities
  • many subpages structures in categories (e.g. bias/colvar/cltools/etc)

The plan is to incorporate many ideas from how @valsson did the manual for his VES code (manual here).

In particular, we might define some rule such that:

  • action categories in the form PIPPO_BIAS belong to module PIPPO
  • in manual generation, we expect a PIPPO.md file with the summary related to module PIPPO
  • the same .md file will contain many tags in the form @PIPPO_BIAS@ to be replaced with the proper tables during manual generation
@GiovanniBussi GiovanniBussi added this to the Version 2.4 milestone Jun 28, 2017
@carlocamilloni
Copy link
Member

I think i like the idea of the self containing manual for the modules at the same time I think the best would be to have everything accessible from both places e.g a Pippo_bias will also automatically appear inside the general biases list as well as in the Pippo module pages

carlocamilloni added a commit that referenced this issue Jul 19, 2017
- if something is called @XXX_YYY@ then is considered as a distinct plumed module
- then there is a page XXX.md which links to the YYY subpages. Furthermore if YYY is COLVAR, FUNCTION, BIAS or any of the common plumed keywords
then these are also listed in the appropriate section of the manual

@GiovanniBussi do you think it can work?
@GiovanniBussi
Copy link
Member Author

I think so. Just a question: in case Pippo_bias is of type bias, you put the \subpage in the module page and the \ref in the bias page, right? I think this would be the correct way.

Finally, maybe one could replace this:

keywords=`grep "^ *@" *.md | awk -F"@" '{print $2}' | uniq`

with this:

grep -o "@[A-Z_]*@" *.md | awk -F"@" '{print $2}'  | uniq

just to avoid troubles if someone puts the keyword @COLVAR@ not at the beginning
of the line.

@carlocamilloni
Copy link
Member

carlocamilloni commented Jul 19, 2017 via email

@GiovanniBussi
Copy link
Member Author

I see, maybe Doxygen is clever enough to create the page only once...

Looking at the manual I am not completely sure that it makes sense to have actions repeated
(in the left menu). To me the confusing thing is indeed that when you expand the tree on the lext you see the same action twice. Notice that for instance in Index of actions they do not expand (this is just a table with links).

Maybe an alternative could be to add e.g. at the end of the bias page a sentence such as

Notice that other biases are available in the following modules:
- PLUMED-ISDB

Here PLUMED-ISDB could have a link directly to isdb-bias

Could this make sense?

@carlocamilloni
Copy link
Member

carlocamilloni commented Jul 19, 2017 via email

@GiovanniBussi
Copy link
Member Author

Yes this I understand, still to me it is confusing that they appear twice...

I wanted to check the pdf manual (to see if variables appear twice) but I now realize that in this manual the section @PDFMANUAL@ is missing. Is this on purpose (i.e. you disabled it) or maybe there is some problem in the script?

@carlocamilloni
Copy link
Member

carlocamilloni commented Jul 19, 2017 via email

@carlocamilloni
Copy link
Member

carlocamilloni commented Jul 19, 2017 via email

@GiovanniBussi
Copy link
Member Author

GiovanniBussi commented Jul 19, 2017

I see, actually the extract script is not what I would call a user-friendly script... Perhaps after we have something that works and does what we want it could be simplified a bit.

@carlocamilloni
Copy link
Member

I agree

@valsson
Copy link
Contributor

valsson commented Jul 20, 2017

I tried the modified extract script by Carlo on the manual of my code and it seems to work exactly as it should.

I would agree that the extract script is not very user-friendly, nor is it easy to understand how it work.

I noticed one issue, if I have a command line tools that is in the category VES_TOOLS it goes correctly into both sections of the manual (VES_TOOLS and TOOLS). However, there is a plumedcheck failure:

[global_check] (error) :plmd_unregistered_action: action ves_md_linearexpansion at ves/MD_LinearExpansionPES.cpp:53 is not registered
[global_check] (error) :plmd_undocumented_cltool: cltool ves_md_linearexpansion at ves/MD_LinearExpansionPES.cpp:80 is not documented

So I guess the plumedcheck script has to be modified to reflect that changes in the manual construction.

@GiovanniBussi
Copy link
Member Author

@valsson ok that should be easy to fix.

@carlocamilloni can you transplant the script on the v2.4 branch? I don't know if you plan to merge the whole isdb branch now. In case not, you can just copy the new script. (notice though that there is still some issue with the description of the PDF manual).

I reiterate that I am not fully satisfied with the duplication of the keywords and I would like to find a solution where in one of the two places there are just links, but I agree that this is a good starting point. I can try to refine the script later.

As a reminder, if anyone (@plumed/all) wants to play with manual generating it on Travis-CI, you can just force push on testdoc branch so that it ends up here.

@carlocamilloni
Copy link
Member

PDFmanual is now fixed, yes I can copy the extract script to v2.4.
Max and I want to merge the isdb branch before the beta version but it will probably take a few more days (week) before being ready

carlocamilloni added a commit that referenced this issue Jul 21, 2017
@carlocamilloni
Copy link
Member

about the double listing now it is actually not too bad, if you select METAINFERENCE in the bias section it automatically moves you to the isdb section

@maxbonomi
Copy link
Member

maxbonomi commented Jul 21, 2017 via email

GiovanniBussi added a commit that referenced this issue Jul 21, 2017
@GiovanniBussi
Copy link
Member Author

I just pushed on branch v2.4 a version where actions from separate modules appear at the end of the list in a separate table.

@valsson can you check if this works well also for the VES module?

It should be sufficient to merge v2.4 in.

@GiovanniBussi
Copy link
Member Author

I think @hockyg and @whitead should also be notified about this thread. At some point they will also have to add the description of their EDS module.

@carlocamilloni
Copy link
Member

I merged it and it works but personally while I like the table I would prefer to have the keywords also in the left menu, just because that is the only thing I look at. @maxbonomi ?

@GiovanniBussi
Copy link
Member Author

As an alternative, would it be ok to remove them from the left menu of PLUMED-ISDB so that they appear only in the left menu of the bias/colvar/function part? That's super easy (just swapping ref and subpage in the generation of the manual)

@carlocamilloni
Copy link
Member

The point is that I don't share your dislike for the duplication of the keywords in the left menu ;-) I mean I don't see why there should be a table but then only some actions are on the left and some are not. It is clear that if something appear twice is because it can belong to more than one category

@valsson
Copy link
Contributor

valsson commented Jul 24, 2017

I tested the new script on the manual for the VES module and it seems to work fine. I also agree with @carlocamilloni regarding the duplication of the keywords in the left menu, to me it looks better.

What about tutorial, would it be possible to extend this scheme to tutorials? I have tutorials inside the tutorials folder that are called ves_aaa that I would like to have inside the module subpage. What about if there are tutorials called pippo_aaa they would go to a list called PIPPO_TUTORIALS.list which could be used inside module page? Would this be possible?

@maxbonomi
Copy link
Member

maxbonomi commented Jul 24, 2017 via email

@carlocamilloni
Copy link
Member

carlocamilloni commented Jul 24, 2017 via email

@carlocamilloni
Copy link
Member

about the tutorials @valsson yes I think we should also include the tutorials in the module, it should be easy

@carlocamilloni
Copy link
Member

@valsson could you check the new changes related to tutorials? commit 6a703be
Tutorials related to modules should be places in tutorials/others and named xxx-yyy.txt where xxx is the module name i.e. isdb-1.txt

@valsson
Copy link
Contributor

valsson commented Jul 25, 2017 via email

@carlocamilloni
Copy link
Member

carlocamilloni commented Jul 25, 2017 via email

@carlocamilloni
Copy link
Member

@valsson could you check if the new addition of a single page where all module are collected works for your version? You can look at the ISDB branch for reference.

@maxbonomi
Copy link
Member

maxbonomi commented Aug 2, 2017 via email

@maxbonomi
Copy link
Member

maxbonomi commented Aug 2, 2017 via email

@maxbonomi
Copy link
Member

maxbonomi commented Aug 2, 2017 via email

@gtribello
Copy link
Member

I think that the substitution with from PLUMED-ISDB should be made.

@carlocamilloni
Copy link
Member

carlocamilloni commented Aug 2, 2017 via email

@carlocamilloni
Copy link
Member

carlocamilloni commented Aug 2, 2017

Done, this can be added using these lines in the XXX.md file (e.g. ISDB.md)
<!--
description: Integrative Structural and Dynamical Biology with PLUMED
authors: Max Bonomi and Carlo Camilloni
reference: \cite Bonomi:2017dn
-->

@maxbonomi
Copy link
Member

maxbonomi commented Aug 2, 2017 via email

@carlocamilloni
Copy link
Member

now instead of (from ISDB) we have the link to the module page

I am also wondering if in the global bias / cv page we can substitute:

(from ISDB module)

with (from PLUMED-ISDB) where PLUMED-ISDB matches the name listed in the Additional Modules
and it is a link to the main module page

@maxbonomi
Copy link
Member

maxbonomi commented Aug 2, 2017 via email

@valsson
Copy link
Contributor

valsson commented Aug 2, 2017

@carlocamilloni I tried the new script and it works pretty well.

One thing is that now one has to add by hand the XXXXPP.md file to the list in the go-doxygen script, and this is something that is easy to forget. Is there a way to do this in an automatic way, for example by copying the XXXXPP.md file to the automatic folder in the extract script, then there is no need to add it to the list in go-doxygen. Then everything is done in an automatic fashion.

Another thing is that the plumedcheck script has to be modified so there is not a failure for command line tools that are documented with XXXX_TOOLS, see my comment above.

@carlocamilloni
Copy link
Member

All issues should be addressed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants