python-markdown-oembed/pyproject.toml
Benedikt Willi 9e48edcfdf Refactor and Update python-markdown-oembed-extension
- **Removed legacy build files**:
  - Deleted obsolete `.travis.yml`, `flake.lock`, and `flake.nix` files that were no longer needed for the current build and dependency management setup.

- **Updated versioning**:
  - Incremented the package version from `0.4.0` to `0.5.0` in `version.py` and made adjustments in `pyproject.toml` to reflect the new versioning mechanism.

- **Refined package structure**:
  - Moved source files from `src/python_markdown_oembed_extension` to `mdx_oembed` and renamed references accordingly for better clarity and organization of the codebase.

- **Enhanced OEmbed functionality**:
  - Added dedicated endpoint handling in the new `endpoints.py`.
  - Refactored the `oembed.py` file to implement a minimal oEmbed consumer, replacing the earlier dependency on `python-oembed`.

- **Improved test coverage**:
  - Transitioned tests from `unittest` to `pytest` framework for better maintainability.
  - Expanded unit tests, including better error handling and validation for various media types.

- **Updated dependency requirements**:
  - Raised minimum Python version from `3.9` to `3.12` in `pyproject.toml`.
  - Removed non-essential dependencies and restructured the dependency declarations to streamline package management.

These changes focus on modernizing the codebase, improving adherence to current Python standards, and enhancing overall functionality and maintainability.
2026-03-03 14:26:52 +01:00

77 lines
1.7 KiB
TOML

[project]
name = "python-markdown-oembed-extension"
dynamic = ["version"]
description = "Markdown extension to allow media embedding using the oEmbed standard."
readme = {file = "README.md", content-type = "text/markdown"}
license = "Unlicense"
requires-python = ">=3.12"
authors = [
{ name = "Benedikt Willi", email = "ben.willi@gmail.com" },
{ name = "Tanner Netterville", email = "tannern@gmail.com" },
]
keywords = ["markdown", "oembed"]
classifiers = [
"Development Status :: 4 - Beta",
"License :: Public Domain",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
dependencies = [
"Markdown>=3.2",
"nh3>=0.2",
]
[project.urls]
Homepage = "https://github.com/Hopiu/python-markdown-oembed"
[project.entry-points."markdown.extensions"]
oembed = "mdx_oembed:makeExtension"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "mdx_oembed/version.py"
[tool.hatch.build.targets.sdist]
include = [
"mdx_oembed/",
"tests.py",
"README.md",
"LICENSE",
]
[tool.hatch.build.targets.wheel]
packages = ["mdx_oembed"]
[dependency-groups]
dev = [
"pytest>=7.0",
"pytest-mock>=3.0",
"ruff>=0.4",
"pyright>=1.1",
]
[tool.pytest.ini_options]
testpaths = ["."]
python_files = ["tests.py"]
[tool.ruff]
target-version = "py312"
[tool.ruff.lint]
select = ["E", "F", "W", "I", "UP", "N", "S", "B"]
ignore = [
"S101", # assert used — standard in pytest
]
[tool.ruff.lint.per-file-ignores]
"tests.py" = ["S106"]
[tool.pyright]
pythonVersion = "3.12"
typeCheckingMode = "standard"