NEST Help Generator #464

Merged
merged 79 commits into from Nov 28, 2016

Conversation

Projects
None yet
7 participants
@steffengraber
Contributor

steffengraber commented Aug 18, 2016

Processing more in less time with less code.

The parser go through all sli and cc files to find documentation and
convert it into .html and .hlp files.
This is a replacement for the old help generation mechanism in NEST.

CMAKE integration is also available.

CMakeLists.txt.orig
@@ -0,0 +1,378 @@
+# CMakeLists.txt

This comment has been minimized.

@heplesser

heplesser Aug 18, 2016

Contributor

@steffengraber Should this .orig file be in the repository?

@heplesser

heplesser Aug 18, 2016

Contributor

@steffengraber Should this .orig file be in the repository?

This comment has been minimized.

@steffengraber

steffengraber Aug 18, 2016

Contributor

@heplesser deleted

extras/userdoc/generator/README.md
+
+ python parse_help.py
+
+## In addition the parser solve issue \#363

This comment has been minimized.

@heplesser

heplesser Aug 18, 2016

Contributor

"solves"

@heplesser

heplesser Aug 18, 2016

Contributor

"solves"

This comment has been minimized.

@apeyser

There's some places where the code could be simplified --- but none of it is a stopper, just a suggestion to make it prettier.

+from helpers import cut_it
+from string import Template
+
+if os.path.isdir('../cmds'):

This comment has been minimized.

@apeyser

apeyser Oct 13, 2016

Contributor

Why not just if not rather than the if ...: else: pass ?

@apeyser

apeyser Oct 13, 2016

Contributor

Why not just if not rather than the if ...: else: pass ?

+ hlplist = []
+ name = ''
+
+ for key, value in doc_dic.iteritems():

This comment has been minimized.

@apeyser

apeyser Oct 13, 2016

Contributor

Why not make these two loops one, and cut out the old comments?

@apeyser

apeyser Oct 13, 2016

Contributor

Why not make these two loops one, and cut out the old comments?

+ cmdindexstring = s.substitute(indexbody=htmlstring, css=csstempl,
+ title=name, footer=footertempl)
+
+ if name: # only, if there is a name

This comment has been minimized.

@apeyser

apeyser Oct 13, 2016

Contributor

Aren't these two following one piece of code, but just with a difference in the sli versus cc element of the filename?

@apeyser

apeyser Oct 13, 2016

Contributor

Aren't these two following one piece of code, but just with a difference in the sli versus cc element of the filename?

@jougs

This comment has been minimized.

Show comment
Hide comment
@jougs

jougs Oct 20, 2016

Contributor

