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

Discover action types and pass Sensor through action call #109

Merged
merged 91 commits into from
Jan 27, 2024

Conversation

dboulware
Copy link
Contributor

@dboulware dboulware commented Jan 15, 2024

This (in conjunction with the associated scos-sensor PR) fixes an architectural issue in scos sensor and enables loading of actions from a scos sensor config directory. The main changes within this PR are:

  • Reverts scos-actions repo to purely APIs. All initialization is now performed in scos-sensor (or outside of scos-actions)
  • Actions are no longer initialized with a signal analyzer and gps. Instead, they are only initialized with their parameters and the signal analyzer, gps, preselector, switches, location, and sensor definition/capabilities are passed into the action call method through a new Sensor class.
  • Calibration is given a new property is_default to identify that the calibration is the default calibration file rather than one generated from a lab based cal and file_path to indicate where the calibration should be saved.
  • Removes registration signals.
  • Modified settings to not use django settings and only load settings from the environment.

While the behavior is not enforced within the code in this repo, the readme has also been updated to reflect that the discover module used by scos-sensor plugins should expose an actions and/or action_types dictionary. Finally, because of these changes, this increments the version of scos-actions to 8.0.0.

…ions to have sigan and gps properties. Expose action_types in discover.
…ally take calibrations and add calibration properties.
Copy link
Member

@aromanielloNTIA aromanielloNTIA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a few commits and left some comments below, mostly for minor cleanup stuff following this major refactor. Looks good but please respond to comments before merging.

scos_actions/actions/interfaces/action.py Outdated Show resolved Hide resolved
scos_actions/actions/interfaces/action.py Outdated Show resolved Hide resolved
scos_actions/actions/acquire_stepped_freq_tdomain_iq.py Outdated Show resolved Hide resolved
scos_actions/actions/monitor_sigan.py Outdated Show resolved Hide resolved
scos_actions/actions/sync_gps.py Show resolved Hide resolved
scos_actions/discover/__init__.py Outdated Show resolved Hide resolved
scos_actions/hardware/mocks/mock_sigan.py Outdated Show resolved Hide resolved
scos_actions/hardware/sensor.py Outdated Show resolved Hide resolved
scos_actions/settings.py Outdated Show resolved Hide resolved
scos_actions/status/__init__.py Outdated Show resolved Hide resolved
Copy link
Member

@aromanielloNTIA aromanielloNTIA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good- see minor comments included below. I'm about to test on seadog01 in the meantime.

scos_actions/hardware/sensor.py Show resolved Hide resolved
scos_actions/hardware/sensor.py Show resolved Hide resolved
scos_actions/hardware/sensor.py Outdated Show resolved Hide resolved
scos_actions/hardware/sensor.py Outdated Show resolved Hide resolved
…ocstrings and test cases. Modify has_configurable_preselector to return True if the sensor definition includes a preselector with multiple rf_paths or if the preselector has multiple rf_paths.
Copy link
Member

@aromanielloNTIA aromanielloNTIA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@dboulware dboulware merged commit b0dd42b into master Jan 27, 2024
4 checks passed
@dboulware dboulware deleted the discover_action_types branch January 27, 2024 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants