PyDMConverter 0.0.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 (74) hide show
  1. pydmconverter-0.0.0/.github/ISSUE_TEMPLATE/bug-report.yml +71 -0
  2. pydmconverter-0.0.0/.github/ISSUE_TEMPLATE/feature-request.yml +37 -0
  3. pydmconverter-0.0.0/.github/workflows/gh-pages.yml +38 -0
  4. pydmconverter-0.0.0/.github/workflows/lint.yml +29 -0
  5. pydmconverter-0.0.0/.github/workflows/pypi_release.yml +28 -0
  6. pydmconverter-0.0.0/.github/workflows/tests.yml +69 -0
  7. pydmconverter-0.0.0/.gitignore +121 -0
  8. pydmconverter-0.0.0/.pre-commit-config.yaml +25 -0
  9. pydmconverter-0.0.0/LICENSE +674 -0
  10. pydmconverter-0.0.0/PKG-INFO +817 -0
  11. pydmconverter-0.0.0/PyDMConverter.egg-info/PKG-INFO +817 -0
  12. pydmconverter-0.0.0/PyDMConverter.egg-info/SOURCES.txt +72 -0
  13. pydmconverter-0.0.0/PyDMConverter.egg-info/dependency_links.txt +1 -0
  14. pydmconverter-0.0.0/PyDMConverter.egg-info/entry_points.txt +2 -0
  15. pydmconverter-0.0.0/PyDMConverter.egg-info/requires.txt +8 -0
  16. pydmconverter-0.0.0/PyDMConverter.egg-info/top_level.txt +1 -0
  17. pydmconverter-0.0.0/README.md +114 -0
  18. pydmconverter-0.0.0/app/resources/file_minus.png +0 -0
  19. pydmconverter-0.0.0/app/resources/file_plus.png +0 -0
  20. pydmconverter-0.0.0/app/resources/file_x.png +0 -0
  21. pydmconverter-0.0.0/app/resources/folder_plus.png +0 -0
  22. pydmconverter-0.0.0/app/resources/folder_search.png +0 -0
  23. pydmconverter-0.0.0/app/resources/play_circle_outline.png +0 -0
  24. pydmconverter-0.0.0/app/resources/settings.png +0 -0
  25. pydmconverter-0.0.0/app/src/model/__init__.py +0 -0
  26. pydmconverter-0.0.0/app/src/model/app_model.py +18 -0
  27. pydmconverter-0.0.0/app/src/model/options_model.py +72 -0
  28. pydmconverter-0.0.0/app/src/view/__init__.py +0 -0
  29. pydmconverter-0.0.0/app/src/view/file_select_widget.py +71 -0
  30. pydmconverter-0.0.0/app/src/view/main_window.py +199 -0
  31. pydmconverter-0.0.0/app/src/view/main_window.ui +344 -0
  32. pydmconverter-0.0.0/app/src/view/options_window.py +146 -0
  33. pydmconverter-0.0.0/app/src/view/output_select_dialog.py +75 -0
  34. pydmconverter-0.0.0/docs/arguments.md +22 -0
  35. pydmconverter-0.0.0/docs/images/pydmconverter.png +0 -0
  36. pydmconverter-0.0.0/docs/index.md +14 -0
  37. pydmconverter-0.0.0/docs/reference/custom_types.md +3 -0
  38. pydmconverter-0.0.0/docs/reference/edm/converter.md +3 -0
  39. pydmconverter-0.0.0/docs/reference/edm/converter_helpers.md +3 -0
  40. pydmconverter-0.0.0/docs/reference/edm/menumux.md +3 -0
  41. pydmconverter-0.0.0/docs/reference/edm/parser.md +3 -0
  42. pydmconverter-0.0.0/docs/reference/edm/parser_helpers.md +3 -0
  43. pydmconverter-0.0.0/docs/reference/index.md +14 -0
  44. pydmconverter-0.0.0/docs/reference/pydm-converter-tool.md +0 -0
  45. pydmconverter-0.0.0/docs/reference/widgets.md +3 -0
  46. pydmconverter-0.0.0/docs/reference/widgets_helpers.md +3 -0
  47. pydmconverter-0.0.0/docs/user_guide.md +43 -0
  48. pydmconverter-0.0.0/environment.yml +18 -0
  49. pydmconverter-0.0.0/examples/TEM_mapping.edl +74 -0
  50. pydmconverter-0.0.0/examples/all_bsy0_main.edl +111 -0
  51. pydmconverter-0.0.0/examples/all_bsy0_main_with_groups.edl +142 -0
  52. pydmconverter-0.0.0/examples/prosilica.edl +2383 -0
  53. pydmconverter-0.0.0/launch_gui.sh +26 -0
  54. pydmconverter-0.0.0/mkdocs.yml +62 -0
  55. pydmconverter-0.0.0/pydmconverter/__init__.py +0 -0
  56. pydmconverter-0.0.0/pydmconverter/__main__.py +233 -0
  57. pydmconverter-0.0.0/pydmconverter/custom_types.py +39 -0
  58. pydmconverter-0.0.0/pydmconverter/edm/__init__.py +0 -0
  59. pydmconverter-0.0.0/pydmconverter/edm/converter.py +119 -0
  60. pydmconverter-0.0.0/pydmconverter/edm/converter_helpers.py +895 -0
  61. pydmconverter-0.0.0/pydmconverter/edm/menumux.py +99 -0
  62. pydmconverter-0.0.0/pydmconverter/edm/parser.py +681 -0
  63. pydmconverter-0.0.0/pydmconverter/edm/parser_helpers.py +889 -0
  64. pydmconverter-0.0.0/pydmconverter/widgets.py +1770 -0
  65. pydmconverter-0.0.0/pydmconverter/widgets_helpers.py +1931 -0
  66. pydmconverter-0.0.0/pyproject.toml +71 -0
  67. pydmconverter-0.0.0/setup.cfg +4 -0
  68. pydmconverter-0.0.0/tests/__init__.py +0 -0
  69. pydmconverter-0.0.0/tests/edm/test_converter.py +0 -0
  70. pydmconverter-0.0.0/tests/edm/test_converter_helpers.py +0 -0
  71. pydmconverter-0.0.0/tests/edm/test_parser.py +173 -0
  72. pydmconverter-0.0.0/tests/edm/test_parser_helpers.py +496 -0
  73. pydmconverter-0.0.0/tests/test_widgets.py +539 -0
  74. pydmconverter-0.0.0/tests/test_widgets_helpers.py +626 -0
