Skip to content

Remove pandas dependency from QMCPACK tests#5732

Merged
ye-luo merged 5 commits intoQMCPACK:developfrom
brockdyer03:remove_pandas
Jan 14, 2026
Merged

Remove pandas dependency from QMCPACK tests#5732
ye-luo merged 5 commits intoQMCPACK:developfrom
brockdyer03:remove_pandas

Conversation

@brockdyer03
Copy link
Contributor

Proposed changes

This PR removes the dependency on the Python package pandas in QMCPACK tests which reduces the requirements for running testing. The affected tests are estimator/sofk and estimator/latdev.

In theory there is still a pandas dependency in src/QMCTools/PyscfToQmcpack_Spline.py, however that file has other errors that prevent me from testing it (in lines 133, 141, and 146). Since this can't be run, I don't think it matters much if pandas is removed from the QMCPACK docker files, although that is a job for @prckent if he thinks it's the right move.

What type(s) of changes does this code introduce?

  • Refactoring (no functional changes, no api changes)
  • Testing changes (e.g. new unit/integration/performance tests)

Does this introduce a breaking change?

  • No

What systems has this change been tested on?

Laptop

Checklist

    • I have read the pull request guidance and develop docs
    • This PR is up to date with the current state of 'develop'
    • Code added or changed in the PR has been clang-formatted
    • This PR adds tests to cover any new code, or to catch a bug that is being fixed
    • Documentation has been added (if appropriate)

@brockdyer03 brockdyer03 requested review from prckent and ye-luo and removed request for prckent January 13, 2026 16:57
ye-luo
ye-luo previously approved these changes Jan 13, 2026
@brockdyer03 brockdyer03 added testing dependencies Pull requests that update a dependency file python Pull requests that update python code labels Jan 13, 2026
@prckent
Copy link
Contributor

prckent commented Jan 13, 2026

I would like to review this ahead of merge.

@prckent
Copy link
Contributor

prckent commented Jan 13, 2026

Always good to reduce dependencies. Quick Q: What errors do you get with PyscfToQmcpack_Spline.py? How are you invoking it, what are you using it with (etc.)? We do have a test on it and it is meant to work. Again, like the other dependencies the pandas use should be minimal.

@brockdyer03
Copy link
Contributor Author

brockdyer03 commented Jan 13, 2026

I've not actually directly called up PyscfToQmcpack_Spline, however opening the file and inspecting the contents shows two undefined calls to what appear to be external libraries, one called lib and one called tools (lines 141 and 146 respectively). There's no import statements that would bring anything like that into scope. Additionally there is a reference to an undeclared variable kpts on line 133 which in theory should result in an error if it ever gets called.

I can't start to remove the pandas dependency (which seems to be for reading a JSON file and storing data) without having a file to look at.

@prckent
Copy link
Contributor

prckent commented Jan 13, 2026

On the splines, ** noting that it is not critical for this PR **: https://cdash.qmcpack.org/tests/42285105 shows it is "working" when PySCF is installed. However, the processing of the output fails in subsequent tests. There are some problems that need investigating. Could be test environment and not the tests.

Copy link
Contributor

@prckent prckent left a comment

Choose a reason for hiding this comment

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

Please remove changes from ornl_setup_environments.sh. More comments may follow.

(In general, please don't touch any test setup related config files without checking. We still actually need pandas! Removing it would break the spline conversion and potentially other uses.)

@prckent
Copy link
Contributor

prckent commented Jan 13, 2026

Assuming it works first try, I would like to see the results of #5735 before merging this. If not, this does look OK to merge and we should not hold it up further. #5735 will add some tests to the CI that are not currently run and that go through the pandas usage. I expect that this PR will pass with no further updates. [ This situation is another good motivation for getting python coverage working and reported on codecov. ]

Copy link
Contributor

@prckent prckent left a comment

Choose a reason for hiding this comment

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

Approving to unblock and allow merge if CI looks OK.

Tested by hand but did not try to trigger failure conditions

@prckent
Copy link
Contributor

prckent commented Jan 14, 2026

Test this please

@ye-luo ye-luo merged commit e9cd739 into QMCPACK:develop Jan 14, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update python code testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants