rm google api core and add more dependency testing (#9721)

This commit is contained in:
Bagatur 2023-08-24 14:20:58 -07:00 committed by GitHub
parent 2bcf581a23
commit a0800c9f15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 9 deletions

View File

@ -3542,7 +3542,6 @@ optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*" python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*"
files = [ files = [
{file = "jsonpointer-2.4-py2.py3-none-any.whl", hash = "sha256:15d51bba20eea3165644553647711d150376234112651b4f1811022aecad7d7a"}, {file = "jsonpointer-2.4-py2.py3-none-any.whl", hash = "sha256:15d51bba20eea3165644553647711d150376234112651b4f1811022aecad7d7a"},
{file = "jsonpointer-2.4.tar.gz", hash = "sha256:585cee82b70211fa9e6043b7bb89db6e1aa49524340dde8ad6b63206ea689d88"},
] ]
[[package]] [[package]]
@ -10448,4 +10447,4 @@ text-helpers = ["chardet"]
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = ">=3.8.1,<4.0" python-versions = ">=3.8.1,<4.0"
content-hash = "fd56d0cf338f6efea449244f3e9e719ca6872dd4b3e136ccd67fd82912912cc2" content-hash = "88e479307b19d991105360780f67ed3258ef1a0151f70b9e91c86c8153751e83"

View File

@ -125,7 +125,6 @@ newspaper3k = {version = "^0.2.8", optional = true}
amazon-textract-caller = {version = "<2", optional = true} amazon-textract-caller = {version = "<2", optional = true}
xata = {version = "^1.0.0a7", optional = true} xata = {version = "^1.0.0a7", optional = true}
xmltodict = {version = "^0.13.0", optional = true} xmltodict = {version = "^0.13.0", optional = true}
google-api-core = {version = "^2.11.1", optional = true}
markdownify = {version = "^0.11.6", optional = true} markdownify = {version = "^0.11.6", optional = true}
assemblyai = {version = "^0.17.0", optional = true} assemblyai = {version = "^0.17.0", optional = true}
@ -307,7 +306,7 @@ extended_testing = [
"chardet", "chardet",
"esprima", "esprima",
"jq", "jq",
"pdfminer.six", "pdfminer-six",
"pgvector", "pgvector",
"pypdf", "pypdf",
"pymupdf", "pymupdf",
@ -321,7 +320,7 @@ extended_testing = [
"telethon", "telethon",
"psychicapi", "psychicapi",
"gql", "gql",
"requests_toolbelt", "requests-toolbelt",
"html2text", "html2text",
"py-trello", "py-trello",
"scikit-learn", "scikit-learn",
@ -331,7 +330,7 @@ extended_testing = [
"sympy", "sympy",
"rapidfuzz", "rapidfuzz",
"openai", "openai",
"rank_bm25", "rank-bm25",
"geopandas", "geopandas",
"jinja2", "jinja2",
"gitpython", "gitpython",

View File

@ -26,10 +26,13 @@ def test_required_dependencies(poetry_conf: Mapping[str, Any]) -> None:
# Get the dependencies from the [tool.poetry.dependencies] section # Get the dependencies from the [tool.poetry.dependencies] section
dependencies = poetry_conf["dependencies"] dependencies = poetry_conf["dependencies"]
required_dependencies = [ is_required = {
package_name package_name: isinstance(requirements, str)
or not requirements.get("optional", False)
for package_name, requirements in dependencies.items() for package_name, requirements in dependencies.items()
if isinstance(requirements, str) or not requirements.get("optional", False) }
required_dependencies = [
package_name for package_name, required in is_required.items() if required
] ]
assert sorted(required_dependencies) == [ assert sorted(required_dependencies) == [
@ -47,6 +50,12 @@ def test_required_dependencies(poetry_conf: Mapping[str, Any]) -> None:
"tenacity", "tenacity",
] ]
unrequired_dependencies = [
package_name for package_name, required in is_required.items() if not required
]
in_extras = [dep for group in poetry_conf["extras"].values() for dep in group]
assert set(unrequired_dependencies) == set(in_extras)
def test_test_group_dependencies(poetry_conf: Mapping[str, Any]) -> None: def test_test_group_dependencies(poetry_conf: Mapping[str, Any]) -> None:
"""Check if someone is attempting to add additional test dependencies. """Check if someone is attempting to add additional test dependencies.