-
-
Notifications
You must be signed in to change notification settings - Fork 77
Restructure the POD of macros #1244
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
base: PG-2.20
Are you sure you want to change the base?
Conversation
ea9d812
to
52d9c92
Compare
21d6afc
to
daac4b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trusting that this is only POD edits as advertised. I'm not actually reading over all the changes.
daac4b1
to
39ce4ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are several changes that are needed.
Make sure that if a file has =encoding utf8
that that is NOT removed. Also, note that there is also a unicode character used in macros/parsers/parserLinearInequality.pl
, and so that file should have =encoding utf8
added to the beginning. Please add that.
Go through all files that you added comments at the beginning regarding deprecation and such, and remove those comments. We could start a GitHub discussion about that, but it should not be added to the code.
macros/contexts/contextBoolean.pl
Outdated
@@ -13,7 +17,7 @@ =head1 DESCRIPTION | |||
|
|||
Context('Boolean'); | |||
|
|||
=head2 CONSTANTS | |||
=head3 CONSTANTS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This jumps from head1
to head3
and skips head2
which should never be done. podchecker
gives several warnings like *** WARNING: =head3 without preceding higher level at line 20 in file macros/contexts/contextBoolean.pl
because of this. This also causes odd display issues in the sidebar of the generated HTML for the POD. Drop the =head3
s to =head2
s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may switch this to =head1, since I'm using the values of =head2 to performing searches on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is no longer the case in openwebwork/webwork2#2759. That was a bad idea as I mentioned in that pull request. The problem is that there is no guarantee that methods or functions will be at the header level of 2, and the Pod::Simple::SimpleTree
does not provide the structure to divine the level that methods or functions will be at. So instead my approach just uses "terms" from the POD headers in general. It disregards words like "synopsis" and "description" and such.
macros/ui/source.pl
Outdated
@@ -1,3 +1,5 @@ | |||
# Note: this probably no longer works using CGI unless specifically set up. Deprecate? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As with all of these comments that you have added at the beginnings of files, remove it. Also, note that this should not be deprecated. It does take special set up (and always has), but it still has its uses and does still work. Of course it should never be used in a problem for a course, and should not be used in problems added to the OPL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking depcrecating this because I didn't think that CGI scripts would currently work with most WW installations--maybe reconfigure mojolicious to do this for us.
I added comments at the top of other lines--I meant to ask others about deprecating other macros.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It only works when serving webwork2 via a proxy (like apache2 or nginx). That doesn't mean it should be deprecated. This still has its uses. The point of this is for rather special cases, like wanted a convenient button to show the problem source when you are giving a problem authoring presentation. As I noted, this should not be used for production problems that will be used in a course. That has always been the case.
For consistency the POD of macros have been updated so that there is a `=HEAD1 NAME` with the following structure: ``` macroName.pl - short description. ```
48fe516
to
b7c2dae
Compare
By the way, one thing I noticed while looking at this pull request is that there is a very common misspelling in the POD of PG. The word
It wouldn't hurt to fix that. |
Also fixes spelling of SYNOPSIS
Changed the spelling of SYNOPSIS and fixed a number of other POD errors in modules seen using |
For consistency the POD of macros have been updated so that there is a
=head1 NAME
with the following structure:Also, any method or function names will have the form:
This is helpful in conjunction with openwebwork/webwork2#2733 to extract information from the macro files.