-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade dependencies, bootstrap and fix typing issues
- Loading branch information
Showing
11 changed files
with
70 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
[build-system] | ||
requires = ["hatchling"] | ||
requires = ["hatchling", "hatch-openzim"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "hatch-openzim" | ||
authors = [ | ||
{ name = "Kiwix", email = "[email protected]" }, | ||
] | ||
keywords = ["hatch","plugin","download","file"] | ||
requires-python = ">=3.8,<3.13" | ||
description = "Download files at build time" | ||
readme = "README.md" | ||
license = {text = "GPL-3.0-or-later"} | ||
classifiers = [ | ||
classifiers = [ # needs hatch-openzim 0.2.0 to make it dynamic with additional-classifiers | ||
"Framework :: Hatch", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
|
@@ -25,38 +20,34 @@ classifiers = [ | |
dependencies = [ | ||
"hatchling==1.21.1", | ||
"packaging==23.2", | ||
"toml==0.10.2", # to be replaced by tomllib once only 3.11 and above is supported | ||
"toml==0.10.2", # to be removed once only 3.11 and above is supported | ||
] | ||
dynamic = ["version"] | ||
dynamic = ["authors", "keywords", "license", "version", "urls"] | ||
|
||
[project.optional-dependencies] | ||
scripts = [ | ||
"invoke==2.2.0", | ||
] | ||
lint = [ | ||
"black==24.1.1", | ||
"ruff==0.2.0", | ||
"black==24.2.0", | ||
"ruff==0.2.1", | ||
] | ||
check = [ | ||
"pyright==1.1.349", | ||
"pyright==1.1.350", | ||
] | ||
test = [ | ||
"pytest==8.0.0", | ||
"coverage==7.4.1", | ||
] | ||
dev = [ | ||
"pre-commit==3.6.0", | ||
"debugpy==1.8.0", | ||
"pre-commit==3.6.1", | ||
"debugpy==1.8.1", | ||
"hatch-openzim[scripts]", | ||
"hatch-openzim[lint]", | ||
"hatch-openzim[test]", | ||
"hatch-openzim[check]", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/openzim/hatch-openzim" | ||
Donate = "https://www.kiwix.org/en/support-us/" | ||
|
||
[project.entry-points.hatch] | ||
openzim = "hatch_openzim.hooks" | ||
|
||
|
@@ -239,4 +230,5 @@ include = ["src", "tests", "tasks.py"] | |
exclude = [".env/**", ".venv/**"] | ||
extraPaths = ["src"] | ||
pythonVersion = "3.8" | ||
typeCheckingMode="basic" | ||
typeCheckingMode="strict" | ||
disableBytesTypePromotions = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import os | ||
import shutil | ||
from pathlib import Path | ||
from typing import Dict, List, Union | ||
from typing import Any, Dict, List, Union | ||
|
||
import pytest | ||
|
||
|
@@ -131,7 +131,7 @@ def test_metadata_preserve_value( | |
metadata: Metadata, metadata_key: str, root_folder: str | ||
): | ||
metadata[metadata_key] = f"some_value_for_{metadata_key}" | ||
config = {} | ||
config: Dict[str, Any] = {} | ||
config[f"preserve-{metadata_key}"] = True | ||
update( | ||
root=root_folder, | ||
|
@@ -142,7 +142,7 @@ def test_metadata_preserve_value( | |
|
||
|
||
def test_metadata_additional_keywords(metadata: Metadata, root_folder: str): | ||
config = {} | ||
config: Dict[str, Any] = {} | ||
config["additional-keywords"] = ["keyword1", "keyword2"] | ||
update( | ||
root=root_folder, | ||
|
@@ -154,7 +154,7 @@ def test_metadata_additional_keywords(metadata: Metadata, root_folder: str): | |
|
||
|
||
def test_metadata_additional_classifiers(metadata: Metadata, root_folder: str): | ||
config = {} | ||
config: Dict[str, Any] = {} | ||
config["additional-classifiers"] = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
|
@@ -176,7 +176,7 @@ def test_metadata_additional_classifiers(metadata: Metadata, root_folder: str): | |
|
||
|
||
def test_metadata_additional_authors(metadata: Metadata, root_folder: str): | ||
config = {} | ||
config: Dict[str, Any] = {} | ||
config["additional-authors"] = [{"email": "[email protected]", "name": "Some One"}] | ||
update( | ||
root=root_folder, | ||
|
@@ -203,9 +203,9 @@ def test_metadata_additional_authors(metadata: Metadata, root_folder: str): | |
], | ||
) | ||
def test_metadata_organization( | ||
organization: str, expected_result: str, metadata, root_folder: str | ||
organization: str, expected_result: str, metadata: Metadata, root_folder: str | ||
): | ||
config = {} | ||
config: Dict[str, Any] = {} | ||
if organization: | ||
config["organization"] = organization | ||
update( | ||
|
@@ -224,7 +224,7 @@ def test_metadata_organization( | |
|
||
|
||
def test_metadata_is_scraper(metadata: Metadata, root_folder: str): | ||
config = {} | ||
config: Dict[str, Any] = {} | ||
config["kind"] = "scraper" | ||
update( | ||
root=root_folder, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters