Skip to content

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

Open
wants to merge 5 commits into
base: PG-2.20
Choose a base branch
from

Conversation

pstaabp
Copy link
Member

@pstaabp pstaabp commented Jun 9, 2025

For consistency the POD of macros have been updated so that there is a =head1 NAME with the following structure:

macroName.pl - short description.

Also, any method or function names will have the form:

=head2 function_name

This is helpful in conjunction with openwebwork/webwork2#2733 to extract information from the macro files.

@pstaabp pstaabp force-pushed the restructure-pod-macros branch 3 times, most recently from ea9d812 to 52d9c92 Compare June 10, 2025 11:29
@pstaabp pstaabp force-pushed the restructure-pod-macros branch 3 times, most recently from 21d6afc to daac4b1 Compare June 17, 2025 18:24
Copy link
Contributor

@Alex-Jordan Alex-Jordan left a 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.

@pstaabp pstaabp force-pushed the restructure-pod-macros branch from daac4b1 to 39ce4ca Compare June 21, 2025 02:36
Copy link
Member

@drgrice1 drgrice1 left a 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.

pstaabp added 3 commits June 30, 2025 17:26
For consistency the POD of macros have been updated so that there is a `=HEAD1 NAME` with the following structure:

```
macroName.pl - short description.
```
@pstaabp pstaabp force-pushed the restructure-pod-macros branch from 48fe516 to b7c2dae Compare June 30, 2025 21:49
@drgrice1
Copy link
Member

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 SYNOPSIS is often spelled SYNPOSIS. The following files have this mispelled:

  • lib/AnswerHash.pm
  • lib/AnswerIO.pm
  • lib/Applet.pm
  • lib/Circle.pm
  • lib/Fun.pm
  • lib/Hermite.pm
  • lib/Label.pm
  • lib/Parser/Legacy/PGcomplexmacros.pl
  • lib/VectorField.pm
  • lib/WWPlot.pm
  • lib/WeBWorK/PG/EquationCache.pm
  • lib/WeBWorK/PG/ImageGenerator.pm
  • lib/WeBWorK/PG/RestrictedClosureClass.pm
  • lib/WeBWorK/PG/Translator.pm
  • macros/PG.pl
  • macros/answers/extraAnswerEvaluators.pl
  • macros/core/PGanswermacros.pl
  • macros/core/PGessaymacros.pl
  • macros/deprecated/CofIdaho_macros.pl
  • macros/deprecated/PGsequentialmacros.pl
  • macros/graph/PGgraphmacros.pl
  • macros/graph/PGstatisticsGraphMacros.pl
  • macros/math/LinearProgramming.pl

It wouldn't hurt to fix that.

@pstaabp
Copy link
Member Author

pstaabp commented Jul 1, 2025

Changed the spelling of SYNOPSIS and fixed a number of other POD errors in modules seen using podchecker.

Copy link
Member

@drgrice1 drgrice1 left a comment

Choose a reason for hiding this comment

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

I think that you should be more careful with the choice of header levels. Those have meaning. You initially had an objective of putting methods and functions at the head2 level. That led to some bad things. Look over the changes carefully and revert things that shouldn't have been done.

Perhaps consider breaking this massive pull request up into a few files at a time also.

@pstaabp
Copy link
Member Author

pstaabp commented Jul 7, 2025

I think I'll split this up into smaller PRs and now that we have openwebwork/webwork#2759, I'll revert the changes from =head2 to =head1.

Some other formatting fixes.
@pstaabp pstaabp force-pushed the restructure-pod-macros branch from 0cd1971 to abbefab Compare July 7, 2025 19:59
@pstaabp
Copy link
Member Author

pstaabp commented Jul 7, 2025

@drgrice1 I split off all of the perl modules in the lib/ directory and those are in #1264.

I tried to be more careful with the levels of the =head headers. There was also some cleanup of formatting of some macros (only in the POD).

Note: still a lot to be done. Some macros are bare of any documentation, but not sure those are worth putting effort into.

If this is still too large, I can split into two parts.

Copy link
Member

@drgrice1 drgrice1 left a comment

Choose a reason for hiding this comment

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

Clearly this pull request would not be so big if there were not so many changes made that shouldn't have been made to begin with.

@pstaabp
Copy link
Member Author

pstaabp commented Jul 9, 2025

@drgrice1 fixed all of your comments. I'll start a GitHub discussion with a list of many of the comments I put at the top of the macros.

@Alex-Jordan
Copy link
Contributor

I opened several PRs that break this one down by folder. I thought it might help review things to do it in small doses. If it's fine to just continue with this PR, that's fine. And then in that case please ignore #1266 through #1273.

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

Successfully merging this pull request may close these issues.

4 participants