lsst-felis 29.2025.1700__py3-none-any.whl → 29.2025.1800__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.

Potentially problematic release.


This version of lsst-felis might be problematic. Click here for more details.

felis/tests/run_cli.py ADDED
@@ -0,0 +1,79 @@
1
+ """Test utility for running cli commands."""
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
+
26
+ from click.testing import CliRunner
27
+
28
+ from felis.cli import cli
29
+
30
+ __all__ = ["run_cli"]
31
+
32
+
33
+ def run_cli(
34
+ cmd: list[str],
35
+ log_level: int = logging.WARNING,
36
+ catch_exceptions: bool = False,
37
+ expect_error: bool = False,
38
+ print_cmd: bool = False,
39
+ print_output: bool = False,
40
+ id_generation: bool = False,
41
+ ) -> None:
42
+ """Run a CLI command and check the exit code.
43
+
44
+ Parameters
45
+ ----------
46
+ cmd : list[str]
47
+ The command to run.
48
+ log_level : int
49
+ The logging level to use, by default logging.WARNING.
50
+ catch_exceptions : bool
51
+ Whether to catch exceptions, by default False.
52
+ expect_error : bool
53
+ Whether to expect an error, by default False.
54
+ print_cmd : bool
55
+ Whether to print the command, by default False.
56
+ print_output : bool
57
+ Whether to print the output, by default False.
58
+ id_generation : bool
59
+ Whether to enable id generation, by default False.
60
+ """
61
+ if not cmd:
62
+ raise ValueError("No command provided.")
63
+ full_cmd = ["--log-level", logging.getLevelName(log_level)] + cmd
64
+ if id_generation:
65
+ full_cmd = ["--id-generation"] + full_cmd
66
+ if print_cmd:
67
+ print(f"Running command: felis {' '.join(full_cmd)}")
68
+ runner = CliRunner()
69
+ result = runner.invoke(
70
+ cli,
71
+ full_cmd,
72
+ catch_exceptions=catch_exceptions,
73
+ )
74
+ if print_output:
75
+ print(result.output)
76
+ if expect_error:
77
+ assert result.exit_code != 0
78
+ else:
79
+ assert result.exit_code == 0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lsst-felis
3
- Version: 29.2025.1700
3
+ Version: 29.2025.1800
4
4
  Summary: A vocabulary for describing catalogs and acting on those descriptions
5
5
  Author-email: Rubin Observatory Data Management <dm-admin@lists.lsst.org>
6
6
  License: GNU General Public License v3 or later (GPLv3+)
@@ -15,11 +15,12 @@ felis/db/variants.py,sha256=eahthrbVeV8ZdGamWQccNmWgx6CCscGrU0vQRs5HZK8,5260
15
15
  felis/schemas/tap_schema_std.yaml,sha256=sPW-Vk72nY0PFpCvP5d8L8fWvhkif-x32sGtcfDZ8bU,7131
16
16
  felis/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  felis/tests/postgresql.py,sha256=B_xk4fLual5-viGDqP20r94okuc0pbSvytRH_L0fvMs,4035
18
- lsst_felis-29.2025.1700.dist-info/licenses/COPYRIGHT,sha256=vJAFLFTSF1mhy9eIuA3P6R-3yxTWKQgpig88P-1IzRw,129
19
- lsst_felis-29.2025.1700.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
20
- lsst_felis-29.2025.1700.dist-info/METADATA,sha256=f4QJVHSXX11hG8rUquZKXarFluP7825klqh0Vnkl6pc,1433
21
- lsst_felis-29.2025.1700.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
22
- lsst_felis-29.2025.1700.dist-info/entry_points.txt,sha256=Gk2XFujA_Gp52VBk45g5kim8TDoMDJFPctsMqiq72EM,40
23
- lsst_felis-29.2025.1700.dist-info/top_level.txt,sha256=F4SvPip3iZRVyISi50CHhwTIAokAhSxjWiVcn4IVWRI,6
24
- lsst_felis-29.2025.1700.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
25
- lsst_felis-29.2025.1700.dist-info/RECORD,,
18
+ felis/tests/run_cli.py,sha256=Gg8loUIGj9t6KlkRKrEc9Z9b5dtlkpJy94ORuj4BrxU,2503
19
+ lsst_felis-29.2025.1800.dist-info/licenses/COPYRIGHT,sha256=vJAFLFTSF1mhy9eIuA3P6R-3yxTWKQgpig88P-1IzRw,129
20
+ lsst_felis-29.2025.1800.dist-info/licenses/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
21
+ lsst_felis-29.2025.1800.dist-info/METADATA,sha256=3xTfEv824lCTCxglKRqCuCyLdEACEp1jcWYM8Hq7JZw,1433
22
+ lsst_felis-29.2025.1800.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
23
+ lsst_felis-29.2025.1800.dist-info/entry_points.txt,sha256=Gk2XFujA_Gp52VBk45g5kim8TDoMDJFPctsMqiq72EM,40
24
+ lsst_felis-29.2025.1800.dist-info/top_level.txt,sha256=F4SvPip3iZRVyISi50CHhwTIAokAhSxjWiVcn4IVWRI,6
25
+ lsst_felis-29.2025.1800.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
26
+ lsst_felis-29.2025.1800.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.1)
2
+ Generator: setuptools (80.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5