From e20789f91b7498eac6c17034e0f2a40b6781ca23 Mon Sep 17 00:00:00 2001 From: alphasentaurii Date: Wed, 4 Dec 2024 12:24:50 -0500 Subject: [PATCH] update doc schema paths --- tests/common.py | 3 ++- tests/conftest.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/common.py b/tests/common.py index ea749495..02516301 100644 --- a/tests/common.py +++ b/tests/common.py @@ -11,7 +11,8 @@ SCHEMAS_PATH = RESOURCES_PATH / "schemas" / "stsci.edu" / "asdf" DOCS_PATH = ROOT_PATH / "docs" / "source" -DOCS_SCHEMAS_PATH = DOCS_PATH / "schemas" +DOCS_SCHEMAS_PATH = DOCS_PATH +DOCS_SCHEMAS_LIST = ['astronomy.rst', 'core.rst', 'legacy.rst', 'yaml_schema.rst'] YAML_SCHEMA_PATH = RESOURCES_PATH / "schemas" / "stsci.edu" / "yaml-schema" MANIFESTS_PATH = RESOURCES_PATH / "manifests" / "asdf-format.org" / "core" diff --git a/tests/conftest.py b/tests/conftest.py index 97bd40c0..950568a1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,6 +1,8 @@ import pytest +import glob from common import ( DOCS_SCHEMAS_PATH, + DOCS_SCHEMAS_LIST, MANIFEST_ID_PREFIX, MANIFESTS_PATH, METASCHEMA_ID, @@ -93,7 +95,8 @@ def add_schemas(path, prefix, result): @pytest.fixture(scope="session") def docs_schema_ids(): result = [] - for path in DOCS_SCHEMAS_PATH.glob("**/*.rst"): + for fname in DOCS_SCHEMAS_LIST: + path = glob.glob(f"{DOCS_SCHEMAS_PATH}/{fname}")[0] if path != DOCS_SCHEMAS_PATH / "manifest.rst": add_schemas(path, SCHEMA_ID_PREFIX, result) return result