Skip to content

Commit

Permalink
0.2 docs
Browse files Browse the repository at this point in the history
  • Loading branch information
samirelanduk committed Apr 25, 2021
1 parent 4b83aef commit d0a4515
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 3 deletions.
9 changes: 9 additions & 0 deletions docs/source/changelog.rst
@@ -1,6 +1,15 @@
Changelog
---------

Release 0.2.0
~~~~~~~~~~~~~

`25 April 2021`

* Added ability to sort results.
* Created shorthand system for common sort criteria.


Release 0.1.0
~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Expand Up @@ -23,7 +23,7 @@
author = "Sam Ireland"

# The full version, including alpha/beta/rc tags
release = "0.1"
release = "0.2.0"


# -- General configuration ---------------------------------------------------
Expand Down
21 changes: 21 additions & 0 deletions docs/source/overview.rst
Expand Up @@ -20,3 +20,24 @@ object over the network. Generally it is better to paginate the results:
>>> first_ten_codes = pdbsearch.search(limit=10)
>>> second_ten_codes = pdbsearch.search(start=10, limit=10)
>>> third_ten_codes = pdbsearch.search(start=20, limit=10)

You can sort the results by any of the terms at
`<https://search.rcsb.org/search-attributes.html>`_:

>>> most_recent_codes = pdbsearch.search(sort="rcsb_accession_info.deposit_date")
>>> earliest_codes = pdbsearch.search(sort="-rcsb_accession_info.deposit_date")

As these are somewhat cumbersome, some of them have a shorthand:

>>> pdbsearch.search(limit=5, sort="code")
['9XIM', '9XIA', '9WGA', '9RUB', '9RSA']
>>> pdbsearch.search(limit=5, sort="-resolution")
['3NIR', '5D8V', '1EJG', '3P4J', '5NW3']

You can sort by multiple criteria:

>>> pdbsearch.search(limit=5, sort=["-atoms", "released"])
['1ANP', '6UOU', '6UOW', '1Q7O', '6QTF']



2 changes: 1 addition & 1 deletion pdbsearch/__init__.py
@@ -1,4 +1,4 @@
from .rcsb import search

__author__ = "Sam Ireland"
__version__ = "0.1.0"
__version__ = "0.2.0"
3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -5,7 +5,7 @@

setup(
name="pdbsearch",
version="0.1.0",
version="0.2.0",
description="A library for searching for PDB structures using the official APIs.",
long_description=long_description,
long_description_content_type="text/x-rst",
Expand All @@ -23,6 +23,7 @@
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
keywords="chemistry bioinformatics proteins biochemistry molecules PDB MMCIF",
packages=["pdbsearch"],
Expand Down

0 comments on commit d0a4515

Please sign in to comment.