Skip to content

Commit 1a9320f

Browse files
authored
Merge pull request #13 from pedrolabonia/refactor_settings
Refactor Settings + Markers
2 parents 209292f + 54c15db commit 1a9320f

40 files changed

+2367
-596
lines changed

.flake8

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[flake8]
2-
extend-ignore = F403, E501, B950, E266
2+
extend-ignore = F403, E501, B950, E266, B902
33
max-line-length = 100
44
max-complexity = 18
55
select = B,C,E,F,W,T4,B9
6+
per-file-ignores=
7+
pydavinci/wrappers/settings/components.py:E303,E302, W293

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,5 @@ dmypy.json
134134

135135
test_build.ps1
136136
build_pypy.ps1
137+
138+
.ref/

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ repos:
3535
- repo: https://github.com/pre-commit/mirrors-mypy
3636
rev: v0.940 # Use the sha / tag you want to point at
3737
hooks:
38-
- id: mypy
38+
- id: mypy

docs/css/style.css

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ a.autorefs-internal {
171171
margin-right: 1em;
172172
}
173173

174-
.highlight.language-python span {
174+
/* .highlight.language-python span {
175175
position: relative;
176176
}
177177
@@ -183,7 +183,7 @@ a.autorefs-internal {
183183
.highlight.language-python span:nth-child(3) {
184184
color: var(--md-primary-fg-color--light) !important;
185185
font-weight: 600 !important;
186-
}
186+
} */
187187

188188
td code {
189189
padding: .2em .5em !important;
@@ -249,4 +249,30 @@ article p:nth-child(3) {
249249

250250
.md-typeset .task-list-indicator::before {
251251
background-color: var(--md-primary-fg-color--light);
252+
}
253+
254+
255+
.highlight.language-python span:nth-child(3),
256+
.highlight.language-python span:first-child:nth-last-child(3)~span {
257+
color: var(--md-primary-fg-color--light) !important;
258+
font-weight: 600 !important;
259+
}
260+
261+
h4.pydantic-field code.highlight.language-python {
262+
background: none;
263+
box-shadow: none;
264+
}
265+
266+
h5.validvalues {
267+
letter-spacing: 2px !important;
268+
font-size: 0.9em !important;
269+
}
270+
271+
h5.validvalues code {
272+
padding: 5px;
273+
padding-left: 0px;
274+
}
275+
276+
.manual-docstring {
277+
font-size: smaller;
252278
}

docs/marker.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
::: pydavinci.wrappers.marker.Marker

docs/markercollection.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
::: pydavinci.wrappers.marker.MarkerCollection
2+
members_order: source
3+
heading_level: 3
4+
show_root_toc_entry: false
5+
show_root_heading: false
6+
show_if_no_docstring: true
7+
show_object_full_path: true
8+
show_root_members_full_path: false
9+
group_by_category: false
10+
show_category_heading: false
11+
show_source: false
12+
merge_init_into_class: true
13+
separate_signature: false
14+
docstring_section_style: table
15+
show_signature_annotations: true

docs/mediapoolitem.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1+
<div class="doc doc-attribute">
2+
<h3 id="pydavinci.wrappers.timelineitem.MediaPoolItem.markers" class="doc doc-heading">
3+
<code class="highlight language-python">
4+
<span class="n">MediaPoolItem</span><span class="o">.</span><span class="n">markers</span></code>
5+
6+
<span class="doc doc-properties">
7+
<small class="doc doc-label doc-label-property"><code>property</code></small>
8+
</span>
9+
<div class="doc doc-contents">
10+
<div class="docstring">
11+
<p class="manual-docstring">Returns the <code><a href="../markercollection">Marker Collection</a></code> for this <code>MediaPoolItem</code>.</p>
12+
</div>
13+
</div>
14+
</h3>
15+
</div>
16+
117
::: pydavinci.wrappers.mediapoolitem.MediaPoolItem

docs/settings/index.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Project vs. Timeline Settings
2+
3+
By default, `Project` settings apply to all `Timeline`s in the project. To change that behavior, you need to use the method [`Timeline.custom_settings(True)`][pydavinci.wrappers.timeline.Timeline.custom_settings]. This will allow timeline settings to be independent from the project settings. You could then have a Project resolution of `1920x1080` for example and a Timeline resolution of `3840x2160`.
4+
5+
<figure markdown>
6+
![Settings Auto completion](../static/settings_autocomplete.gif)
7+
<figcaption>Auto-completion and error catching for settings in the IDE</figcaption>
8+
</figure>
9+
10+
11+
## Literals
12+
Whenever you see `Literal` on the type hints in the documentation, it means that the values listed need to be _literally_ as shown. These literals were gathered by testing which settings are valid on the interface.
13+
14+
!!! note
15+
Not all settings have been tested. For a fallback, you can still use the regular `get_setting()` and `set_settings()` methods on [`Project`][pydavinci.wrappers.project.Project.get_setting] and [`Timeline`][pydavinci.wrappers.timeline.Timeline.get_setting]
16+

docs/settings/project.md

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
## Base settings
2+
3+
::: pydavinci.wrappers.settings.components.ProjectUniqueSettings
4+
handler: python
5+
rendering:
6+
members_order: source
7+
heading_level: 3
8+
show_root_toc_entry: false
9+
show_root_heading: false
10+
show_if_no_docstring: true
11+
show_object_full_path: true
12+
show_root_members_full_path: false
13+
group_by_category: false
14+
show_category_heading: true
15+
show_source: false
16+
merge_init_into_class: true
17+
separate_signature: false
18+
docstring_section_style: table
19+
show_signature_annotations: true
20+
21+
::: pydavinci.wrappers.settings.components.CommonSettings
22+
handler: python
23+
rendering:
24+
members_order: source
25+
heading_level: 3
26+
show_root_toc_entry: false
27+
show_root_heading: false
28+
show_if_no_docstring: true
29+
show_object_full_path: true
30+
show_root_members_full_path: false
31+
group_by_category: false
32+
show_category_heading: false
33+
show_source: false
34+
merge_init_into_class: true
35+
separate_signature: false
36+
docstring_section_style: table
37+
show_signature_annotations: true
38+
39+
::: pydavinci.wrappers.settings.components.CommonMonitor
40+
handler: python
41+
rendering:
42+
members_order: source
43+
heading_level: 3
44+
show_root_toc_entry: false
45+
show_root_heading: false
46+
show_if_no_docstring: true
47+
show_object_full_path: true
48+
show_root_members_full_path: false
49+
group_by_category: false
50+
show_category_heading: false
51+
show_source: false
52+
merge_init_into_class: true
53+
separate_signature: false
54+
docstring_section_style: table
55+
show_signature_annotations: true
56+
57+
## Audio Settings
58+
59+
::: pydavinci.wrappers.settings.components.Audio
60+
handler: python
61+
rendering:
62+
members_order: source
63+
heading_level: 3
64+
show_root_toc_entry: false
65+
show_root_heading: false
66+
show_if_no_docstring: true
67+
show_object_full_path: true
68+
show_root_members_full_path: false
69+
group_by_category: false
70+
show_category_heading: false
71+
show_source: false
72+
merge_init_into_class: true
73+
separate_signature: false
74+
docstring_section_style: table
75+
show_signature_annotations: true
76+
77+
::: pydavinci.wrappers.settings.components.Color
78+
handler: python
79+
rendering:
80+
members_order: source
81+
heading_level: 3
82+
show_root_toc_entry: false
83+
show_root_heading: false
84+
show_if_no_docstring: true
85+
show_object_full_path: true
86+
show_root_members_full_path: false
87+
group_by_category: false
88+
show_category_heading: false
89+
show_source: false
90+
merge_init_into_class: true
91+
separate_signature: false
92+
docstring_section_style: table
93+
show_signature_annotations: true
94+
95+
## Performance Settings
96+
97+
::: pydavinci.wrappers.settings.components.Perf
98+
handler: python
99+
rendering:
100+
members_order: source
101+
heading_level: 3
102+
show_root_toc_entry: false
103+
show_root_heading: false
104+
show_if_no_docstring: true
105+
show_object_full_path: true
106+
show_root_members_full_path: false
107+
group_by_category: false
108+
show_category_heading: false
109+
show_source: false
110+
merge_init_into_class: true
111+
separate_signature: false
112+
docstring_section_style: table
113+
show_signature_annotations: true
114+
115+
## Video Deck settings
116+
117+
::: pydavinci.wrappers.settings.components.Deck
118+
handler: python
119+
rendering:
120+
members_order: source
121+
heading_level: 3
122+
show_root_toc_entry: false
123+
show_root_heading: false
124+
show_if_no_docstring: true
125+
show_object_full_path: true
126+
show_root_members_full_path: false
127+
group_by_category: false
128+
show_category_heading: false
129+
show_source: false
130+
merge_init_into_class: true
131+
separate_signature: false
132+
docstring_section_style: table
133+
show_signature_annotations: true
134+
135+
## Video Capture Settings
136+
137+
::: pydavinci.wrappers.settings.components.Capture
138+
handler: python
139+
rendering:
140+
members_order: source
141+
heading_level: 3
142+
show_root_toc_entry: false
143+
show_root_heading: false
144+
show_if_no_docstring: true
145+
show_object_full_path: true
146+
show_root_members_full_path: false
147+
group_by_category: false
148+
show_category_heading: false
149+
show_source: false
150+
merge_init_into_class: true
151+
separate_signature: false
152+
docstring_section_style: table
153+
show_signature_annotations: true
154+
155+
## Video Playout Settings
156+
157+
::: pydavinci.wrappers.settings.components.Playout
158+
handler: python
159+
rendering:
160+
members_order: source
161+
heading_level: 3
162+
show_root_toc_entry: false
163+
show_root_heading: false
164+
show_if_no_docstring: true
165+
show_object_full_path: true
166+
show_root_members_full_path: false
167+
group_by_category: false
168+
show_category_heading: false
169+
show_source: false
170+
merge_init_into_class: true
171+
separate_signature: false
172+
docstring_section_style: table
173+
show_signature_annotations: true
174+
175+
## Timeline Settings
176+
177+
::: pydavinci.wrappers.settings.components.TimelineMeta
178+
handler: python
179+
rendering:
180+
members_order: source
181+
heading_level: 3
182+
show_root_toc_entry: false
183+
show_root_heading: false
184+
show_if_no_docstring: true
185+
show_object_full_path: true
186+
show_root_members_full_path: false
187+
group_by_category: false
188+
show_category_heading: false
189+
show_source: false
190+
merge_init_into_class: true
191+
separate_signature: false
192+
docstring_section_style: table
193+
show_signature_annotations: true
194+
test: true
195+

docs/settings/timeline.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
::: pydavinci.wrappers.settings.components.TimelineUniqueSettings
3+
handler: python
4+
rendering:
5+
members_order: source
6+
heading_level: 3
7+
show_root_toc_entry: false
8+
show_root_heading: false
9+
show_if_no_docstring: true
10+
show_object_full_path: false
11+
show_root_members_full_path: false
12+
group_by_category: false
13+
show_category_heading: false
14+
show_source: true
15+
merge_init_into_class: true
16+
separate_signature: false
17+
docstring_section_style: table
18+
show_signature_annotations: true
19+
::: pydavinci.wrappers.settings.components.TimelineMeta
20+
handler: python
21+
rendering:
22+
members_order: source
23+
heading_level: 3
24+
show_root_toc_entry: false
25+
show_root_heading: false
26+
show_if_no_docstring: true
27+
show_object_full_path: false
28+
show_root_members_full_path: false
29+
group_by_category: false
30+
show_category_heading: false
31+
show_source: true
32+
merge_init_into_class: true
33+
separate_signature: false
34+
docstring_section_style: table
35+
show_signature_annotations: true
36+
::: pydavinci.wrappers.settings.components.CommonMonitor
37+
handler: python
38+
rendering:
39+
members_order: source
40+
heading_level: 3
41+
show_root_toc_entry: false
42+
show_root_heading: false
43+
show_if_no_docstring: true
44+
show_object_full_path: false
45+
show_root_members_full_path: false
46+
group_by_category: false
47+
show_category_heading: false
48+
show_source: true
49+
merge_init_into_class: true
50+
separate_signature: false
51+
docstring_section_style: table
52+
show_signature_annotations: true

0 commit comments

Comments
 (0)