[build-system]
build-backend = "hatchling.build"
requires = ["hatchling>=1.10.0"]

[project]
name = "papis"
version = "0.14"
description = "Powerful and highly extensible command-line based document and bibliography manager"
readme = "README.rst"
keywords = [
    "biblatex",
    "bibtex",
    "biliography",
    "books",
    "cli",
    "command-line",
    "crossref",
    "datasheets",
    "document",
    "elsevier",
    "ieee",
    "latex",
    "libgen",
    "mathematics",
    "mendeley",
    "papers",
    "physics",
    "pubmed",
    "reference manager",
    "research",
    "science",
    "scihub",
    "tui",
    "zotero",
]
license = { text = "GPL-3.0" }
maintainers = [{ name = "Alejandro Gallo", email = "aamsgallo@gmail.com" }]
authors = [{ name = "Alejandro Gallo", email = "aamsgallo@gmail.com" }]
requires-python = ">=3.8"
classifiers = [
    "Development Status :: 4 - Beta",
    "Environment :: Console",
    "Intended Audience :: Developers",
    "Intended Audience :: Education",
    "Intended Audience :: End Users/Desktop",
    "Intended Audience :: Science/Research",
    "Intended Audience :: System Administrators",
    "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
    "Natural Language :: English",
    "Operating System :: MacOS",
    "Operating System :: Microsoft",
    "Operating System :: OS Independent",
    "Operating System :: POSIX",
    "Operating System :: Unix",
    "Programming Language :: Python :: 3 :: Only",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Topic :: Utilities",
]
dependencies = [
    "PyYAML>=3.12",
    "arxiv>=1.0.0",
    "beautifulsoup4>=4.4.1",
    "bibtexparser>=0.6.2,<2",
    "click>=7",
    "colorama>=0.2",
    "dominate",
    "filetype>=1.0.1",
    "habanero>=0.6",
    "isbnlib>=3.9.1",
    "lxml>=4.3.5",
    "platformdirs>=4.0.0",
    "prompt_toolkit>=3.0.5",
    "pygments>=2.2",
    "pyparsing>=2.2",
    "python-doi>=0.1.1",
    "python-slugify>=1.2.6",
    "requests>=2.11.1",
    "stevedore>=1.30",
]

[project.urls]
Documentation = "https://papis.readthedocs.io"
Repository = "https://github.com/papis/papis"

[project.optional-dependencies]
develop = [
    "flake8",
    "flake8-bugbear",
    "flake8-quotes",
    "Flake8-pyproject",
    "mypy>=0.7",
    "pep8-naming",
    "pylint",
    "pytest",
    "pytest-cov",
    "python-coveralls",
    "types-beautifulsoup4",
    "types-Pygments",
    "types-docutils",
    "types-python-slugify",
    "types-PyYAML",
    "types-requests",
]
docs = [
    "sphinx>=4",
    "sphinx_click",
    "sphinx_design",
    "sphinx_rtd_theme>=1",
]
lsp = [
    "python-lsp-server",
]
optional = [
    "Jinja2>=3.0.0",
    "Whoosh>=2.7.4",
    "chardet>=3.0.2",
    "markdownify>=0.11.6",
]
windows = [
    "pyinstaller"
]

[project.scripts]
papis = "papis.commands.default:run"

[project.entry-points.pytest11]
papis_testing = "papis.testing"

[project.entry-points."papis.command"]
add = "papis.commands.add:cli"
addto = "papis.commands.addto:cli"
bibtex = "papis.commands.bibtex:cli"
browse = "papis.commands.browse:cli"
cache = "papis.commands.cache:cli"
citations = "papis.commands.citations:cli"
config = "papis.commands.config:cli"
doctor = "papis.commands.doctor:cli"
edit = "papis.commands.edit:cli"
exec = "papis.commands.exec:cli"
explore = "papis.commands.explore:cli"
export = "papis.commands.export:cli"
git = "papis.commands.git:cli"
init = "papis.commands.init:cli"
list = "papis.commands.list:cli"
merge = "papis.commands.merge:cli"
mv = "papis.commands.mv:cli"
open = "papis.commands.open:cli"
rename = "papis.commands.rename:cli"
rm = "papis.commands.rm:cli"
run = "papis.commands.run:cli"
serve = "papis.commands.serve:cli"
tag = "papis.commands.tag:cli"
update = "papis.commands.update:cli"

[project.entry-points."papis.downloader"]
acl = "papis.downloaders.acl:Downloader"
acm = "papis.downloaders.acm:Downloader"
acs = "papis.downloaders.acs:Downloader"
annualreviews = "papis.downloaders.annualreviews:Downloader"
aps = "papis.downloaders.aps:Downloader"
arxiv = "papis.arxiv:Downloader"
citeseerx = "papis.downloaders.citeseerx:Downloader"
doi = "papis.crossref:Downloader"
fallback = "papis.downloaders.fallback:Downloader"
frontiersin = "papis.downloaders.frontiersin:Downloader"
get = "papis.downloaders.get:Downloader"
hal = "papis.downloaders.hal:Downloader"
ieee = "papis.downloaders.ieee:Downloader"
iopscience = "papis.downloaders.iopscience:Downloader"
projecteuclid = "papis.downloaders.projecteuclid:Downloader"
sciencedirect = "papis.downloaders.sciencedirect:Downloader"
scitationaip = "papis.downloaders.scitationaip:Downloader"
springer = "papis.downloaders.springer:Downloader"
tandfonline = "papis.downloaders.tandfonline:Downloader"
thesesfr = "papis.downloaders.thesesfr:Downloader"
usenix = "papis.downloaders.usenix:Downloader"
worldscientific = "papis.downloaders.worldscientific:Downloader"

