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

Remove database and layout options #129

Merged
merged 1 commit into from
Jul 14, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
91 changes: 26 additions & 65 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ sdss-clu = "^1.0.0"
sdsstools = ">=0.4.2"
click_default_group = "^1.2.2"
daemonocle = "^1.0.2"
peewee = "^3.14.4"
psycopg2-binary = "^2.8.6"

[tool.poetry.dev-dependencies]
ipython = "*"
Expand Down
2 changes: 1 addition & 1 deletion python/jaeger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
__version__ = get_package_version(path=__file__, package_name=NAME)


log = get_logger("jaeger", log_level=logging.WARNING)
log = get_logger("jaeger", log_level=logging.INFO)
can_log = get_logger("jaeger_can", log_level=logging.ERROR, capture_warnings=False)


Expand Down
17 changes: 2 additions & 15 deletions python/jaeger/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class FPSWrapper(object):
def __init__(
self,
profile,
layout,
ieb=None,
danger=None,
initialise=True,
Expand All @@ -75,7 +74,6 @@ def __init__(
if self.profile in ["test", "virtual"]:
self.profile = "virtual"

self.layout = layout
self.ieb = ieb
self.danger = danger
self.initialise = initialise
Expand All @@ -92,13 +90,12 @@ async def __aenter__(self):
# If profile is test we start a VirtualFPS first so that it can respond
# to the FPS class.
if self.profile == "virtual":
self.fps = VirtualFPS(layout=self.layout)
self.fps = VirtualFPS()
for pid in range(self.npositioners):
self.fps.add_virtual_positioner(pid + 1)
else:
self.fps = FPS(
can_profile=self.profile,
layout=self.layout,
ieb=self.ieb,
engineering_mode=self.danger,
)
Expand Down Expand Up @@ -134,12 +131,6 @@ async def __aexit__(self, *excinfo):
type=str,
help="The bus interface profile.",
)
@click.option(
"-l",
"--layout",
type=str,
help="The FPS layout.",
)
@click.option(
"--virtual",
is_flag=True,
Expand Down Expand Up @@ -185,7 +176,6 @@ async def __aexit__(self, *excinfo):
def jaeger(
ctx,
config_file,
layout,
profile,
verbose,
quiet,
Expand All @@ -205,10 +195,8 @@ def jaeger(
raise click.UsageError("--quiet and --verbose are mutually exclusive.")

if verbose == 1:
log.sh.setLevel(logging.INFO)
elif verbose == 2:
log.sh.setLevel(logging.DEBUG)
elif verbose >= 3:
elif verbose >= 2:
log.sh.setLevel(logging.DEBUG)
can_log.sh.setLevel(logging.DEBUG)

Expand All @@ -229,7 +217,6 @@ def jaeger(

ctx.obj = FPSWrapper(
profile,
layout,
ieb=ieb,
danger=danger,
npositioners=npositioners,
Expand Down