[tool.poetry] name = "rdflib" version = "6.4.0a0" description = """RDFLib is a Python library for working with RDF, \ a simple yet powerful language for representing information.""" authors = ["Daniel 'eikeon' Krech "] maintainers = ["RDFLib Team "] repository = "https://github.com/RDFLib/rdflib" documentation = "https://rdflib.readthedocs.org/" license = "BSD-3-Clause" classifiers=[ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "License :: OSI Approved :: BSD License", "Topic :: Software Development :: Libraries :: Python Modules", "Operating System :: OS Independent", "Natural Language :: English" ] readme = "README.md" packages = [ { include = "rdflib" }, ] include = [ { path = "test", format = "sdist" }, { path = "docs", format = "sdist" }, { path = "examples", format = "sdist" }, ] [tool.poetry.scripts] rdfpipe = 'rdflib.tools.rdfpipe:main' csv2rdf = 'rdflib.tools.csv2rdf:main' rdf2dot = 'rdflib.tools.rdf2dot:main' rdfs2dot = 'rdflib.tools.rdfs2dot:main' rdfgraphisomorphism = 'rdflib.tools.graphisomorphism:main' [tool.poetry.dependencies] python = "^3.7" isodate = "^0.6.0" pyparsing = ">=2.1.0,<4" importlib-metadata = {version = ">=4,<7", python = ">=3.7,<3.8"} berkeleydb = {version = "^18.1.0", optional = true} networkx = {version = "^2.0.0", optional = true} html5lib = {version = "^1.0", optional = true} lxml = {version = "^4.3.0", optional = true} [tool.poetry.group.dev.dependencies] black = "23.3.0" isort = "^5.10.0" mypy = "^1.1.0" lxml-stubs = "^0.4.0" [tool.poetry.group.tests.dependencies] pytest = "^7.1.3" pytest-cov = "^4.0.0" coverage = {version = "^7.0.1", extras = ["toml"]} types-setuptools = ">=65.6.0.3,<68.0.0.0" setuptools = ">=65.6.3,<68.0.0" [tool.poetry.group.docs.dependencies] sphinx = "^5.3.0" myst-parser = "^1.0.0" sphinxcontrib-apidoc = "^0.3.0" sphinx-autodoc-typehints = "^1.17.1" typing-extensions = "^4.5.0" [tool.poetry.group.flake8.dependencies] flake8 = {version = ">=4.0.1", python = ">=3.8"} # flakeheaven is incompatible with flake8 >=5.0 (https://github.com/flakeheaven/flakeheaven/issues/132) flakeheaven = {version = "^3.2.1", python = ">=3.8"} pep8-naming = {version = "^0.13.2", python = ">=3.8"} [tool.poetry.extras] berkeleydb = ["berkeleydb"] networkx = ["networkx"] html = ["html5lib"] lxml = ["lxml"] [build-system] requires = ["poetry-core>=1.4.0"] build-backend = "poetry.core.masonry.api" [tool.flakeheaven] format = "grouped" baseline = ".flakeheaven.baseline" [tool.flakeheaven.plugins] pycodestyle = [ "+*", # mirrored from setup.cfg "-E501", "-E203", "-W503", "-E231", ] pyflakes = [ "+*", ] pep8-naming = ["+*"] [tool.flakeheaven.exceptions."rdflib/plugins/sparql/*"] pep8-naming = ["-N802", "-N803", "-N806", "-N812", "-N816", "-N801"] [tool.flakeheaven.exceptions."rdflib/namespace/_*"] pep8-naming = ["-N815"] [tool.flakeheaven.exceptions."rdflib/plugins/parsers/notation3.py"] pep8-naming = ["-N802", "-N803", "-N806", "-N816"] [tool.flakeheaven.exceptions."rdflib/plugins/serializers/turtle.py"] pep8-naming = ["-N802", "-N806", "-N815"] [tool.flakeheaven.exceptions."rdflib/__init__.py"] pycodestyle = ["-E402"] [tool.flakeheaven.exceptions."test/utils/namespace/_*"] pep8-naming = ["-N815"] [tool.flakeheaven.exceptions."rdflib/plugins/parsers/rdfxml.py"] pep8-naming = ["-N802"] [tool.flakeheaven.exceptions."rdflib/plugins/parsers/trix.py"] pep8-naming = ["-N802"] [tool.black] required-version = "23.3.0" line-length = "88" target-version = ['py37'] include = '\.pyi?$' exclude = ''' ( /( \.eggs # exclude a few common directories in the | \.git # root of the project | \.hg | \.mypy_cache | \.pytest_cache | \.tox | \.venv | \.var | \.github | _build | htmlcov | benchmarks | test_reports | rdflib.egg-info | buck-out | build | dist | venv )/ ) ''' [tool.pytest.ini_options] addopts = [ "--doctest-modules", "--ignore=admin", "--ignore=devtools", "--ignore=rdflib/extras/external_graph_libs.py", "--ignore-glob=docs/*.py", "--doctest-glob=docs/*.rst", "--strict-markers", ] doctest_optionflags = "ALLOW_UNICODE" filterwarnings = [ # The below warning is a consequence of how pytest doctest detects mocks and how DefinedNamespace behaves when an undefined attribute is being accessed. "ignore:Code. pytest_mock_example_attribute_that_shouldnt_exist is not defined in namespace .*:UserWarning", # The below warning is a consequence of how pytest detects fixtures and how DefinedNamespace behaves when an undefined attribute is being accessed. "ignore:Code. _pytestfixturefunction is not defined in namespace .*:UserWarning", ] markers = [ "webtest: mark a test as using the internet", ] # log_cli = true # log_cli_level = "DEBUG" log_format = "%(asctime)s.%(msecs)03d %(levelname)-8s %(name)-12s %(filename)s:%(lineno)s:%(funcName)s %(message)s" log_date_format = "%Y-%m-%dT%H:%M:%S" log_cli_format = "%(asctime)s.%(msecs)03d %(levelname)-8s %(name)-12s %(filename)s:%(lineno)s:%(funcName)s %(message)s" log_cli_date_format = "%Y-%m-%dT%H:%M:%S" [tool.isort] profile = "black" py_version = 37 line_length = 88 src_paths= ["rdflib", "test", "devtools", "examples"] supported_extensions = ["pyw", "pyi", "py"] skip = [ '.eggs', # exclude a few common directories in the '.git', # root of the project '.hg', '.mypy_cache', '.pytest_cache', '.tox', '.venv', '.var', '.github', '_build', 'htmlcov', 'benchmarks', 'test_reports', 'rdflib.egg-info', 'buck-out', 'build', 'dist', 'venv', ] [tool.mypy] files = ['rdflib', 'test', 'devtools', 'examples'] python_version = "3.7" warn_unused_configs = true ignore_missing_imports = true disallow_subclassing_any = false warn_unreachable = true warn_unused_ignores = true no_implicit_optional = false implicit_reexport = false [[tool.mypy.overrides]] module = "pyparsing.*" # This is here because of an upstream issue with pyparsing: # https://github.com/pyparsing/pyparsing/issues/385 # Once the issue is fixed this should be removed. follow_imports = "skip" [tool.coverage.run] branch = true source = ["rdflib"] omit = ["*/_type_checking.py"] [tool.coverage.report] exclude_lines = [ # Have to re-enable the standard pragma "pragma: no cover", # TYPE_CHECKING guarded code only affects type checkers. "^ *if (False|TYPE_CHECKING):", # constant used in protocols and abstract methods, does not run anything # and has no side effects. '^ +\.\.\.$', # Don't complain if non-runnable code isn't run: "if 0:", "if __name__ == .__main__.:", "if __name__==.__main__.:" ]