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 2 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.

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 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.

@@ -193,10 +188,10 @@ sub ignore_order {

=back
Copy link
Member

Choose a reason for hiding this comment

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

This line needs to be deleted. It is a =back without =over.

@@ -13,7 +17,7 @@ =head1 DESCRIPTION

Context('Boolean');

=head2 CONSTANTS
=head3 CONSTANTS
Copy link
Member

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 =head3s to =head2s.

@@ -82,7 +76,7 @@ =head1 USAGE
numebrs would be displayed in standard form.


=head1 LISTS IN ALTERNATE FORMAT
=head3 LISTS IN ALTERNATE FORMAT
Copy link
Member

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 also. Drop the =head3s to =head2.

@@ -83,7 +78,7 @@ =head1 USAGE
would allow students to enter intervals in either format, but all
intervals would be displayed in standard form.

=head1 Setting the alternate form as the default
=head3 Setting the alternate form as the default
Copy link
Member

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 also. Drop the =head3s to =head2.

@@ -75,7 +73,7 @@ =head1 DESCRIPTION

The last two digits for C<base64> are nonstandard. We want to avoid '+' and '/' here as they have arithmetic meaning.

=head2 Sample PG problem
=head3 Sample PG problem
Copy link
Member

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 also. Drop the =head3s to =head2.


=head1 NAME

SystemOfLinearEquationsProblemPCC.pl -
Copy link
Member

Choose a reason for hiding this comment

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

Remove the - at the end of this line. Either that or add something after it.

@@ -1,25 +1,19 @@

=encoding utf8

=head1 NAME
Copy link
Member

Choose a reason for hiding this comment

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

Add =encoding utf8 back to this file. It is there for a reason. The POD uses unicode characters, and removing this line causes warnings.

@@ -1,25 +1,21 @@

=encoding utf8

=head1 NAME
Copy link
Member

Choose a reason for hiding this comment

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

Also add =encoding utf8 back to this file.


=head1 NAME

tableau_main_subroutines.pl -
Copy link
Member

Choose a reason for hiding this comment

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

Remove the - at the end of this line. Either that or add something after it.

@@ -1,3 +1,5 @@
# Note: this probably no longer works using CGI unless specifically set up. Deprecate?
Copy link
Member

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.

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