Closed Sathya-S3 closed 3 months ago
Thanks Sathya - that looks like it nicely captures the requirements that the users wanted!
The only major thing I would add would be tests of the new functionality, specifically the boolean NOT queries both by themselves and in conjunction with other queries.
@jkshenton The last commit a920dea includes the necessary CI tests added to showcase the NOT Boolean searches. The NOT queries are simply triggered by setting 'boolean' argument to True when calling the search_record() function.
NOT cases have been included for doi, External database reference, and license search parameters.
NOT case has not been written for the magnetic shielding and electric field gradient cases. The unittest() is set to skip the nmr parameter tests because mongomock at the moment does not support MongoDB query functions such as '$anyElementTrue' and '$map' which are used by these functions. Therefore, the test will exit with a custom warning message 'MongoDB mock does not support this search, skipping test case'. This is a limitation of mongomock only, not that of pymongo or MongoDB.
Great, thanks Sathya. I've now merged
HTML changes: file: index.html
file: version_table.html Minor change - corrected code indentation.
Custom stylesheet changes: file: stylesheet.css Styles added for custom toggle switch appearance and its states.
JavaScript changes: file: search.js Added 'boolean' variable to 'args' under the search_specs scope variable to track the state of the toggle switch.
Backend python changes: file: search.py
file: server.py Added 'boolean' variable to avoid errors when getting records.
Test files change for CI: tests/py/mdb_test.py