PrEditor 2.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 (203) hide show
  1. preditor-2.0.0/.coveragerc +17 -0
  2. preditor-2.0.0/.github/ISSUE_TEMPLATE/BUG_REPORT.md +45 -0
  3. preditor-2.0.0/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +28 -0
  4. preditor-2.0.0/.github/PULL_REQUEST_TEMPLATE.md +29 -0
  5. preditor-2.0.0/.github/workflows/release.yml +48 -0
  6. preditor-2.0.0/.github/workflows/static-analysis-and-test.yml +185 -0
  7. preditor-2.0.0/.gitignore +35 -0
  8. preditor-2.0.0/.pre-commit-config.yaml +39 -0
  9. preditor-2.0.0/CODE_OF_CONDUCT.md +44 -0
  10. preditor-2.0.0/CONTRIBUTING.md +78 -0
  11. preditor-2.0.0/LICENSE +165 -0
  12. preditor-2.0.0/MANIFEST.in +4 -0
  13. preditor-2.0.0/PKG-INFO +308 -0
  14. preditor-2.0.0/PrEditor.egg-info/PKG-INFO +308 -0
  15. preditor-2.0.0/PrEditor.egg-info/SOURCES.txt +201 -0
  16. preditor-2.0.0/PrEditor.egg-info/dependency_links.txt +1 -0
  17. preditor-2.0.0/PrEditor.egg-info/entry_points.txt +19 -0
  18. preditor-2.0.0/PrEditor.egg-info/requires.txt +33 -0
  19. preditor-2.0.0/PrEditor.egg-info/top_level.txt +4 -0
  20. preditor-2.0.0/README.md +260 -0
  21. preditor-2.0.0/examples/add_to_app.py +72 -0
  22. preditor-2.0.0/examples/output_capture_and_show.py +12 -0
  23. preditor-2.0.0/examples/output_console.py +162 -0
  24. preditor-2.0.0/examples/output_console.ui +203 -0
  25. preditor-2.0.0/preditor/__init__.py +315 -0
  26. preditor-2.0.0/preditor/__main__.py +13 -0
  27. preditor-2.0.0/preditor/about_module.py +165 -0
  28. preditor-2.0.0/preditor/cli.py +192 -0
  29. preditor-2.0.0/preditor/config.py +318 -0
  30. preditor-2.0.0/preditor/constants.py +13 -0
  31. preditor-2.0.0/preditor/contexts.py +119 -0
  32. preditor-2.0.0/preditor/cores/__init__.py +0 -0
  33. preditor-2.0.0/preditor/cores/core.py +20 -0
  34. preditor-2.0.0/preditor/dccs/.hab.json +10 -0
  35. preditor-2.0.0/preditor/dccs/maya/PrEditor_maya.mod +1 -0
  36. preditor-2.0.0/preditor/dccs/maya/README.md +22 -0
  37. preditor-2.0.0/preditor/dccs/maya/plug-ins/PrEditor_maya.py +141 -0
  38. preditor-2.0.0/preditor/dccs/studiomax/PackageContents.xml +32 -0
  39. preditor-2.0.0/preditor/dccs/studiomax/PrEditor-PrEditor_Show.mcr +8 -0
  40. preditor-2.0.0/preditor/dccs/studiomax/README.md +17 -0
  41. preditor-2.0.0/preditor/dccs/studiomax/preditor.ms +16 -0
  42. preditor-2.0.0/preditor/dccs/studiomax/preditor_menu.mnx +7 -0
  43. preditor-2.0.0/preditor/debug.py +149 -0
  44. preditor-2.0.0/preditor/delayable_engine/__init__.py +302 -0
  45. preditor-2.0.0/preditor/delayable_engine/delayables.py +85 -0
  46. preditor-2.0.0/preditor/enum.py +728 -0
  47. preditor-2.0.0/preditor/excepthooks.py +175 -0
  48. preditor-2.0.0/preditor/gui/__init__.py +56 -0
  49. preditor-2.0.0/preditor/gui/app.py +160 -0
  50. preditor-2.0.0/preditor/gui/codehighlighter.py +289 -0
  51. preditor-2.0.0/preditor/gui/completer.py +237 -0
  52. preditor-2.0.0/preditor/gui/console.py +602 -0
  53. preditor-2.0.0/preditor/gui/console_base.py +751 -0
  54. preditor-2.0.0/preditor/gui/dialog.py +181 -0
  55. preditor-2.0.0/preditor/gui/drag_tab_bar.py +625 -0
  56. preditor-2.0.0/preditor/gui/editor_chooser.py +57 -0
  57. preditor-2.0.0/preditor/gui/errordialog.py +69 -0
  58. preditor-2.0.0/preditor/gui/find_files.py +137 -0
  59. preditor-2.0.0/preditor/gui/fuzzy_search/__init__.py +0 -0
  60. preditor-2.0.0/preditor/gui/fuzzy_search/fuzzy_search.py +97 -0
  61. preditor-2.0.0/preditor/gui/group_tab_widget/__init__.py +0 -0
  62. preditor-2.0.0/preditor/gui/group_tab_widget/group_tab_widget.py +528 -0
  63. preditor-2.0.0/preditor/gui/group_tab_widget/grouped_tab_menu.py +35 -0
  64. preditor-2.0.0/preditor/gui/group_tab_widget/grouped_tab_models.py +107 -0
  65. preditor-2.0.0/preditor/gui/group_tab_widget/grouped_tab_widget.py +223 -0
  66. preditor-2.0.0/preditor/gui/group_tab_widget/one_tab_widget.py +96 -0
  67. preditor-2.0.0/preditor/gui/level_buttons.py +358 -0
  68. preditor-2.0.0/preditor/gui/logger_window_handler.py +77 -0
  69. preditor-2.0.0/preditor/gui/logger_window_plugin.py +35 -0
  70. preditor-2.0.0/preditor/gui/loggerwindow.py +2365 -0
  71. preditor-2.0.0/preditor/gui/newtabwidget.py +69 -0
  72. preditor-2.0.0/preditor/gui/output_console.py +5 -0
  73. preditor-2.0.0/preditor/gui/qtdesigner/__init__.py +21 -0
  74. preditor-2.0.0/preditor/gui/qtdesigner/_log_plugin.py +29 -0
  75. preditor-2.0.0/preditor/gui/qtdesigner/console_base_plugin.py +48 -0
  76. preditor-2.0.0/preditor/gui/qtdesigner/console_predit_plugin.py +48 -0
  77. preditor-2.0.0/preditor/gui/set_text_editor_path_dialog.py +61 -0
  78. preditor-2.0.0/preditor/gui/status_label.py +99 -0
  79. preditor-2.0.0/preditor/gui/suggest_path_quotes_dialog.py +50 -0
  80. preditor-2.0.0/preditor/gui/ui/editor_chooser.ui +93 -0
  81. preditor-2.0.0/preditor/gui/ui/errordialog.ui +74 -0
  82. preditor-2.0.0/preditor/gui/ui/find_files.ui +140 -0
  83. preditor-2.0.0/preditor/gui/ui/loggerwindow.ui +1843 -0
  84. preditor-2.0.0/preditor/gui/ui/set_text_editor_path_dialog.ui +189 -0
  85. preditor-2.0.0/preditor/gui/ui/suggest_path_quotes_dialog.ui +225 -0
  86. preditor-2.0.0/preditor/gui/window.py +161 -0
  87. preditor-2.0.0/preditor/gui/workbox_mixin.py +1139 -0
  88. preditor-2.0.0/preditor/gui/workbox_text_edit.py +136 -0
  89. preditor-2.0.0/preditor/gui/workboxwidget.py +315 -0
  90. preditor-2.0.0/preditor/logging_config.py +55 -0
  91. preditor-2.0.0/preditor/osystem.py +401 -0
  92. preditor-2.0.0/preditor/plugins.py +118 -0
  93. preditor-2.0.0/preditor/prefs.py +381 -0
  94. preditor-2.0.0/preditor/resource/environment_variables.html +26 -0
  95. preditor-2.0.0/preditor/resource/error_mail.html +85 -0
  96. preditor-2.0.0/preditor/resource/error_mail_inline.html +41 -0
  97. preditor-2.0.0/preditor/resource/img/README.md +17 -0
  98. preditor-2.0.0/preditor/resource/img/arrow_forward.png +0 -0
  99. preditor-2.0.0/preditor/resource/img/check-bold.png +0 -0
  100. preditor-2.0.0/preditor/resource/img/chevron-down.png +0 -0
  101. preditor-2.0.0/preditor/resource/img/chevron-up.png +0 -0
  102. preditor-2.0.0/preditor/resource/img/close-thick.png +0 -0
  103. preditor-2.0.0/preditor/resource/img/comment-edit.png +0 -0
  104. preditor-2.0.0/preditor/resource/img/content-copy.png +0 -0
  105. preditor-2.0.0/preditor/resource/img/content-cut.png +0 -0
  106. preditor-2.0.0/preditor/resource/img/content-duplicate.png +0 -0
  107. preditor-2.0.0/preditor/resource/img/content-paste.png +0 -0
  108. preditor-2.0.0/preditor/resource/img/content-save.png +0 -0
  109. preditor-2.0.0/preditor/resource/img/debug_disabled.png +0 -0
  110. preditor-2.0.0/preditor/resource/img/eye-check.png +0 -0
  111. preditor-2.0.0/preditor/resource/img/file-plus.png +0 -0
  112. preditor-2.0.0/preditor/resource/img/file-remove.png +0 -0
  113. preditor-2.0.0/preditor/resource/img/format-align-left.png +0 -0
  114. preditor-2.0.0/preditor/resource/img/format-letter-case-lower.png +0 -0
  115. preditor-2.0.0/preditor/resource/img/format-letter-case-upper.png +0 -0
  116. preditor-2.0.0/preditor/resource/img/format-letter-case.svg +1 -0
  117. preditor-2.0.0/preditor/resource/img/information.png +0 -0
  118. preditor-2.0.0/preditor/resource/img/logging_critical.png +0 -0
  119. preditor-2.0.0/preditor/resource/img/logging_custom.png +0 -0
  120. preditor-2.0.0/preditor/resource/img/logging_debug.png +0 -0
  121. preditor-2.0.0/preditor/resource/img/logging_error.png +0 -0
  122. preditor-2.0.0/preditor/resource/img/logging_info.png +0 -0
  123. preditor-2.0.0/preditor/resource/img/logging_not_set.png +0 -0
  124. preditor-2.0.0/preditor/resource/img/logging_warning.png +0 -0
  125. preditor-2.0.0/preditor/resource/img/marker.png +0 -0
  126. preditor-2.0.0/preditor/resource/img/play.png +0 -0
  127. preditor-2.0.0/preditor/resource/img/playlist-play.png +0 -0
  128. preditor-2.0.0/preditor/resource/img/plus-minus-variant.png +0 -0
  129. preditor-2.0.0/preditor/resource/img/preditor.ico +0 -0
  130. preditor-2.0.0/preditor/resource/img/preditor.png +0 -0
  131. preditor-2.0.0/preditor/resource/img/preditor.psd +0 -0
  132. preditor-2.0.0/preditor/resource/img/preditor.svg +44 -0
  133. preditor-2.0.0/preditor/resource/img/regex.svg +1 -0
  134. preditor-2.0.0/preditor/resource/img/restart.svg +1 -0
  135. preditor-2.0.0/preditor/resource/img/skip-forward-outline.png +0 -0
  136. preditor-2.0.0/preditor/resource/img/skip-next-outline.png +0 -0
  137. preditor-2.0.0/preditor/resource/img/skip-next.png +0 -0
  138. preditor-2.0.0/preditor/resource/img/skip-previous.png +0 -0
  139. preditor-2.0.0/preditor/resource/img/subdirectory-arrow-right.png +0 -0
  140. preditor-2.0.0/preditor/resource/img/text-search-variant.png +0 -0
  141. preditor-2.0.0/preditor/resource/img/warning-big.png +0 -0
  142. preditor-2.0.0/preditor/resource/lang/python.json +30 -0
  143. preditor-2.0.0/preditor/resource/pref_updates/pref_updates.json +17 -0
  144. preditor-2.0.0/preditor/resource/settings.ini +25 -0
  145. preditor-2.0.0/preditor/resource/stylesheet/Bright.css +76 -0
  146. preditor-2.0.0/preditor/resource/stylesheet/Dark.css +210 -0
  147. preditor-2.0.0/preditor/scintilla/__init__.py +40 -0
  148. preditor-2.0.0/preditor/scintilla/delayables/__init__.py +11 -0
  149. preditor-2.0.0/preditor/scintilla/delayables/smart_highlight.py +97 -0
  150. preditor-2.0.0/preditor/scintilla/delayables/spell_check.py +174 -0
  151. preditor-2.0.0/preditor/scintilla/documenteditor.py +1924 -0
  152. preditor-2.0.0/preditor/scintilla/finddialog.py +68 -0
  153. preditor-2.0.0/preditor/scintilla/lang/__init__.py +80 -0
  154. preditor-2.0.0/preditor/scintilla/lang/config/bash.ini +15 -0
  155. preditor-2.0.0/preditor/scintilla/lang/config/batch.ini +14 -0
  156. preditor-2.0.0/preditor/scintilla/lang/config/cpp.ini +19 -0
  157. preditor-2.0.0/preditor/scintilla/lang/config/css.ini +19 -0
  158. preditor-2.0.0/preditor/scintilla/lang/config/eyeonscript.ini +17 -0
  159. preditor-2.0.0/preditor/scintilla/lang/config/html.ini +21 -0
  160. preditor-2.0.0/preditor/scintilla/lang/config/javascript.ini +24 -0
  161. preditor-2.0.0/preditor/scintilla/lang/config/lua.ini +16 -0
  162. preditor-2.0.0/preditor/scintilla/lang/config/maxscript.ini +20 -0
  163. preditor-2.0.0/preditor/scintilla/lang/config/mel.ini +18 -0
  164. preditor-2.0.0/preditor/scintilla/lang/config/mu.ini +22 -0
  165. preditor-2.0.0/preditor/scintilla/lang/config/nsi.ini +19 -0
  166. preditor-2.0.0/preditor/scintilla/lang/config/perl.ini +19 -0
  167. preditor-2.0.0/preditor/scintilla/lang/config/puppet.ini +19 -0
  168. preditor-2.0.0/preditor/scintilla/lang/config/python.ini +28 -0
  169. preditor-2.0.0/preditor/scintilla/lang/config/ruby.ini +19 -0
  170. preditor-2.0.0/preditor/scintilla/lang/config/sql.ini +7 -0
  171. preditor-2.0.0/preditor/scintilla/lang/config/xml.ini +21 -0
  172. preditor-2.0.0/preditor/scintilla/lang/config/yaml.ini +18 -0
  173. preditor-2.0.0/preditor/scintilla/lang/language.py +240 -0
  174. preditor-2.0.0/preditor/scintilla/lexers/__init__.py +0 -0
  175. preditor-2.0.0/preditor/scintilla/lexers/cpplexer.py +22 -0
  176. preditor-2.0.0/preditor/scintilla/lexers/javascriptlexer.py +27 -0
  177. preditor-2.0.0/preditor/scintilla/lexers/maxscriptlexer.py +235 -0
  178. preditor-2.0.0/preditor/scintilla/lexers/mellexer.py +369 -0
  179. preditor-2.0.0/preditor/scintilla/lexers/mulexer.py +33 -0
  180. preditor-2.0.0/preditor/scintilla/lexers/pythonlexer.py +42 -0
  181. preditor-2.0.0/preditor/scintilla/ui/finddialog.ui +160 -0
  182. preditor-2.0.0/preditor/settings.py +71 -0
  183. preditor-2.0.0/preditor/stream/__init__.py +72 -0
  184. preditor-2.0.0/preditor/stream/console_handler.py +159 -0
  185. preditor-2.0.0/preditor/stream/director.py +144 -0
  186. preditor-2.0.0/preditor/stream/manager.py +100 -0
  187. preditor-2.0.0/preditor/streamhandler_helper.py +46 -0
  188. preditor-2.0.0/preditor/utils/__init__.py +133 -0
  189. preditor-2.0.0/preditor/utils/call_stack.py +86 -0
  190. preditor-2.0.0/preditor/utils/cute.py +106 -0
  191. preditor-2.0.0/preditor/utils/stylesheets.py +54 -0
  192. preditor-2.0.0/preditor/utils/text_search.py +338 -0
  193. preditor-2.0.0/preditor/version.py +34 -0
  194. preditor-2.0.0/preditor/weakref.py +363 -0
  195. preditor-2.0.0/pyproject.toml +112 -0
  196. preditor-2.0.0/requirements-cli.txt +2 -0
  197. preditor-2.0.0/requirements-dev.txt +10 -0
  198. preditor-2.0.0/requirements-qsci5.txt +1 -0
  199. preditor-2.0.0/requirements-qsci6.txt +1 -0
  200. preditor-2.0.0/requirements-shortcut.txt +1 -0
  201. preditor-2.0.0/requirements.txt +6 -0
  202. preditor-2.0.0/setup.cfg +4 -0
  203. preditor-2.0.0/tox.ini +57 -0