[project.entry-points."papis.explorer"]
add = "papis.commands.explore:add"
arxiv = "papis.arxiv:explorer"
bibtex = "papis.bibtex:explorer"
citations = "papis.commands.explore:citations"
cmd = "papis.commands.explore:cmd"
crossref = "papis.crossref:explorer"
dblp = "papis.dblp:explorer"
dissemin = "papis.dissemin:explorer"
export = "papis.commands.export:explorer"
isbn = "papis.isbn:explorer"
json = "papis.json:explorer"
lib = "papis.commands.explore:lib"
pick = "papis.commands.explore:pick"
yaml = "papis.yaml:explorer"

[project.entry-points."papis.exporter"]
bibtex = "papis.bibtex:exporter"
json = "papis.json:exporter"
typst = "papis.hayagriva:exporter"
yaml = "papis.yaml:exporter"

[project.entry-points."papis.format"]
jinja2 = "papis.format:Jinja2Formatter"
python = "papis.format:PythonFormatter"

[project.entry-points."papis.importer"]
arxiv = "papis.arxiv:Importer"
bibtex = "papis.bibtex:Importer"
crossref = "papis.crossref:FromCrossrefImporter"
dblp = "papis.dblp:Importer"
doi = "papis.crossref:Importer"
folder = "papis.commands.add:FromFolderImporter"
isbn = "papis.isbn:Importer"
lib = "papis.commands.add:FromLibImporter"
pdf2arxivid = "papis.arxiv:ArxividFromPdfImporter"
pdf2doi = "papis.crossref:DoiFromPdfImporter"
pmid = "papis.pubmed:Importer"
yaml = "papis.yaml:Importer"
zenodo = "papis.zenodo:Importer"

[project.entry-points."papis.picker"]
fzf = "papis.fzf:Picker"
papis = "papis.tui.picker:Picker"

[tool.hatch.build.targets.sdist]
exclude = [".github", "docs/build"]

[tool.hatch.build.targets.wheel]
packages = ["papis"]

[tool.hatch.build.targets.wheel.shared-data]
"contrib/papis.desktop" = "share/applications/papis.desktop"
"doc/build/man" = "share/man/man1"
"contrib/shell_completion/click/bash/papis.bash" = "share/bash-completion/completions/papis.bash"
"contrib/shell_completion/click/fish/papis.fish" = "share/fish/vendor_completions.d/papis.fish"
"contrib/shell_completion/click/zsh/_papis" = "share/zsh/site-functions/_papis"

[tool.pytest.ini_options]
addopts = [
    "--papis-tmp-doctests",
    "--papis-tmp-xdg-home",
    "--doctest-modules",
    "--cov=papis",
]
doctest_optionflags = ["NORMALIZE_WHITESPACE", "ELLIPSIS"]
norecursedirs = [".git", "doc", "build", "dist"]
python_files = "*.py"
markers = [
    "config_setup: setup for tmp_config",
    "library_setup: setup for tmp_library",
    "resource_setup: setup for resource_cache",
]

[tool.flake8]
select = ["B", "D", "E", "F", "N", "Q", "W"]
extend-ignore = ["B019", "E123", "N818", "W503"]
exclude = ["doc", "build", "examples/scripts/papis-mail"]
filename = ["*.py", "examples*papis-*"]
max-line-length = 88
inline-quotes = "double"
multiline-quotes = "double"

[tool.pylint.MAIN]
jobs = "1"
recursive = "yes"
suggestion-mode = "yes"

[tool.pylint."MESSAGES CONTROL"]
disable = [
    "C0103",
    "missing-function-docstring",
    "bad-inline-option",
    "consider-using-f-string",
    "consider-using-from-import",
    "deprecated-pragma",
    "file-ignored",
    "locally-disabled",
    "missing-module-docstring",
    "raw-checker-failed",
    "suppressed-message",
    "too-many-arguments",
    "unspecified-encoding",
    "use-symbolic-message-instead",
    "useless-suppression"
]

[tool.mypy]
strict = true
show_column_numbers = true
hide_error_codes = false
pretty = true
files = "papis"
warn_unused_ignores = false

[[tool.mypy.overrides]]
module = [
    "arxiv.*",
    "bibtexparser.*",
    "colorama.*",
    "dominate.*",
    "filetype.*",
    "habanero.*",
    "isbnlib.*",
    "markdownify.*",
    "sphinx_click.*",
    "stevedore.*",
    "whoosh.*",
]
ignore_missing_imports = true
