dronefly-core 0.3.9.dev1__py3-none-any.whl → 0.3.9.dev2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dronefly/core/parsers/constants.py +5 -3
- dronefly/core/parsers/natural.py +8 -0
- dronefly/core/query/query.py +8 -4
- {dronefly_core-0.3.9.dev1.dist-info → dronefly_core-0.3.9.dev2.dist-info}/METADATA +1 -1
- {dronefly_core-0.3.9.dev1.dist-info → dronefly_core-0.3.9.dev2.dist-info}/RECORD +7 -7
- {dronefly_core-0.3.9.dev1.dist-info → dronefly_core-0.3.9.dev2.dist-info}/LICENSE +0 -0
- {dronefly_core-0.3.9.dev1.dist-info → dronefly_core-0.3.9.dev2.dist-info}/WHEEL +0 -0
|
@@ -27,14 +27,16 @@ REMAINING_ARGS = list(ARGPARSE_ARGS)[1:]
|
|
|
27
27
|
MACROS = {
|
|
28
28
|
"rg": {"opt": ["quality_grade=research"]},
|
|
29
29
|
"nid": {"opt": ["quality_grade=needs_id"]},
|
|
30
|
-
"oldest": {"
|
|
31
|
-
"newest": {"
|
|
30
|
+
"oldest": {"asc": None, "sort by": "observed"},
|
|
31
|
+
"newest": {"desc": None, "sort by": "observed"},
|
|
32
32
|
"my": {"by": "me"},
|
|
33
33
|
"home": {"from": "home"},
|
|
34
|
-
"faves": {"
|
|
34
|
+
"faves": {"sort by": "votes", "opt": ["popular"]},
|
|
35
35
|
"spp": {"opt": ["hrank=species"]},
|
|
36
36
|
"species": {"opt": ["hrank=species"]},
|
|
37
37
|
"unseen": {"not by": "me", "from": "home"},
|
|
38
|
+
"most": {"per": "species", "sort by": "obs"},
|
|
39
|
+
"least": {"per": "species", "sort by": "obs", "asc": None},
|
|
38
40
|
}
|
|
39
41
|
# Groups of taxa:
|
|
40
42
|
# - can't function in place of a single taxon, and are typically only used in
|
dronefly/core/parsers/natural.py
CHANGED
|
@@ -208,6 +208,14 @@ class NaturalParser(UnixlikeParser):
|
|
|
208
208
|
expanded_tokens.extend(["--from", params["from"]])
|
|
209
209
|
if "of" in params:
|
|
210
210
|
expanded_tokens.extend(["--of", params["of"]])
|
|
211
|
+
if "sort by" in params:
|
|
212
|
+
expanded_tokens.extend(["--sort-by", params["sort by"]])
|
|
213
|
+
if "asc" in params:
|
|
214
|
+
expanded_tokens.extend(["--asc"])
|
|
215
|
+
if "desc" in params:
|
|
216
|
+
expanded_tokens.extend(["--desc"])
|
|
217
|
+
if "per" in params:
|
|
218
|
+
expanded_tokens.extend(["--per", params["per"]])
|
|
211
219
|
if opts:
|
|
212
220
|
expanded_tokens.extend(["--opt", *opts])
|
|
213
221
|
|
dronefly/core/query/query.py
CHANGED
|
@@ -523,10 +523,14 @@ class QueryResponse:
|
|
|
523
523
|
with_or_and, lrank, hrank
|
|
524
524
|
)
|
|
525
525
|
else:
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
526
|
+
# For some commands "species and higher" filter is added only to
|
|
527
|
+
# make it match results on the web. Including this in the description
|
|
528
|
+
# would just be confusing.
|
|
529
|
+
if lrank != "species":
|
|
530
|
+
higher_or_lower = "higher" if lrank else "lower"
|
|
531
|
+
message += " {} rank {} or {}".format(
|
|
532
|
+
with_or_and, hrank or lrank, higher_or_lower
|
|
533
|
+
)
|
|
530
534
|
order_by = kwargs.get("order_by")
|
|
531
535
|
order = kwargs.get("order")
|
|
532
536
|
if order:
|
|
@@ -15,14 +15,14 @@ dronefly/core/models/config.py,sha256=okyoFtiNwuGHI5q5VMSo0cygVsKJfRTjb7Szd2TrUU
|
|
|
15
15
|
dronefly/core/models/controlled_terms.py,sha256=PomHh1vYa_JODf1psHkmEuXppr1c60yheNgyyi-JQp0,1753
|
|
16
16
|
dronefly/core/models/user.py,sha256=szidUUKGb0ORXfSH1DZggccPM_tllyOFiavytPeesfc,188
|
|
17
17
|
dronefly/core/parsers/__init__.py,sha256=TAcTBKh5jKHA042IL1eR-MvzaIhFuU5WENoj-kZrN_k,49
|
|
18
|
-
dronefly/core/parsers/constants.py,sha256=
|
|
19
|
-
dronefly/core/parsers/natural.py,sha256=
|
|
18
|
+
dronefly/core/parsers/constants.py,sha256=6t1pafnnWJNmUz6z0I8dvKXxhPpq6tgE1mo_yCeUd94,4355
|
|
19
|
+
dronefly/core/parsers/natural.py,sha256=N3KQcndxMr4ZkBh3ytCWRnwtQDhnhyJwQ3wfvkrGgqg,9636
|
|
20
20
|
dronefly/core/parsers/unixlike.py,sha256=xHXONb2NVMN6NyaUg-_4JgF6o-IJ164Xv4ZzKgUQamI,6501
|
|
21
21
|
dronefly/core/parsers/url.py,sha256=dlDowZPKesAftgmIa8mHj9yQo2nfXY_X0SwPO3Pqwas,2338
|
|
22
22
|
dronefly/core/query/__init__.py,sha256=rsefFtv31Bt2uAYViDul-3EU0S7g0AXFkvjoxy2VfHk,40
|
|
23
|
-
dronefly/core/query/query.py,sha256=
|
|
23
|
+
dronefly/core/query/query.py,sha256=G9LKZv5MlR8vEIKxeXVaqYw1fFeTpqD_xUCUO2AXytQ,23280
|
|
24
24
|
dronefly/core/utils/__init__.py,sha256=XYxrY-bJx--IY9jzkMzmqqilCdvkErWo5_fuMsRGUNU,1366
|
|
25
|
-
dronefly_core-0.3.9.
|
|
26
|
-
dronefly_core-0.3.9.
|
|
27
|
-
dronefly_core-0.3.9.
|
|
28
|
-
dronefly_core-0.3.9.
|
|
25
|
+
dronefly_core-0.3.9.dev2.dist-info/LICENSE,sha256=X_Hg5qhiv8jq7T5CoGF0BID61tY3930jcz61TM6fgJw,56939
|
|
26
|
+
dronefly_core-0.3.9.dev2.dist-info/METADATA,sha256=kKysFxQSc6Ha7QIVEoaXd0xcLnUhQlUURbQ5DXuxOcA,1440
|
|
27
|
+
dronefly_core-0.3.9.dev2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
28
|
+
dronefly_core-0.3.9.dev2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|