Skip to content

Commit

Permalink
Merge branch 'main' into fix-bibtex
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Jan 26, 2024
2 parents 62d99bd + 9dd0b09 commit 16eb2cc
Show file tree
Hide file tree
Showing 5 changed files with 702 additions and 16 deletions.
17 changes: 4 additions & 13 deletions habanero/crossref/crossref.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,10 @@ class Crossref:
One or more field queries. Field queries are searches on specific fields.
For example, using `query_author` searches author names instead of full search
across all fields as would happen by default. Acceptable field
query parameters are:
* `query_container_title` - Query container-title aka. publication name
* `query_author` - Query author given and family names
* `query_editor` - Query editor given and family names
* `query_chair` - Query chair given and family names
* `query_translator` - Query translator given and family names
* `query_contributor` - Query author, editor, chair and translator given and
family names
* `query_bibliographic` - Query bibliographic information, useful for citation
look up. Includes titles, authors, ISSNs and publication years. Crossref
retired `query_title`; use this field query instead
* `query_affiliation` - Query contributor affiliations
query parameters have all underscores where Crossref API documentation
has `.` or `-`. For example, `query.funder-name` using the Crossref API
should be `query_funder_name`. See "Field queries" under the Crossref API
documentation for the supported field queries.
.. _sorting:
Expand Down
4 changes: 2 additions & 2 deletions habanero/habanero_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def filter_dict(x):


def rename_query_filters(x):
newkeys = [re.sub("container_title", "container-title", v) for v in x]
newkeys = [re.sub("query_", "query.", v) for v in newkeys]
newkeys = [re.sub("query_", "query.", v) for v in x]
newkeys = [re.sub("_", "-", v) for v in newkeys]
mapping = dict(zip(x.keys(), newkeys))
return {mapping[k]: v for k, v in x.items()}

Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ruff==0.1.0
black==23.12.0
black==24.1.0
isort==5.13.2
Loading

0 comments on commit 16eb2cc

Please sign in to comment.