@@ -0,0 +1,71 @@
1
+ name: Bug report
2
+ description: Report an issue or bug with the project.
3
+ title: "[BUG] - "
4
+ labels: ["bug"]
5
+
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: |
10
+ **Please provide a clear and concise description of the bug.**
11
+
12
+ - type: textarea
13
+ id: description
14
+ attributes:
15
+ label: Describe the bug
16
+ description: A clear and concise description of what the bug is.
17
+ placeholder: The bug occurs when...
18
+ validations:
19
+ required: true
20
+
21
+ - type: textarea
22
+ id: expected_behavior
23
+ attributes:
24
+ label: Expected behavior
25
+ description: A clear and concise description of what you expected to happen.
26
+ placeholder: I expected...
27
+ validations:
28
+ required: true
29
+
30
+ - type: textarea
31
+ id: steps_to_reproduce
32
+ attributes:
33
+ label: Steps to Reproduce
34
+ description: Steps to reproduce the bug.
35
+ placeholder: |
36
+ 1. Go to...
37
+ 2. Click on...
38
+ 3. Scroll down to...
39
+ 4. See error
40
+ validations:
41
+ required: true
42
+
43
+ - type: textarea
44
+ id: possible_solution
45
+ attributes:
46
+ label: Possible solution (optional)
47
+ description: Suggest a fix or reason for the bug, if you have any.
48
+ placeholder: A possible solution could be...
49
+ validations:
50
+ required: false
51
+
52
+ - type: input
53
+ id: platform
54
+ attributes:
55
+ label: My platform
56
+ description: Provide details about your system.
57
+ placeholder: |
58
+ OS Version: ...
59
+ Python Version: ...
60
+ Package Versions: ...
61
+ validations:
62
+ required: false
63
+
64
+ - type: textarea
65
+ id: additional_context
66
+ attributes:
67
+ label: Additional context
68
+ description: Add any other context, links, or information about the bug.
69
+ placeholder: Include logs, screenshots, or other details here.
70
+ validations:
71
+ required: false
@@ -0,0 +1,37 @@
1
+ name: Feature request
2
+ description: Suggest a new feature or enhancement for the project.
3
+ title: "[FEATURE] - "
4
+ labels: ["enhancement"]
5
+
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: |
10
+ **Please provide a clear and concise description of the feature you'd like to propose.**
11
+
12
+ - type: textarea
13
+ id: problem
14
+ attributes:
15
+ label: What's the problem this feature will solve?
16
+ description: A clear and concise description of the problem or pain point.
17
+ placeholder: This feature would solve...
18
+ validations:
19
+ required: true
20
+
21
+ - type: textarea
22
+ id: solution
23
+ attributes:
24
+ label: Describe the solution you'd like
25
+ description: A clear and concise description of what you want to happen.
26
+ placeholder: The ideal solution would be...
27
+ validations:
28
+ required: true
29
+
30
+ - type: textarea
31
+ id: additional_context
32
+ attributes:
33
+ label: Additional context
34
+ description: Add any other context, links, or resources to support your feature request.
35
+ placeholder: Include any relevant links, screenshots, or references here.
36
+ validations:
37
+ required: false
@@ -0,0 +1,38 @@
1
+ # This workflow will publish a new version of the documentation to the gh-pages branch
2
+
3
+ name: Publish Documentation
4
+
5
+ on:
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ jobs:
11
+ deploy:
12
+ if: ${{ github.repository == 'slaclab/pydm-converter-tool' }}
13
+ runs-on: ${{ matrix.os }}
14
+ strategy:
15
+ matrix:
16
+ os: [ubuntu-latest]
17
+ python-version: [3.9]
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ - uses: conda-incubator/setup-miniconda@v3
21
+ with:
22
+ miniforge-version: latest
23
+ use-mamba: true
24
+ python-version: ${{ matrix.python-version }}
25
+ channels: conda-forge
26
+ activate-environment: pydm-converter-tool-dev
27
+ environment-file: environment.yml
28
+
29
+ - name: Build Docs
30
+ shell: bash -l {0}
31
+ run: |
32
+ mkdocs build
33
+
34
+ - name: Deploy to gh-pages
35
+ uses: peaceiris/actions-gh-pages@v4
36
+ with:
37
+ github_token: ${{ secrets.GITHUB_TOKEN }}
38
+ publish_dir: ./site/
@@ -0,0 +1,29 @@
1
+ name: Linting
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+
7
+ jobs:
8
+ lint:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ with:
13
+ fetch-depth: 1
14
+ - name: Install Python
15
+ uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.12"
18
+ - name: Install dependencies
19
+ run: |
20
+ python -m pip install --upgrade pip
21
+ pip install ruff pre-commit
22
+ - name: Switch to a temporary branch
23
+ run: |
24
+ git checkout -b _ci_branch_
25
+ - name: Run pre-commit on all files
26
+ env:
27
+ RUFF_OUTPUT_FORMAT: github
28
+ run: |
29
+ pre-commit run --show-diff-on-failure --color=always --all-files
@@ -0,0 +1,28 @@
1
+ name: Publish Python distributions to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ publish-pypi:
9
+ runs-on: ubuntu-latest
10
+ environment: deployment
11
+ permissions:
12
+ id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ fetch-depth: 0
17
+ - name: Set up Python 3.12
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: 3.12
21
+ - name: Install pypa/build
22
+ run: |
23
+ python -m pip install build --user
24
+ - name: Build a source tarball
25
+ run: |
26
+ python -m build --sdist --outdir dist/ .
27
+ - name: Publish package distributions to PyPI
28
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,69 @@
1
+ name: Tests
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+
7
+ jobs:
8
+
9
+ test:
10
+ runs-on: ${{ matrix.os }}
11
+ defaults:
12
+ run:
13
+ shell: bash
14
+ strategy:
15
+ max-parallel: 1
16
+ matrix:
17
+ os: [ubuntu-latest, macos-latest, windows-latest]
18
+ python-version: ['3.10']
19
+ env:
20
+ DISPLAY: ':99.0'
21
+ QT_MAC_WANTS_LAYER: 1 # PyQT gui tests involving qtbot interaction on macOS will fail without this
22
+ steps:
23
+ - uses: actions/checkout@v4
24
+
25
+ - name: Setup Miniforge
26
+ uses: conda-incubator/setup-miniconda@v3
27
+ with:
28
+ miniforge-version: latest
29
+ activate-environment: pydm-converter-tool-dev
30
+ use-mamba: true
31
+ python-version: ${{ matrix.python-version }}
32
+
33
+ - name: Install libs for testing a pyqt app on linux
34
+ shell: bash -el {0}
35
+ run: |
36
+ if [ "$RUNNER_OS" == "Linux" ]; then
37
+ sudo apt install xvfb herbstluftwm libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils
38
+ sudo /sbin/start-stop-daemon --start --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset
39
+ sleep 3
40
+ sudo /sbin/start-stop-daemon --start --pidfile /tmp/custom_herbstluftwm_99.pid --make-pidfile --background --exec /usr/bin/herbstluftwm
41
+ sleep 1
42
+ fi
43
+
44
+ - name: Install PyDMConverter
45
+ shell: bash -l {0}
46
+ run: |
47
+ pip install ".[dev]"
48
+
49
+ - name: Run Tests
50
+ shell: bash -l {0}
51
+ run: |
52
+ pytest
53
+
54
+ test-pypi-build:
55
+ runs-on: ubuntu-latest
56
+ steps:
57
+ - uses: actions/checkout@v4
58
+ with:
59
+ fetch-depth: 0
60
+ - name: Set up Python 3.10
61
+ uses: actions/setup-python@v5
62
+ with:
63
+ python-version: '3.10'
64
+ - name: Install pypa/build
65
+ run: |
66
+ python -m pip install build --user
67
+ - name: Build a source tarball
68
+ run: |
69
+ python -m build --sdist --outdir dist/ .
@@ -0,0 +1,121 @@
1
+ # PyTest Cache
2
+ .pytest_cache
3
+
4
+ # OSX DS_Store
5
+ .DS_Store
6
+
7
+ # PyCharm
8
+ .idea
9
+
10
+ # PyDev
11
+ .settings
12
+ *.project
13
+ *.pydevproject
14
+
15
+ # Byte-compiled / optimized / DLL files
16
+ __pycache__/
17
+ *.py[cod]
18
+ *$py.class
19
+
20
+ # C extensions
21
+ *.so
22
+
23
+ # Distribution / packaging
24
+ .Python
25
+ build/
26
+ develop-eggs/
27
+ dist/
28
+ downloads/
29
+ eggs/
30
+ .eggs/
31
+ lib/
32
+ lib64/
33
+ parts/
34
+ sdist/
35
+ var/
36
+ wheels/
37
+ *.egg-info/
38
+ .installed.cfg
39
+ *.egg
40
+
41
+ # PyInstaller
42
+ # Usually these files are written by a python script from a template
43
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
44
+ *.manifest
45
+ *.spec
46
+
47
+ # Installer logs
48
+ pip-log.txt
49
+ pip-delete-this-directory.txt
50
+
51
+ # Unit test / coverage reports
52
+ htmlcov/
53
+ .tox/
54
+ .coverage
55
+ .coverage.*
56
+ .cache
57
+ nosetests.xml
58
+ coverage.xml
59
+ *.cover
60
+ .hypothesis/
61
+
62
+ # Translations
63
+ *.mo
64
+ *.pot
65
+
66
+ # Django stuff:
67
+ *.log
68
+ local_settings.py
69
+
70
+ # Flask stuff:
71
+ instance/
72
+ .webassets-cache
73
+
74
+ # Scrapy stuff:
75
+ .scrapy
76
+
77
+ # Sphinx documentation
78
+ docs/_build/
79
+
80
+ # PyBuilder
81
+ target/
82
+
83
+ # Jupyter Notebook
84
+ .ipynb_checkpoints
85
+
86
+ # pyenv
87
+ .python-version
88
+
89
+ # celery beat schedule file
90
+ celerybeat-schedule
91
+
92
+ # SageMath parsed files
93
+ *.sage.py
94
+
95
+ # Environments
96
+ .env
97
+ .venv
98
+ env/
99
+ venv/
100
+ ENV/
101
+
102
+ # Spyder project settings
103
+ .spyderproject
104
+ .spyproject
105
+
106
+ # Rope project settings
107
+ .ropeproject
108
+
109
+ # mkdocs documentation
110
+ /site
111
+
112
+ # mypy
113
+ .mypy_cache/
114
+
115
+ # vim
116
+ *.swp
117
+
118
+ # Microsoft Visual Studio Code editor
119
+ .vscode/
120
+
121
+ *.json
@@ -0,0 +1,25 @@
1
+ # See https://pre-commit.com for more information
2
+ # See https://pre-commit.com/hooks.html for more hooks
3
+ repos:
4
+ - repo: https://github.com/pre-commit/pre-commit-hooks
5
+ rev: v5.0.0
6
+ hooks:
7
+ - id: no-commit-to-branch
8
+ - id: trailing-whitespace
9
+ exclude: ^examples/
10
+ - id: end-of-file-fixer
11
+ exclude: ^examples/
12
+ - id: check-ast
13
+ - id: check-case-conflict
14
+ - id: check-json
15
+ - id: check-merge-conflict
16
+ - id: check-symlinks
17
+ - id: check-xml
18
+ - id: check-yaml
19
+
20
+ - repo: https://github.com/astral-sh/ruff-pre-commit
21
+ rev: v0.9.2
22
+ hooks:
23
+ - id: ruff
24
+ args: [--fix]
25
+ - id: ruff-format