NASA-PDS / doi-service

Service and tools for generating DOIs for PDS bundles, collections, and data sets
https://nasa-pds.github.io/doi-service
Other
2 stars 3 forks source link

Unit tests for reserve.py and input_util.py due to unpinned pandas dependency #368

Closed alexdunnjpl closed 2 years ago

alexdunnjpl commented 2 years ago

šŸ› Describe the bug

Two unit tests fail. This is (probably) the result of a new pandas release, requiring a later version of openpyxl than the pinned openpyxl version.

šŸ“œ To Reproduce

Steps to reproduce the behavior:

Run the following or delete ./.tox in an existing repo and run tox. This bug will not present unless the tox environment is rebuilt.

cd /tmp
git clone https://github.com/NASA-PDS/doi-service.git
cd doi-service
python3 -m venv venv
source venv/bin/activate
pip install --editable '.[dev]'
# cp path/to/populated/pds_doi_service.ini ./
export CI=true; tox  # CI=true suppresses some tests which will fail without some specific, unrelated config dependencies populated

šŸ•µļø Expected behavior

Unit tests pass

šŸ©ŗ Test Data / Additional context

Failures are as follows

=========================== short test summary info ============================
FAILED src/pds_doi_service/core/actions/test/reserve_test.py::ReserveActionTestCase::test_reserve_xlsx_and_submit
FAILED src/pds_doi_service/core/input/test/input_util_test.py::InputUtilTestCase::test_read_xls
=========== 2 failed, 83 passed, 15 skipped, 145 warnings in 11.85s ============

resulting from

E                   ImportError: Pandas requires version '3.0.7' or newer of 'openpyxl' (version '3.0.3' currently installed).
alexdunnjpl commented 2 years ago

Fixed in #367

@jordanpadams would you like me to pin all pip dependencies to prevent something similar happening with others?