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

Code coverage dropped by 1% #129

Open
ncrubin opened this issue Jul 6, 2023 · 0 comments
Open

Code coverage dropped by 1% #129

ncrubin opened this issue Jul 6, 2023 · 0 comments

Comments

@ncrubin
Copy link
Collaborator

ncrubin commented Jul 6, 2023

In PR #128 where I fixed the Taylor expansion limit and max_expansion limit logic I introduced a logic path but did not explicitly test this path. Code coverage for the wavefunction.py module thus dropped 1%

Name                                                   Stmts   Miss  Cover   Missing
------------------------------------------------------------------------------------
src/fqe/__init__.py                                        3      0   100%
src/fqe/_fqe_control.py                                  146      0   100%
src/fqe/_version.py                                        2      0   100%
src/fqe/bitstring.py                                      55      0   100%
src/fqe/cirq_utils.py                                     40      0   100%
src/fqe/fci_graph.py                                     230      0   100%
src/fqe/fci_graph_set.py                                 105      0   100%
src/fqe/fqe_data.py                                     1472      0   100%
src/fqe/fqe_data_set.py                                  482      0   100%
src/fqe/fqe_decorators.py                                190      0   100%
src/fqe/fqe_ops/__init__.py                                1      0   100%
src/fqe/fqe_ops/fqe_operator.py                           13      0   100%
src/fqe/fqe_ops/fqe_ops.py                                60      0   100%
src/fqe/fqe_ops/fqe_ops_utils.py                          50      0   100%
src/fqe/hamiltonians/__init__.py                           1      0   100%
src/fqe/hamiltonians/diagonal_coulomb.py                  38      0   100%
src/fqe/hamiltonians/diagonal_hamiltonian.py              30      0   100%
src/fqe/hamiltonians/general_hamiltonian.py               48      0   100%
src/fqe/hamiltonians/gso_hamiltonian.py                   48      0   100%
src/fqe/hamiltonians/hamiltonian.py                       34      0   100%
src/fqe/hamiltonians/hamiltonian_utils.py                 90      0   100%
src/fqe/hamiltonians/restricted_hamiltonian.py            48      0   100%
src/fqe/hamiltonians/sparse_hamiltonian.py                74      0   100%
src/fqe/hamiltonians/sso_hamiltonian.py                   54      0   100%
src/fqe/lib/__init__.py                                   10      1    90%   14
src/fqe/lib/bitstring.py                                  19      0   100%
src/fqe/lib/cirq_utils.py                                 11      0   100%
src/fqe/lib/fci_graph.py                                  63      1    98%   128
src/fqe/lib/linalg.py                                     21      0   100%
src/fqe/lib/wick.py                                       24      0   100%
src/fqe/openfermion_utils.py                             146      0   100%
src/fqe/settings.py                                        9      0   100%
src/fqe/tensor/__init__.py                                 2      0   100%
src/fqe/tensor/tensor_utils.py                            61      0   100%
src/fqe/transform.py                                      42      0   100%
src/fqe/util.py                                          227      0   100%
src/fqe/wavefunction.py                                  623      2    99%   566, 598
src/fqe/wick.py                                          341      0   100%
tests/__init__.py                                          0      0   100%

Lines 566 and 598 are the additional for-else logic I added. A small test that builds a Hamiltonian and then sets max_expansion 1 one (so that Taylor and Chebyshev) won't converge is needed to test the Runtime error that should be raised.

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

No branches or pull requests

1 participant