-
-
Notifications
You must be signed in to change notification settings - Fork 77
Move macros from OPL to PG #724
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
Conversation
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.
You claim that this is built on top of #709, but it seems there is more than that in here. Looking at the git log of this branch it seems that this is actually built on top of the pg-overhaul branch in my fork (at least as it was a couple of days ago). That branch is built on top of the migration_to_test2_new branch in my fork. These are branches that I have been working on that I have not put in as pull requests yet and I haven't even mentioned that I was working on them yet. The migration_to_test2_new branch is built on top of a combination of the migration_to_test_2_update and pg-envir-work branches in my fork. The migration_to_test_2_update branch is currently a pull request to the branch for pull request #702. The pg-envir-work branch is #709.
So this pull request is pending two or even three of my upcoming pull requests. Also, as mentioned above, that is as the pg-overhaul branch was a couple of days ago, and is missing some of the changes I have made to that branch.
Now with that said, here are some things that I observed in addition to my comments for specific files.
All of the added files (and a few macros from before) need to have the executable bit removed. find /opt/webwork/pg/macros -name '*.pl' -exec chmod -x {} \;
will take care of that.
In addition to the comments I left for the t/macros/load_macros.t file, the file needs to be perltidied.
If we are going to add all of these macros to pg, then in some sense we are making them officially adopted macros. Are we sure that is what is desired with all of them? I think I don't completely agree with that. In particular I am not happy with adding macros that are named for a university like CofIdaho_macros.pl and Dartmouthmacros.pl (and others like that). I have tolerated the unionLists.pl and unionTables.pl macros since they have been there for a long time, but I am not okay with adding more. I would actually rather see those stay in the OPL where they currently reside. If the OPL macros must come here, then they should at least be separated from the officially sanctioned macros in some way and not mixed in with the existing macros in the same directory. I think we need to talk about this more.
Many of these added macros are failing the load_macros.t test. If macros can't load without warnings then they need to at least be fixed before they can be added to pg.
I guess I did base this on the pg-overhaul branch. There are only two commits here, so can probably fall back to a different branch and cherry pick these if desired. I was looking at any changes to macro files, and tried to get out in front of those. If we decide to go ahead with this new directory structure, we need to be careful to make sure we're moving the latest version of each macro.
I agree. Let's discuss these. There are a few (like you pointed out) that seem to be very university specific. I've been trying to think of a different way of handling these, however since there are problems in the OPL (therefore official) that call these macros, I think by default these are official. They were just in a separate location.
That's on my todo list and I cited that above. I wanted to get this branch out there so we can discuss. Currently, I have only copied files and updated the |
I think that you should base this off of my |
2358450
to
13b60d8
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.
Getting closer.
Note the |
I'm getting the redefined subroutine errors when rendering a problem in WeBWorK. I've been moving the loadMacros call to inside the _init_XXX subs to ensure that macros are only loaded once. |
13b60d8
to
25d0b0b
Compare
Do NOT do that. If you are getting those warnings it is another problem. It should not be an error to load a macro multiple times, and should also not give any warnings. You are not doing something right. I have tested this, and do not get those warnings. |
19db9d7
to
ca28c35
Compare
ca28c35
to
a7f1e65
Compare
Just opened openwebwork/webwork2#1803 and openwebwork/webwork-open-problem-library#949 as companions to this PR. |
01b66c3
to
7030ddf
Compare
This is now based on #726 and is ready for testing. Of the problems in the set attached above, problems with the macro Question before "undrafting" this PR: should we determine which macros should be deprecated and not include those in PG or should that be a separate PR? |
7030ddf
to
2324f8b
Compare
Recently updated macros that were updated on the develop branch. This includes
|
f76e4c1
to
18da3d6
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.
This generally looks good. However there are a few minor issues. Instead of listing them here, I just put in a pull request to your branch for this pull request with suggested changes to address the issues.
Suggested changes to openwebwork#724.
Just saw that and merged it. |
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 think this is ready to go now.
1121528
to
1a20b10
Compare
Moved deprecated macros into PG/macros/deprecated. Ready to test again. |
@pstaabp I just ran across a minor issue in macros/FortLewis/AnswerFormatHelp.pl, though with this change unsure if I should report the issue here (in thought it can be fixed after this move) or to the open-problem-library repo. |
1a20b10
to
89dab3d
Compare
89dab3d
to
e2357a4
Compare
WIP: continued moving of macros into PG/macros and subdirectories. WIP: move macros from OPL to PG
Update load_macros to find all macros in new directory structure. Update load_macros to find all macros in new directory structure.
FIX: warnings in some macro files. FIX:
WIP: remove university-related macros
… PRs. WIP: fix merge on PGloadmacros.pm and update macros changed in recent PRs. WIP: fix merge on PGloadmacros.pm and update macros changed in recent PRs.
Make the macrosPath directories the same in pg/conf/pg_config.dist.yml as they are in webwork2/conf/defaults.config. Fix markdown lint issues in macros/README.md. The main issue was duplicated headers. No two headers can be the same in markdown. Also remove the comment about LiveGraphics macros as it is no longer valid. Tweak the t/macros/load_macros.t file search and sort setup a bit.
e2357a4
to
d2c0145
Compare
This PR does a few related things.
PG_ROOT/macros
directory.t/load_macros.t
test to recursively search thePG_ROOT/macros
directoryfor macros instead of the assumed old directory structure.
Also for testing, the following homework set was used. set_with_every_macro.def.txt This set contains at least one problem for every macro with problems in the OPL. There are a few macros with no OPL/Contrib problems.
A number of issues arose while doing this.
Lastly, to keep the size of this discussion box reasonable, all of the changes are documented in
PG_ROOT/macros/README.md
. Clearly these can be added to this discussion or some other way of documenting all of these change. Because this involved moving files from one repository to another, git will not track specific changes, just additions and deletions.This is based on #709 because of the update to the testing infrastructure makes it much easier to do testing with this PR.
Todo:
algebraMacros.pl
,unionMacros.pl
,PGmiscevaluators.pl
,PGanswermacros.pl
,PGstringevaluators.pl
,PGnumericevaluators.pl
PGcommonFunctions.pl
,PGanswermacros.pl
,PGbasicmacros.pl
,PGauxiliaryFunctions.pl
,contextLimitedRadicalComplex.pl
,contextRationalExponent.pl
,contextFiniteSolutionSets.pl
,SystemsOfLinearEquationsProblemPCC.pl
,SolveLinearEquationPCC.pl
,interpMacros.pl
,PCCfactor.pl
)