Closed lacoperon closed 3 years ago
Thank you, I pushed a minor update adding clients
to setup.py
, as well as an empty __init__.py
I had thought that the latter was not necessary for Python 3, but it looks like it actually needs to be in each subdirectory to avoid that pesky ModuleNotFound
error.
I just had a chance to play around with these updates---thank you, this is really amazing! I fixed a few minor bugs, and extended setup.py
.
Eventually I will migrate all the legacy Query
functions in pypdb.py
to use perform_search
under the hood; most of the functions in the older versions can be deprecated eventually.
Thanks again, this is really amazing!
Totally yeah, that was the hope (that we can use the new functions under-the-hood in the meantime).
I assume the other critical thing we're currently missing is the Data API, which is in the works (probably in the next week? IDK depends how motivated I feel).
Added Support for QueryGraph-Based Searches
The new API allows for building up search queries based on boolean aggregation of various search query nodes. I did this through implementing
perform_search_through_graph
, withinsearch_client.py
.Example Question
For example, you can ask "I would like structures that are under 4 angstroms, and published after 2019 using CryoEM, and are either Homo sapiens or Mus musculus".
Example Syntax for Group Query
(this specific example asks for structures under 4 angstroms that are Homo sapiens or Mus musculus, but you can go as complicated as you like hypothetically).
I added this example to
EXAMPLES.md
.Bugfixes
Fixed bug in which you couldn't correctly query for structure resolution. (due to needing to support integer QueryNode values).
Tests +
mypy
All tests pass, and all files pass
mypy
typing analysis. (Done using:mypy --namespace-packages pypdb/clients/search/search_client_test.py
or another path)