Skip to content

Commit

Permalink
update doc schema paths
Browse files Browse the repository at this point in the history
  • Loading branch information
alphasentaurii committed Dec 4, 2024
1 parent 8bf6eea commit e20789f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import pytest
import glob
from common import (
DOCS_SCHEMAS_PATH,
DOCS_SCHEMAS_LIST,
MANIFEST_ID_PREFIX,
MANIFESTS_PATH,
METASCHEMA_ID,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e20789f

Please sign in to comment.