cftscal 0.1.0__tar.gz

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.
Files changed (51) hide show
  1. cftscal-0.1.0/.github/workflows/publish-to-pypi.yml +37 -0
  2. cftscal-0.1.0/.gitignore +78 -0
  3. cftscal-0.1.0/PKG-INFO +14 -0
  4. cftscal-0.1.0/README.md +5 -0
  5. cftscal-0.1.0/cftscal/__init__.py +0 -0
  6. cftscal-0.1.0/cftscal/api.py +10 -0
  7. cftscal-0.1.0/cftscal/main.py +77 -0
  8. cftscal-0.1.0/cftscal/objects.py +497 -0
  9. cftscal-0.1.0/cftscal/paradigms/__init__.py +142 -0
  10. cftscal-0.1.0/cftscal/paradigms/amplifier_calibration.enaml +50 -0
  11. cftscal-0.1.0/cftscal/paradigms/calibration_mixins.enaml +615 -0
  12. cftscal-0.1.0/cftscal/paradigms/input_amplifier_calibration.enaml +174 -0
  13. cftscal-0.1.0/cftscal/paradigms/objects.enaml +511 -0
  14. cftscal-0.1.0/cftscal/paradigms/pistonphone_calibration.enaml +256 -0
  15. cftscal-0.1.0/cftscal/paradigms/pt_calibration.enaml +400 -0
  16. cftscal-0.1.0/cftscal/paradigms/speaker_calibration.enaml +175 -0
  17. cftscal-0.1.0/cftscal/plugins/__init__.py +0 -0
  18. cftscal-0.1.0/cftscal/plugins/calibration_window.enaml +6 -0
  19. cftscal-0.1.0/cftscal/plugins/inear/__init__.py +0 -0
  20. cftscal-0.1.0/cftscal/plugins/inear/manifest.enaml +43 -0
  21. cftscal-0.1.0/cftscal/plugins/inear/settings.py +26 -0
  22. cftscal-0.1.0/cftscal/plugins/inear/view.enaml +164 -0
  23. cftscal-0.1.0/cftscal/plugins/input_amplifier/__init__.py +0 -0
  24. cftscal-0.1.0/cftscal/plugins/input_amplifier/manifest.enaml +44 -0
  25. cftscal-0.1.0/cftscal/plugins/input_amplifier/settings.py +30 -0
  26. cftscal-0.1.0/cftscal/plugins/input_amplifier/view.enaml +180 -0
  27. cftscal-0.1.0/cftscal/plugins/manifest.enaml +47 -0
  28. cftscal-0.1.0/cftscal/plugins/microphone/__init__.py +0 -0
  29. cftscal-0.1.0/cftscal/plugins/microphone/manifest.enaml +44 -0
  30. cftscal-0.1.0/cftscal/plugins/microphone/settings.py +33 -0
  31. cftscal-0.1.0/cftscal/plugins/microphone/view.enaml +176 -0
  32. cftscal-0.1.0/cftscal/plugins/settings.py +236 -0
  33. cftscal-0.1.0/cftscal/plugins/speaker/__init__.py +0 -0
  34. cftscal-0.1.0/cftscal/plugins/speaker/manifest.enaml +48 -0
  35. cftscal-0.1.0/cftscal/plugins/speaker/settings.py +41 -0
  36. cftscal-0.1.0/cftscal/plugins/speaker/view.enaml +211 -0
  37. cftscal-0.1.0/cftscal/plugins/starship/__init__.py +0 -0
  38. cftscal-0.1.0/cftscal/plugins/starship/manifest.enaml +46 -0
  39. cftscal-0.1.0/cftscal/plugins/starship/settings.py +63 -0
  40. cftscal-0.1.0/cftscal/plugins/starship/view.enaml +198 -0
  41. cftscal-0.1.0/cftscal/plugins/widgets.enaml +335 -0
  42. cftscal-0.1.0/cftscal/util.py +128 -0
  43. cftscal-0.1.0/cftscal/version.py +4 -0
  44. cftscal-0.1.0/cftscal.egg-info/PKG-INFO +14 -0
  45. cftscal-0.1.0/cftscal.egg-info/SOURCES.txt +49 -0
  46. cftscal-0.1.0/cftscal.egg-info/dependency_links.txt +1 -0
  47. cftscal-0.1.0/cftscal.egg-info/entry_points.txt +2 -0
  48. cftscal-0.1.0/cftscal.egg-info/requires.txt +5 -0
  49. cftscal-0.1.0/cftscal.egg-info/top_level.txt +1 -0
  50. cftscal-0.1.0/pyproject.toml +30 -0
  51. cftscal-0.1.0/setup.cfg +4 -0
