Skip to content
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

[tools] Implement lorisInstance in tools directory #9397

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

victori444
Copy link
Contributor

@victori444 victori444 commented Oct 8, 2024

Brief summary of changes

  • Implements lorisInstance in detect_conflicts.php

  • Resolves other errors found in detect_conflicts.php & fix_candidate_age.php (accessing $commentIDs as an array & querying Test_name)

  • Have you updated related documentation?

Testing instructions (if applicable)

  1. Run each of the scripts below and verify that no errors are thrown

Link(s) to related issue(s)

@victori444 victori444 added State: Needs work PR awaiting additional work by the author to proceed and removed State: Needs work PR awaiting additional work by the author to proceed labels Oct 8, 2024
@CamilleBeau
Copy link
Contributor

@victori444 Assigning to you to resolve conflicts and then I'll test / review!

@driusan
Copy link
Collaborator

driusan commented Nov 11, 2024

does this resolve the issue listed or only partially resolve it? (There are many places listed in the issue and merging it with "Resolved" will close the issue automatically)

@CamilleBeau
Copy link
Contributor

According to the comments of the issue, these were the only 2 remaining out of the initial list

@victori444 victori444 force-pushed the 2024_10_08_LorisInstance_In_Tools branch from 4b6a810 to 11e3717 Compare November 11, 2024 20:15
@victori444 victori444 removed their assignment Nov 12, 2024
Copy link
Contributor

@CamilleBeau CamilleBeau 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 getting a lot of these when running detect_conflicts -r all -y:
image

@@ -84,7 +84,6 @@
JOIN candidate c ON c.CandID=s.CandID
JOIN test_names tn ON tn.ID=f.TestID
WHERE c.Active='Y' AND s.Active='Y'

Copy link
Contributor

Choose a reason for hiding this comment

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

Could we remove this change?

Copy link
Contributor

Choose a reason for hiding this comment

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

Still seeing just a whitespace change here

@CamilleBeau CamilleBeau added the State: Needs work PR awaiting additional work by the author to proceed label Nov 18, 2024
@victori444 victori444 removed their assignment Nov 19, 2024
@victori444 victori444 removed the State: Needs work PR awaiting additional work by the author to proceed label Nov 19, 2024
tools/detect_conflicts.php Outdated Show resolved Hide resolved
tools/detect_conflicts.php Show resolved Hide resolved
@CamilleBeau CamilleBeau added the State: Needs work PR awaiting additional work by the author to proceed label Nov 25, 2024
@victori444 victori444 removed the State: Needs work PR awaiting additional work by the author to proceed label Dec 6, 2024
Copy link
Contributor

@CamilleBeau CamilleBeau left a comment

Choose a reason for hiding this comment

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

Getting this error when running:

(base) lorisadmin@cbeaudoin-dev:/var/www/loris/tools$ php detect_conflicts.php -r all -y
Array
(
[r] => all
[y] =>
)
Removing ignored conflicts

PHP Fatal error: Uncaught Error: Cannot use object of type LORIS\Database\Query as array in /var/www/loris/tools/detect_conflicts.php:595
Stack trace:
#0 /var/www/loris/tools/detect_conflicts.php(146): detectIgnoreColumns()
#1 {main}
thrown in /var/www/loris/tools/detect_conflicts.php on line 595

@@ -84,7 +84,6 @@
JOIN candidate c ON c.CandID=s.CandID
JOIN test_names tn ON tn.ID=f.TestID
WHERE c.Active='Y' AND s.Active='Y'

Copy link
Contributor

Choose a reason for hiding this comment

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

Still seeing just a whitespace change here

tools/detect_conflicts.php Show resolved Hide resolved
tools/detect_conflicts.php Show resolved Hide resolved
@CamilleBeau CamilleBeau added the State: Needs work PR awaiting additional work by the author to proceed label Dec 9, 2024
@victori444 victori444 force-pushed the 2024_10_08_LorisInstance_In_Tools branch from 588142f to 15fa08b Compare December 13, 2024 15:59
@victori444
Copy link
Contributor Author

Getting this error when running:

(base) lorisadmin@cbeaudoin-dev:/var/www/loris/tools$ php detect_conflicts.php -r all -y
Array
(
[r] => all
[y] =>
)
Removing ignored conflicts
PHP Fatal error: Uncaught Error: Cannot use object of type LORIS\Database\Query as array in /var/www/loris/tools/detect_conflicts.php:595
Stack trace:
#0 /var/www/loris/tools/detect_conflicts.php(146): detectIgnoreColumns()
#1 {main}
thrown in /var/www/loris/tools/detect_conflicts.php on line 595

Hm I don't get this error - I think this may be the error that the PR changes resolve since line 595 in the current script is where $commentids is being accessed as an array ($commentids[0]['CommentID'])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
State: Needs work PR awaiting additional work by the author to proceed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[tools] Implement LorisInstance in tools directory
3 participants