@@ -0,0 +1,17 @@
1
+ [report]
2
+ show_missing = false
3
+ skip_covered = true
4
+ skip_empty = true
5
+
6
+ [run]
7
+ # Ensure all python modules in preditor have their coverage reported,
8
+ # not just files that pytest touches.
9
+ source = preditor
10
+ omit =
11
+ */site-packages/*
12
+ tests/*
13
+ # This file is automatically generated by setuptools_scm
14
+ preditor/version.py
15
+ parallel=True
16
+ relative_files=True
17
+ data_file=.coverage/.coverage
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: Bug Report
3
+ about: File a bug report. (Please search exisiting issues before submitting. Also see CONTRIBUTING.md.)
4
+ title: ""
5
+ labels: bug
6
+ assignees: ""
7
+ ---
8
+
9
+ ## Summary
10
+
11
+ <!--
12
+ What went wrong? What is the current behavior?
13
+ Please be as clear and concise as possible.
14
+ -->
15
+
16
+ ## Expected Behavior
17
+
18
+ <!--
19
+ What did you expect to happen?
20
+ -->
21
+
22
+ ## Steps to Reproduce Behavior
23
+
24
+ <!--
25
+ If possible, please share the steps to reproduce the issue.
26
+ If relevant, feel free to include any code that reliably reproduces the issue.
27
+ -->
28
+
29
+ ### Solution
30
+
31
+ <!--
32
+ If you have any suggestions on fixing the issue.
33
+ -->
34
+
35
+ ## Environment
36
+
37
+ - Version: <!-- [e.g. 0.1.0] -->
38
+ - OS and Python version: <!-- [e.g. Linux/Python 3.8.7] -->
39
+
40
+ ## Additional Context
41
+
42
+ <!--
43
+ Append any additional context regarding the problem here.
44
+ Screenshots are always welcome!
45
+ -->
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest an idea for the project. (Please search exisiting issues before submitting. Also see CONTRIBUTING.md.)
4
+ title: ""
5
+ labels: enhancement
6
+ assignees: ""
7
+ ---
8
+
9
+
10
+ ## Description
11
+
12
+ <!--
13
+ Describe the functionality you would like to see added the project.
14
+ Please be as clear and concise as possible.
15
+ -->
16
+
17
+ ## Solution
18
+
19
+ <!--
20
+ Describe what a possible solution would look and/or act like.
21
+ -->
22
+
23
+ ## Additional Context
24
+
25
+ <!--
26
+ Append any additional context regarding the request here.
27
+ Screenshots are always welcome!
28
+ -->
@@ -0,0 +1,29 @@
1
+ ## Checklist
2
+
3
+ <!--
4
+ Place an `x` in the boxes you have addressed. You can also fill these out after creating the Pull Request. If you're unsure about any of them, don't hesitate to ask. This is simply a reminder of what we are going to look for before merging your code.
5
+ -->
6
+
7
+ - [ ] I have read the [CONTRIBUTING.md](../CONTRIBUTING.md) document
8
+ - [ ] I formatted my changes with [black](https://github.com/psf/black)
9
+ - [ ] I linted my changes with [flake8](https://github.com/PyCQA/flake8)
10
+ - [ ] I have added documentation regarding my changes where necessary
11
+ - [ ] Any pre-existing tests continue to pass
12
+ - [ ] Additional tests were made covering my changes
13
+
14
+ ## Types of Changes
15
+
16
+ <!--
17
+ Place an `x` in the box that applies.
18
+ -->
19
+
20
+ - [ ] Bugfix (change that fixes an issue)
21
+ - [ ] New Feature (change that adds functionality)
22
+ - [ ] Documentation Update (if none of the other choices apply)
23
+
24
+ ## Proposed Changes
25
+
26
+ <!--
27
+ Describe the big picture of your changes here to communicate to why this pull request has been made and should be accepted.
28
+ If it fixes a bug or resolves a feature request, please be sure to link to that issue.
29
+ -->
@@ -0,0 +1,48 @@
1
+ name: PyPi Release
2
+
3
+ on:
4
+ release:
5
+ types: [created]
6
+
7
+ jobs:
8
+
9
+ build-and-publish:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Checkout code
14
+ uses: actions/checkout@v4
15
+ with:
16
+ fetch-depth: 0
17
+
18
+ - name: Setup Python
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.x"
22
+
23
+ - name: Install dependencies
24
+ run: |
25
+ python -m pip install --upgrade pip
26
+ python -m pip install --upgrade build setuptools wheel twine
27
+
28
+ - name: Build wheel
29
+ run: |
30
+ python -m build --wheel --sdist
31
+
32
+ # Upload the built pip packages so we can inspect them
33
+ - name: Upload packages.
34
+ uses: actions/upload-artifact@v4
35
+ with:
36
+ name: pip-packages
37
+ path: |
38
+ dist/preditor-*.whl
39
+ dist/preditor-*.tar.gz
40
+ # This is only used if there is a problem with the next step
41
+ retention-days: 1
42
+
43
+ - name: Publish to PyPI
44
+ env:
45
+ TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
46
+ TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
47
+ run: |
48
+ twine upload --verbose dist/*
@@ -0,0 +1,185 @@
1
+ name: Static Analysis & Test
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+
7
+ static-analysis:
8
+ # We want to run on external PRs, but not on our own internal PRs as they'll
9
+ # be run by the push to the branch. Without this if check, checks are
10
+ # duplicated since internal PRs match both the push and pull_request events.
11
+ # https://github.com/psf/black/blob/f51e53726b39a177355a7917c91c56f390dda7ef/.github/workflows/lint.yml#L7-L12
12
+ if:
13
+ github.event_name == 'push' ||
14
+ github.event.pull_request.head.repo.full_name != github.repository
15
+
16
+ runs-on: ubuntu-latest
17
+
18
+ steps:
19
+ - name: Checkout code
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Setup Python
23
+ uses: actions/setup-python@v5
24
+ with:
25
+ python-version: "3.11"
26
+
27
+ - name: Install dependencies
28
+ run: |
29
+ python -m pip install --upgrade pip
30
+ python -m pip install tox coverage[toml]
31
+
32
+ - name: Lint with flake8
33
+ run: tox -e flake8
34
+
35
+ - name: Format with black
36
+ run: tox -e black
37
+
38
+
39
+ test:
40
+ # We want to run on external PRs, but not on our own internal PRs as they'll
41
+ # be run by the push to the branch. Without this if check, checks are
42
+ # duplicated since internal PRs match both the push and pull_request events.
43
+ if:
44
+ github.event_name == 'push' ||
45
+ github.event.pull_request.head.repo.full_name != github.repository
46
+
47
+ strategy:
48
+ matrix:
49
+ os: ['ubuntu-latest', 'windows-latest']
50
+ python: ['3.8', '3.9', '3.10', '3.11']
51
+ # Works around the depreciation of python 3.7 for ubuntu
52
+ # https://github.com/actions/setup-python/issues/544
53
+ include:
54
+ - os: 'ubuntu-22.04'
55
+ python: '3.7'
56
+
57
+ runs-on: ${{ matrix.os }}
58
+
59
+ steps:
60
+ - name: Checkout code
61
+ uses: actions/checkout@v4
62
+
63
+ - name: Setup Python
64
+ uses: actions/setup-python@v5
65
+ with:
66
+ python-version: ${{ matrix.python }}
67
+
68
+ - name: Install dependencies
69
+ run: |
70
+ python -m pip install --upgrade pip
71
+ python -m pip install tox
72
+
73
+ - name: Run Tox
74
+ run: |
75
+ tox -e begin,py -- --tb short
76
+
77
+ - name: Upload coverage
78
+ uses: actions/upload-artifact@v4
79
+ with:
80
+ name: coverage-${{ matrix.os }}-${{ matrix.python }}
81
+ path: .coverage/*
82
+ include-hidden-files: true
83
+ retention-days: 1
84
+
85
+ coverage:
86
+ # We want to run on external PRs, but not on our own internal PRs as they'll
87
+ # be run by the push to the branch. Without this if check, checks are
88
+ # duplicated since internal PRs match both the push and pull_request events.
89
+ if:
90
+ github.event_name == 'push' ||
91
+ github.event.pull_request.head.repo.full_name != github.repository
92
+
93
+ needs: test
94
+
95
+ runs-on: ubuntu-latest
96
+ steps:
97
+ - name: Checkout code
98
+ uses: actions/checkout@v4
99
+
100
+ - name: Setup Python
101
+ uses: actions/setup-python@v5
102
+ with:
103
+ python-version: "3.x"
104
+
105
+ - name: Install dependencies
106
+ run: |
107
+ python -m pip install --upgrade pip
108
+ python -m pip install tox coverage[toml]
109
+
110
+ # Ensure version.py is created so coverage can read it's source
111
+ - name: Run begin
112
+ run: |
113
+ tox -e begin
114
+
115
+ - name: Download coverage artifacts
116
+ uses: actions/download-artifact@v4
117
+ with:
118
+ path: .coverage/
119
+ pattern: coverage-*
120
+ merge-multiple: true
121
+
122
+ # Tox runs `coverage combine` and `coverage xml`
123
+ - name: Combine coverage and report
124
+ run: |
125
+ tox -e end
126
+
127
+ # Report and write to summary.
128
+ python -m coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
129
+
130
+ # Write html coverage report to upload as an artifact
131
+ python -m coverage html
132
+
133
+ # # Report again and fail if under 100%.
134
+ # python -m coverage report --fail-under=100
135
+
136
+ - name: Upload HTML report if check failed.
137
+ uses: actions/upload-artifact@v4
138
+ with:
139
+ name: html-report
140
+ path: htmlcov
141
+ # # TODO: If we get 100% coverage we can re-enable this and the
142
+ # # `--fail-under` check so pull requests fail if the dev doesn't
143
+ # # add tests for new code.
144
+ # if: ${{ failure() }}
145
+
146
+
147
+ pip-package:
148
+ # We want to run on external PRs, but not on our own internal PRs as they'll
149
+ # be run by the push to the branch. Without this if check, checks are
150
+ # duplicated since internal PRs match both the push and pull_request events.
151
+ if:
152
+ github.event_name == 'push' ||
153
+ github.event.pull_request.head.repo.full_name != github.repository
154
+
155
+ # Build and upload pip packages as artifacts so we can inspect them and
156
+ # ensure they are correct for actual release
157
+ runs-on: ubuntu-latest
158
+
159
+ steps:
160
+ - name: Checkout code
161
+ uses: actions/checkout@v4
162
+ with:
163
+ fetch-depth: 0
164
+
165
+ - name: Setup Python
166
+ uses: actions/setup-python@v5
167
+ with:
168
+ python-version: "3.x"
169
+
170
+ - name: Install dependencies
171
+ run: |
172
+ python -m pip install --upgrade pip
173
+ python -m pip install --upgrade build setuptools wheel twine
174
+
175
+ - name: Build wheel
176
+ run: |
177
+ python -m build --wheel --sdist
178
+
179
+ - name: Upload packages.
180
+ uses: actions/upload-artifact@v4
181
+ with:
182
+ name: pip-packages
183
+ path: |
184
+ dist/preditor-*.whl
185
+ dist/preditor-*.tar.gz
@@ -0,0 +1,35 @@
1
+ *.pyc
2
+ *.pyo
3
+ *.rej
4
+ *.swp
5
+ .DS_Store
6
+
7
+ /.project
8
+ /.pydevproject
9
+ *.egg-info
10
+ .eggs/
11
+ /build/
12
+ /dist/
13
+ /venv/
14
+ *.sublime-*
15
+ pip-wheel-metadata
16
+
17
+ # Ignore the majority of the docs folder
18
+ /docs/*
19
+ !/docs/
20
+ /docs/source/*
21
+ !/docs/source/
22
+ !/docs/source/conf.py
23
+ !/docs/source/index.rst
24
+
25
+ # Used by the ci
26
+ .cache/
27
+ downloads/
28
+ shared-venv/
29
+ .tox/
30
+
31
+ # /preditor
32
+ /preditor/version.py
33
+
34
+ # Coverage
35
+ .coverage
@@ -0,0 +1,39 @@
1
+ ---
2
+ ci:
3
+ autoupdate_schedule: quarterly
4
+ skip: [black, flake8]
5
+
6
+ repos:
7
+
8
+ - repo: https://github.com/psf/black
9
+ rev: 22.12.0
10
+ hooks:
11
+ - id: black
12
+
13
+ - repo: https://github.com/PyCQA/flake8
14
+ rev: 5.0.4
15
+ hooks:
16
+ - id: flake8
17
+ additional_dependencies:
18
+ - flake8-bugbear==22.12.6
19
+ - Flake8-pyproject
20
+ - pep8-naming==0.13.3
21
+
22
+ - repo: https://github.com/pre-commit/pre-commit-hooks
23
+ rev: v4.4.0
24
+ hooks:
25
+ - id: check-json
26
+ - id: check-toml
27
+ - id: check-xml
28
+ - id: check-yaml
29
+ - id: debug-statements
30
+ - id: end-of-file-fixer
31
+ - id: requirements-txt-fixer
32
+ - id: trailing-whitespace
33
+ exclude: ^(tests/find_files/)
34
+
35
+ - repo: https://github.com/pycqa/isort
36
+ rev: 5.12.0
37
+ hooks:
38
+ - id: isort
39
+ name: isort (python)
@@ -0,0 +1,44 @@
1
+ # Code of Conduct
2
+
3
+ Those who participate and/or contribute to projects maintained by Blur Studio are expected to treat one another with respect.
4
+
5
+ ## Our Pledge
6
+
7
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to creating a positive environment include:
12
+
13
+ * Using welcoming and inclusive language
14
+ * Being respectful of differing viewpoints and experiences
15
+ * Gracefully accepting constructive criticism
16
+ * Focusing on what is best for the community
17
+ * Showing empathy towards other community members
18
+
19
+ Examples of unacceptable behavior by participants include:
20
+
21
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
22
+ * Trolling, insulting/derogatory comments, and personal or political attacks
23
+ * Public or private harassment
24
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
25
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
26
+
27
+ ## Our Responsibilities
28
+
29
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
30
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
31
+
32
+ ## Scope
33
+
34
+ This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
35
+
36
+ ## Enforcement
37
+
38
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the open source team at opensource@blur.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
39
+
40
+ Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
41
+
42
+ ## Attribution
43
+
44
+ This Code of Conduct is adapted from [Contributor Covenant](https://www.contributor-covenant.org).
@@ -0,0 +1,78 @@
1
+ # Contributing to Blur Projects
2
+
3
+ We at Blur are excited to contribute to the Visual Effects community by open sourcing our internal projects. We welcome others to integrate these projects into their pipelines and contribute to them as they deem fit via bug reports, feature suggestions, and pull requests.
4
+
5
+ <!-- MarkdownTOC -->
6
+
7
+ - [Code of Conduct](#code-of-conduct)
8
+ - [How to Contribute](#how-to-contribute)
9
+ - [Reporting Issues / Bugs](#reporting-issues--bugs)
10
+ - [Suggesting a Feature](#suggesting-a-feature)
11
+ - [Submitting a Pull Request](#submitting-a-pull-request)
12
+ - [Coding Style & Formatting](#coding-style--formatting)
13
+ - [Creating a Release](#creating-a-release)
14
+
15
+ <!-- /MarkdownTOC -->
16
+
17
+ ## Code of Conduct
18
+
19
+ Before contributing we recommend checking out our _[code of conduct]_. Thanks! :smile:
20
+
21
+ ## How to Contribute
22
+
23
+ ### Reporting Issues / Bugs
24
+
25
+ - Double check that the bug has not already been reported by searching the project's GitHub [Issues].
26
+ - If an issue already exists, you're welcome to add additional context that may not already be present in the original message via the comments.
27
+ - Once you have verified no pre-existing bug report exists, [create a new issue].
28
+ - Provide a title and concise description.
29
+ - Include as much detailed information regarding the problem as possible.
30
+ - Supply reproducible steps that demonstrate the behavior.
31
+
32
+ ### Suggesting a Feature
33
+
34
+ - Double check that a similar request has not already been made by searching the project's GitHub [Issues].
35
+ - If no issue exists pertaining to your feature request, [create a new issue].
36
+ - Provide a title and concise description.
37
+ - Describe what functionality is missing and why it would be useful for yourself and others.
38
+ - If relevant, include any screenshots, animated GIFs, or sketches that might further demonstrate the desired feature.
39
+
40
+ ### Submitting a Pull Request
41
+
42
+ 1. Fork the Project
43
+ 2. Create your Branch (`git checkout -b my-amazing-feature`)
44
+ 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
45
+ - Be sure to follow our coding style and formatting conventions (below).
46
+ 4. Push to the Branch (`git push origin my-amazing-feature`)
47
+ 5. Open a Pull Request
48
+ - List what you've done.
49
+ - Link to any related or addressed issues or feature requests.
50
+
51
+ ## Coding Style & Formatting
52
+
53
+ In order to streamline reviews and reduce the barrier-to-entry for developers, we've adopted several standardized tools and workflows to maintain a consistent and reliable code appearance.
54
+
55
+ A set of GitHub Action workflows are in place to perform the following style and formatting checks against every push to our project repositories. These checks must successfully pass before a pull request can be accepted.
56
+
57
+ **Styling**
58
+
59
+ Styling or linting is performed via [flake8] along with the plugins [flake8-bugbear], [Flake8-pyproject] & [pep8-naming]. A minor amount of configuration has been added to _[pyproject.toml]_ in order to provide better compatibility with our formatter black (see next section).
60
+
61
+ **Formatting**
62
+
63
+ Code formatting is completed by [black]. By relinquishing code appearance standards to Black we manage to greatly reduce semantic arguments/discussions that might distract from progress on a project.
64
+
65
+
66
+ ## Creating a Release
67
+
68
+ Releases are made manually by project managers and will automatically be uploaded to PyPI (via GitHib Action workflow) once completed.
69
+
70
+ [flake8]: https://github.com/PyCQA/flake8
71
+ [flake8-bugbear]: https://github.com/PyCQA/flake8-bugbear
72
+ [Flake8-pyproject]: https://github.com/john-hen/Flake8-pyproject
73
+ [pep8-naming]: https://github.com/PyCQA/pep8-naming
74
+ [pyproject.toml]: https://github.com/blurstudio/hab/blob/master/pyproject.toml
75
+ [black]: https://github.com/psf/black
76
+ [Issues]: https://github.com/blurstudio/preditor/issues
77
+ [create a new issue]: https://github.com/blurstudio/preditor/issues/new
78
+ [code of conduct]: https://github.com/blurstudio/preditor/blob/master/CODE_OF_CONDUCT.md