I've submitted two pull requests against @steffengraber's branch. The first (steffengraber#2) removes the remaining parts of the old SLI help extraction code, the second (steffengraber#3) refactors and simplifies the new help generator.

@heplesser, @apeyser: could you please take a look at the two? Thanks!

Contributor

jougs commented Oct 20, 2016

I've submitted two pull requests against @steffengraber's branch. The first (steffengraber#2) removes the remaining parts of the old SLI help extraction code, the second (steffengraber#3) refactors and simplifies the new help generator.

@heplesser, @apeyser: could you please take a look at the two? Thanks!

@jougs

This comment has been minimized.

Show comment
Hide comment
@jougs

jougs Oct 20, 2016

Contributor

@steffengraber: can you please merge in master? Thanks!

Contributor

jougs commented Oct 20, 2016

@steffengraber: can you please merge in master? Thanks!

@jougs jougs referenced this pull request in steffengraber/nest-simulator Oct 20, 2016

Closed

Clean up and refactor help generator #3

@heplesser

This comment has been minimized.

Show comment
Hide comment
@heplesser

heplesser Oct 24, 2016

Contributor

@jougs @steffengraber I will wait with looking at this until @steffengraber has merged master to his branch to reduce the size of the changes.

Contributor

heplesser commented Oct 24, 2016

@jougs @steffengraber I will wait with looking at this until @steffengraber has merged master to his branch to reduce the size of the changes.

@apeyser

This comment has been minimized.

Show comment
Hide comment
@apeyser

apeyser Nov 7, 2016

Contributor

@jougs, @steffengraber: Added comments on steffengraber#3

Contributor

apeyser commented Nov 7, 2016

@jougs, @steffengraber: Added comments on steffengraber#3

extras/help_generator/writers.py
@@ -123,7 +105,7 @@ def write_help_html(doc_dic, file, sli_command_list, keywords):
hlplist.append('%s:\n' % key)
htmllist.append('<ul>')
for i in value:
- see = i.strip("###### ###### $$")
+ # see = i.strip("###### ###### $$")

This comment has been minimized.

@apeyser

apeyser Nov 28, 2016

Contributor

Why commented and not just removed?

@apeyser

apeyser Nov 28, 2016

Contributor

Why commented and not just removed?

extras/help_generator/writers.py
- elif(c < 32):
- hlp_list.append("%s\t%s" % (item['name'],
- item['fullname']))
+ c = len(name)

This comment has been minimized.

@apeyser

apeyser Nov 28, 2016

Contributor

'\t' * (16- min(c,60)//4)

@apeyser

apeyser Nov 28, 2016

Contributor

'\t' * (16- min(c,60)//4)

This comment has been minimized.

@steffengraber

steffengraber Nov 28, 2016

Contributor

@apeyser I was looking for something like that. Perfect.

@steffengraber

steffengraber Nov 28, 2016

Contributor

@apeyser I was looking for something like that. Perfect.

@apeyser apeyser merged commit ec235a2 into nest:master Nov 28, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@lekshmideepu

This comment has been minimized.

Show comment
Hide comment
@lekshmideepu

lekshmideepu Nov 30, 2016

Contributor

Merge commit fails in Travis build as it is unable to find the log files in the build directory.

$ cd $TRAVIS_BUILD_DIR/build
$ tar -zcvf logfiles.tar.gz ./*.log
tar: ./*.log: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors

It is looking for the following files:

$ tar -zcvf logfiles.tar.gz ./*.log
./install-help.log
$ tar -zcvf reports.tar.gz ./reports
./reports/
./reports/installcheck.log
./reports/TEST-core.phase_2.xml
./reports/TEST-core.phase_1.xml
./reports/TEST-core.phase_4.xml
./reports/TEST-core.phase_3.xml

solution: Need to edit the .travis.yml file to look for new .html and .hlp files

Contributor

lekshmideepu commented Nov 30, 2016

Merge commit fails in Travis build as it is unable to find the log files in the build directory.

$ cd $TRAVIS_BUILD_DIR/build
$ tar -zcvf logfiles.tar.gz ./*.log
tar: ./*.log: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors

It is looking for the following files:

$ tar -zcvf logfiles.tar.gz ./*.log
./install-help.log
$ tar -zcvf reports.tar.gz ./reports
./reports/
./reports/installcheck.log
./reports/TEST-core.phase_2.xml
./reports/TEST-core.phase_1.xml
./reports/TEST-core.phase_4.xml
./reports/TEST-core.phase_3.xml

solution: Need to edit the .travis.yml file to look for new .html and .hlp files

@heplesser

This comment has been minimized.

Show comment
Hide comment
@heplesser

heplesser Nov 30, 2016

Contributor

@lekshmideepu Thank you very much for your detective work! Could you turn this into a new issue with severity "Critical"?

Contributor

heplesser commented Nov 30, 2016

@lekshmideepu Thank you very much for your detective work! Could you turn this into a new issue with severity "Critical"?

@lekshmideepu

This comment has been minimized.

Show comment
Hide comment
@lekshmideepu

lekshmideepu Dec 1, 2016

Contributor

@heplesser sure.done!
#572

Contributor

lekshmideepu commented Dec 1, 2016

@heplesser sure.done!
#572

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