bibcite-cli 0.5.1__tar.gz → 0.5.2__tar.gz

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.
Files changed (24) hide show
  1. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/PKG-INFO +1 -1
  2. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/pyproject.toml +1 -1
  3. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/src/bibcite/__init__.py +1 -1
  4. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/src/bibcite/sources.py +15 -0
  5. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/uv.lock +1 -1
  6. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/.gitignore +0 -0
  7. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/LICENSE +0 -0
  8. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/Readme.md +0 -0
  9. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/src/bibcite/bibfile.py +0 -0
  10. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/src/bibcite/cache.py +0 -0
  11. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/src/bibcite/cli.py +0 -0
  12. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/src/bibcite/data/strings.bib +0 -0
  13. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/src/bibcite/normalize.py +0 -0
  14. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/src/bibcite/resolve.py +0 -0
  15. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/src/bibcite/venues.py +0 -0
  16. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/tests/test_bibfile.py +0 -0
  17. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/tests/test_bugfixes.py +0 -0
  18. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/tests/test_entry_types.py +0 -0
  19. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/tests/test_normalize.py +0 -0
  20. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/tests/test_round2.py +0 -0
  21. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/tests/test_round3.py +0 -0
  22. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/tests/test_status_semantics.py +0 -0
  23. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/tests/test_strings_override.py +0 -0
  24. {bibcite_cli-0.5.1 → bibcite_cli-0.5.2}/tests/test_venues.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bibcite-cli
3
- Version: 0.5.1
3
+ Version: 0.5.2
4
4
  Summary: Resolve papers (arXiv id / DOI / title) to canonical, normalized BibTeX for agents and humans
5
5
  Project-URL: Repository, https://github.com/leo1oel/bibcite
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "bibcite-cli"
3
- version = "0.5.1"
3
+ version = "0.5.2"
4
4
  description = "Resolve papers (arXiv id / DOI / title) to canonical, normalized BibTeX for agents and humans"
5
5
  readme = "Readme.md"
6
6
  license = "MIT"
@@ -1,3 +1,3 @@
1
1
  """bibcite: canonical BibTeX resolution for papers (arXiv id / DOI / title)."""
2
2
 
3
- __version__ = "0.5.1"
3
+ __version__ = "0.5.2"
@@ -526,6 +526,11 @@ def try_crossref(title: str) -> Match | None:
526
526
  )
527
527
  if r.status_code == 429:
528
528
  raise SourceUnavailable("CrossRef rate-limited (429)")
529
+ if r.status_code >= 500:
530
+ # A dead endpoint (Unpaywall search 500s for days at a time)
531
+ # gets benched for the run instead of adding latency + noise
532
+ # to every remaining query.
533
+ raise SourceUnavailable(f"CrossRef server error ({r.status_code})")
529
534
  r.raise_for_status()
530
535
  payload = r.json()
531
536
  if payload.get("status") != "ok":
@@ -578,6 +583,11 @@ def try_unpaywall(title: str) -> Match | None:
578
583
  )
579
584
  if r.status_code == 429:
580
585
  raise SourceUnavailable("Unpaywall rate-limited (429)")
586
+ if r.status_code >= 500:
587
+ # A dead endpoint (Unpaywall search 500s for days at a time)
588
+ # gets benched for the run instead of adding latency + noise
589
+ # to every remaining query.
590
+ raise SourceUnavailable(f"Unpaywall server error ({r.status_code})")
581
591
  r.raise_for_status()
582
592
  ref = norm_title(title)
583
593
  for res in r.json().get("results") or []:
@@ -620,6 +630,11 @@ def openalex_search(title: str) -> dict | None:
620
630
  )
621
631
  if r.status_code == 429:
622
632
  raise SourceUnavailable("OpenAlex rate-limited (429)")
633
+ if r.status_code >= 500:
634
+ # A dead endpoint (Unpaywall search 500s for days at a time)
635
+ # gets benched for the run instead of adding latency + noise
636
+ # to every remaining query.
637
+ raise SourceUnavailable(f"OpenAlex server error ({r.status_code})")
623
638
  r.raise_for_status()
624
639
  ref = norm_title(title)
625
640
  for w in r.json().get("results") or []:
@@ -18,7 +18,7 @@ wheels = [
18
18
 
19
19
  [[package]]
20
20
  name = "bibcite-cli"
21
- version = "0.5.1"
21
+ version = "0.5.2"
22
22
  source = { editable = "." }
23
23
  dependencies = [
24
24
  { name = "bibtexparser" },
File without changes
File without changes
File without changes