Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ build:
sphinx:
configuration: docs/source/conf.py

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
# python:
# install:
# - requirements: docs/requirements.txt
# Install the package itself (and its runtime dependencies) so that autodoc can
# import it; without this, every autodoc directive outside bibtexparser.model
# fails on the missing pylatexenc import and the API page comes out near-empty.
python:
install:
- method: pip
path: .
extra_requirements:
- docs
2 changes: 2 additions & 0 deletions bibtexparser/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ def write_file(
Only applicable if `unparse_stack` is None.
:param bibtex_format: Customized BibTeX format to use (optional).
:param encoding: Encoding of the .bib file. Default encoding is ``"UTF-8"``.

Writing a library with at least ``LARGE_LIBRARY_WARNING_THRESHOLD`` blocks logs a warning
if the unparse stack deep-copies blocks (middlewares with ``allow_inplace_modification=False``),
as that is slow; pass an all-in-place stack to avoid it.
Expand Down Expand Up @@ -374,6 +375,7 @@ def write_string(
:param prepend_middleware: List of middleware to prepend to the default stack.
Only applicable if `unparse_stack` is None.
:param bibtex_format: Customized BibTeX format to use (optional).

Writing a library with at least ``LARGE_LIBRARY_WARNING_THRESHOLD`` blocks logs a warning
if the unparse stack deep-copies blocks (middlewares with ``allow_inplace_modification=False``),
as that is slow; pass an all-in-place stack to avoid it.
Expand Down
28 changes: 28 additions & 0 deletions bibtexparser/middlewares/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,31 @@

from .parsestack import default_parse_stack
from .parsestack import default_unparse_stack

# Declared explicitly so that sphinx autodoc documents these re-exports;
# without __all__, `automodule:: bibtexparser.middlewares` skips them all
# as imported members.
__all__ = [
"AddEnclosingMiddleware",
"BlockMiddleware",
"LatexDecodingMiddleware",
"LatexEncodingMiddleware",
"LibraryMiddleware",
"MergeCoAuthors",
"MergeNameParts",
"MonthAbbreviationMiddleware",
"MonthIntMiddleware",
"MonthLongStringMiddleware",
"NameParts",
"NormalizeFieldKeys",
"RemoveEnclosingMiddleware",
"ResolveStringReferencesMiddleware",
"SeparateCoAuthors",
"SortBlocksByTypeAndKeyMiddleware",
"SortBlocksMiddleware",
"SortFieldsAlphabeticallyMiddleware",
"SortFieldsCustomMiddleware",
"SplitNameParts",
"default_parse_stack",
"default_unparse_stack",
]
Loading