Skip to content

Commit

Permalink
Merge pull request #14 from sot/discontinue-package
Browse files Browse the repository at this point in the history
Discontinue package
  • Loading branch information
taldcroft authored Dec 6, 2023
2 parents 5f6f2e7 + 3b630c6 commit df0d5b6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
:mod:`ska_parsecm`
========================

.. Warning:: the ska_parsecm package is **discontinued and no longer supported**.
Instead use `parse_cm <https://sot.github.io/parse_cm/>`.


.. automodule:: ska_parsecm.ParseCM
:members:
18 changes: 18 additions & 0 deletions ska_parsecm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import warnings

message_warn = (
"\n"
"The ska_parsecm package is no longer supported and is replaced\n"
"by parse_cm. Please update your code accordingly.\n"
)
message_error = (
"\n"
"To temporarily continue using this package set the environment variable\n"
"SKA_ALLOW_DISCONTINUED_PACKAGES=1"
)

if os.environ.get("SKA_ALLOW_DISCONTINUED_PACKAGES") == "1":
warnings.warn(message_warn, FutureWarning)
else:
raise RuntimeError(message_warn + message_error)

import ska_helpers

Expand Down

0 comments on commit df0d5b6

Please sign in to comment.