@@ -0,0 +1,37 @@
1
+ name: Publish Python distribution to PyPI
2
+ on:
3
+ push:
4
+ tags:
5
+ - '[0-9].[0-9]+.[0-9]+'
6
+
7
+ jobs:
8
+ pypi-publish:
9
+ name: Build and publish Python distribution to PyPI
10
+ runs-on: ubuntu-latest
11
+ environment:
12
+ name: pypi
13
+ url: https://pypi.org/p/cftscal
14
+ permissions:
15
+ id-token: write
16
+ steps:
17
+ - uses: actions/checkout@main
18
+ - name: Setup Python 3.10
19
+ uses: actions/setup-python@v3
20
+ with:
21
+ python-version: "3.10"
22
+ - name: Install pypa/build
23
+ run: >-
24
+ python -m
25
+ pip install
26
+ build
27
+ --user
28
+ - name: Build a binary wheel and a source tarball
29
+ run: >-
30
+ python -m
31
+ build
32
+ --sdist
33
+ --wheel
34
+ --outdir dist/
35
+ - name: Publish distribution to PyPI
36
+ if: startsWith(github.ref, 'refs/tags')
37
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,78 @@
1
+ # Generated by setuptools_scm
2
+ cftscal/version.py
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+
9
+ # C extensions
10
+ *.so
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ env/
15
+ build/
16
+ develop-eggs/
17
+ dist/
18
+ downloads/
19
+ eggs/
20
+ .eggs/
21
+ lib/
22
+ lib64/
23
+ parts/
24
+ sdist/
25
+ var/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *,cover
49
+ .hypothesis/
50
+ .pytest_cache/
51
+
52
+ # Translations
53
+ *.mo
54
+ *.pot
55
+
56
+ # Django stuff:
57
+ *.log
58
+
59
+ # Sphinx documentation
60
+ docs/_build/
61
+
62
+ # PyBuilder
63
+ target/
64
+
65
+
66
+ # Vim global
67
+ [._]*.s[a-w][a-z]
68
+ [._]s[a-w][a-z]
69
+ *.un~
70
+ Session.vim
71
+ .netrwhist
72
+ *~
73
+
74
+
75
+ __enamlcache__/
76
+ sandbox/
77
+ .ropeproject/
78
+ .ipynb_checkpoints/
cftscal-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,14 @@
1
+ Metadata-Version: 2.1
2
+ Name: cftscal
3
+ Version: 0.1.0
4
+ Summary: Paradigms for running calibrations required for CFTS
5
+ Author-email: Brad Buran <buran@ohsu.edu>
6
+ Maintainer-email: Brad Buran <buran@ohsu.edu>
7
+ Requires-Python: >=3.7
8
+ Description-Content-Type: text/markdown
9
+
10
+ # cftscal: tools for calibrating equipment used by CFTS
11
+
12
+ **cftscal** is a Python package that provides a simple user interface for
13
+ calibrating equipment used by CFTS (e.g., calibration microphones, free-field
14
+ speakers, starships and amplifiers).
@@ -0,0 +1,5 @@
1
+ # cftscal: tools for calibrating equipment used by CFTS
2
+
3
+ **cftscal** is a Python package that provides a simple user interface for
4
+ calibrating equipment used by CFTS (e.g., calibration microphones, free-field
5
+ speakers, starships and amplifiers).
File without changes
@@ -0,0 +1,10 @@
1
+ from .util import (
2
+ list_input_amplifier_connections,
3
+ list_microphone_connections,
4
+ list_speaker_connections,
5
+ list_starship_connections
6
+ )
7
+ from .objects import (
8
+ inear_manager, input_amplifier_manager, microphone_manager,
9
+ speaker_manager, starship_manager
10
+ )
@@ -0,0 +1,77 @@
1
+ import importlib
2
+
3
+ import enaml
4
+ from enaml.application import Application, deferred_call
5
+ from enaml.workbench.ui.api import UIWorkbench
6
+ import enamlx
7
+ enamlx.install()
8
+
9
+ UI_PLUGIN = 'enaml.workbench.ui'
10
+ CORE_PLUGIN = 'enaml.workbench.core'
11
+
12
+
13
+ class CalibrationWorkbench(UIWorkbench):
14
+
15
+ def run(self, obj=None):
16
+ """
17
+ Run the calibration workbench application. This method will load the
18
+ core and ui plugins and start the main application event loop. This is
19
+ a blocking call which will return when the application event loop
20
+ exits.
21
+ """
22
+ with enaml.imports():
23
+ from enaml.workbench.core.core_manifest import CoreManifest
24
+ from enaml.workbench.ui.ui_manifest import UIManifest
25
+
26
+ self.register(CoreManifest())
27
+ self.register(UIManifest())
28
+ ui = self.get_plugin(UI_PLUGIN)
29
+ core = self.get_plugin(CORE_PLUGIN)
30
+
31
+ ui.show_window()
32
+ if obj is not None:
33
+ deferred_call(core.invoke_command,
34
+ 'enaml.workbench.ui.select_workspace',
35
+ {'workspace': f'{obj}.workspace'}
36
+ )
37
+
38
+ ui.start_application()
39
+ self.unregister(UI_PLUGIN)
40
+ self.unregister(CORE_PLUGIN)
41
+
42
+
43
+ def main():
44
+ import argparse
45
+ parser = argparse.ArgumentParser('cfts-cal')
46
+ parser.add_argument('obj', nargs='?', default='starship')
47
+ args = parser.parse_args()
48
+
49
+ with enaml.imports():
50
+ from .plugins.manifest import CalibrationManifest
51
+ from .plugins.input_amplifier.manifest import InputAmplifierManifest
52
+ from .plugins.microphone.manifest import MicrophoneManifest
53
+ from .plugins.starship.manifest import StarshipManifest
54
+ from .plugins.speaker.manifest import SpeakerManifest
55
+ from .plugins.inear.manifest import InEarManifest
56
+
57
+ workbench = CalibrationWorkbench()
58
+ workbench.register(CalibrationManifest())
59
+
60
+ to_register = [
61
+ ('cftscal.plugins.input_amplifier.manifest', 'InputAmplifierManifest'),
62
+ ('cftscal.plugins.microphone.manifest', 'MicrophoneManifest'),
63
+ ('cftscal.plugins.starship.manifest', 'StarshipManifest'),
64
+ ('cftscal.plugins.speaker.manifest', 'SpeakerManifest'),
65
+ ('cftscal.plugins.inear.manifest', 'InEarManifest')
66
+ ]
67
+
68
+ with enaml.imports():
69
+ for module_name, class_name in to_register:
70
+ try:
71
+ module = importlib.import_module(module_name)
72
+ if getattr(module, 'available')():
73
+ workbench.register(getattr(module, class_name)())
74
+ except ModuleNotFoundError as e:
75
+ print(f'Could not load {module_name}.{class_name} plugin')
76
+
77
+ workbench.run(args.obj)