Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate schema_editor #352

Merged
merged 4 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/352.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecate schema_editor submodule.
4 changes: 4 additions & 0 deletions src/stdatamodels/jwst/datamodels/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
import os


# this submodule is deprecated and contains no tests
collect_ignore = ["schema_editor.py"]


@pytest.fixture
def jail_environ():
"""Lock changes to the environment"""
Expand Down
7 changes: 7 additions & 0 deletions src/stdatamodels/jwst/datamodels/schema_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
import os.path
import re
import sys
import warnings

Check warning on line 54 in src/stdatamodels/jwst/datamodels/schema_editor.py

View check run for this annotation

Codecov / codecov/patch

src/stdatamodels/jwst/datamodels/schema_editor.py#L54

Added line #L54 was not covered by tests
from urllib.parse import urlparse
import yaml

Expand All @@ -68,6 +69,12 @@
"Keyword_db", "Model_db", "Options", "Schema_editor",]


warnings.warn(

Check warning on line 72 in src/stdatamodels/jwst/datamodels/schema_editor.py

View check run for this annotation

Codecov / codecov/patch

src/stdatamodels/jwst/datamodels/schema_editor.py#L72

Added line #L72 was not covered by tests
"The schema_editor submodule and it's contents are deprecated "
"and will be removed in an upcoming release",
UserWarning,
)

def enquote(value):
"""
Put quote marks around value if it contains special characters
Expand Down