lsst-felis 28.2024.4500__py3-none-any.whl → 29.2025.4500__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
felis/tests/utils.py DELETED
@@ -1,122 +0,0 @@
1
- """Test utility functions."""
2
-
3
- # This file is part of felis.
4
- #
5
- # Developed for the LSST Data Management System.
6
- # This product includes software developed by the LSST Project
7
- # (https://www.lsst.org).
8
- # See the COPYRIGHT file at the top-level directory of this distribution
9
- # for details of code ownership.
10
- #
11
- # This program is free software: you can redistribute it and/or modify
12
- # it under the terms of the GNU General Public License as published by
13
- # the Free Software Foundation, either version 3 of the License, or
14
- # (at your option) any later version.
15
- #
16
- # This program is distributed in the hope that it will be useful,
17
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
- # GNU General Public License for more details.
20
- #
21
- # You should have received a copy of the GNU General Public License
22
- # along with this program. If not, see <https://www.gnu.org/licenses/>.
23
-
24
- import logging
25
- import os
26
- import shutil
27
- import tempfile
28
- from collections.abc import Iterator
29
- from contextlib import contextmanager
30
- from typing import IO
31
-
32
- __all__ = ["open_test_file", "mk_temp_dir", "rm_temp_dir"]
33
-
34
- TEST_DATA_DIR = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "..", "..", "tests", "data"))
35
- """The directory containing test data files."""
36
-
37
- TEST_TMP_DIR = os.path.normpath(os.path.join(TEST_DATA_DIR, ".."))
38
- """The directory for temporary files."""
39
-
40
- __all__ = ["open_test_file", "mk_temp_dir", "rm_temp_dir"]
41
-
42
- logger = logging.getLogger(__name__)
43
-
44
-
45
- def get_test_file_path(file_name: str) -> str:
46
- """Return the path to a test file.
47
-
48
- Parameters
49
- ----------
50
- file_name
51
- The name of the test file.
52
-
53
- Returns
54
- -------
55
- str
56
- The path to the test file.
57
-
58
- Raises
59
- ------
60
- FileNotFoundError
61
- Raised if the file does not exist.
62
- """
63
- file_path = os.path.join(TEST_DATA_DIR, file_name)
64
- if not os.path.exists(file_path):
65
- raise FileNotFoundError(file_path)
66
- return file_path
67
-
68
-
69
- @contextmanager
70
- def open_test_file(file_name: str) -> Iterator[IO[str]]:
71
- """Return a file object for a test file using a context manager.
72
-
73
- Parameters
74
- ----------
75
- file_name
76
- The name of the test file.
77
-
78
- Returns
79
- -------
80
- `Iterator` [ `IO` [ `str` ] ]
81
- A file object for the test file.
82
-
83
- Raises
84
- ------
85
- FileNotFoundError
86
- Raised if the file does not exist.
87
- """
88
- logger.debug("Opening test file: %s", file_name)
89
- file_path = get_test_file_path(file_name)
90
- file = open(file_path)
91
- try:
92
- yield file
93
- finally:
94
- file.close()
95
-
96
-
97
- def mk_temp_dir(parent_dir: str = TEST_TMP_DIR) -> str:
98
- """Create a temporary directory for testing.
99
-
100
- Parameters
101
- ----------
102
- parent_dir
103
- The parent directory for the temporary directory.
104
-
105
- Returns
106
- -------
107
- str
108
- The path to the temporary directory.
109
- """
110
- return tempfile.mkdtemp(dir=parent_dir)
111
-
112
-
113
- def rm_temp_dir(temp_dir: str) -> None:
114
- """Remove a temporary directory.
115
-
116
- Parameters
117
- ----------
118
- temp_dir
119
- The path to the temporary directory.
120
- """
121
- logger.debug("Removing temporary directory: %s", temp_dir)
122
- shutil.rmtree(temp_dir, ignore_errors=True)
felis/version.py DELETED
@@ -1,2 +0,0 @@
1
- __all__ = ["__version__"]
2
- __version__ = "28.2024.4500"
@@ -1,26 +0,0 @@
1
- felis/__init__.py,sha256=THmRg3ylB4E73XhFjJX7YlnV_CM3lr_gZO_HqQFzIQ4,937
2
- felis/cli.py,sha256=tHv4oqDVH0VtXVresY0irdVqZFgXrP-zhFgcO-LBRws,17315
3
- felis/datamodel.py,sha256=3iZiNlCrOjJj87cCdTdRraUyx5o-Iwzh46aQ-dIwVDQ,35942
4
- felis/metadata.py,sha256=MqNlBoFPMq18Kp0WUfyC8RtlxyBHTL_0SmHanAJgZWk,13698
5
- felis/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- felis/tap.py,sha256=76o8-ijmwgSE8UxMVn9KTlKrCPjG72LWyyAXO8yeqFE,21564
7
- felis/tap_schema.py,sha256=cFZwW7lj0FiYa1BWtfX_Pbv9xi4jk0D-tp34h3jNs8E,22471
8
- felis/types.py,sha256=m80GSGfNHQ3-NzRuTzKOyRXLJboPxdk9kzpp1SO8XdY,5510
9
- felis/version.py,sha256=bVCmVS43pUKMl-xsU8K3PeQRVCJDeJlt6S8bWBo7Hr0,55
10
- felis/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- felis/db/dialects.py,sha256=n5La-shu-8fHLIyf8rrazHDyrzATmMCdELtKV_0ymxI,3517
12
- felis/db/sqltypes.py,sha256=JJy97U8KzAOg5pFi2xZgSjvU8CXXgrzkvCsmo6FLRG4,11060
13
- felis/db/utils.py,sha256=SIl2ryOT2Zn5n0BqdNDxC1HcOoxh0doaKk_hMUGvwAc,14116
14
- felis/db/variants.py,sha256=eahthrbVeV8ZdGamWQccNmWgx6CCscGrU0vQRs5HZK8,5260
15
- felis/schemas/tap_schema_std.yaml,sha256=sPW-Vk72nY0PFpCvP5d8L8fWvhkif-x32sGtcfDZ8bU,7131
16
- felis/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- felis/tests/postgresql.py,sha256=B_xk4fLual5-viGDqP20r94okuc0pbSvytRH_L0fvMs,4035
18
- felis/tests/utils.py,sha256=YB7qQOXSaE3HTEjTBUqIqQx90LxGZjOZvZi2IPgoVhs,3247
19
- lsst_felis-28.2024.4500.dist-info/COPYRIGHT,sha256=vJAFLFTSF1mhy9eIuA3P6R-3yxTWKQgpig88P-1IzRw,129
20
- lsst_felis-28.2024.4500.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
21
- lsst_felis-28.2024.4500.dist-info/METADATA,sha256=VOPFH2Czyt9X7JriYyv3LMus5e0g_nXSmubDG6GbLtY,1318
22
- lsst_felis-28.2024.4500.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
23
- lsst_felis-28.2024.4500.dist-info/entry_points.txt,sha256=Gk2XFujA_Gp52VBk45g5kim8TDoMDJFPctsMqiq72EM,40
24
- lsst_felis-28.2024.4500.dist-info/top_level.txt,sha256=F4SvPip3iZRVyISi50CHhwTIAokAhSxjWiVcn4IVWRI,6
25
- lsst_felis-28.2024.4500.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
26
- lsst_felis-28.2024.4500.dist-info/RECORD,,