Skip to content

Commit 4ded870

Browse files
authored
Merge pull request #28 from quaternionmedia/ruff
🐶 Ruff
2 parents 412143f + 4185ab5 commit 4ded870

8 files changed

Lines changed: 162 additions & 55 deletions

File tree

.flake8

Lines changed: 0 additions & 4 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ dist/
2828
build/
2929

3030
# pdm
31-
.pdm.toml
31+
.pdm-python

README.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,131 @@
55
# otto
66

77
an ottomatic video creator
8+
9+
## Install from pip
10+
11+
```bash
12+
pip install al-otto
13+
```
14+
15+
## Optional packages
16+
17+
Otto ships with several optional packages, which can be installed with `pip` or `pdm`
18+
19+
#### pip install
20+
21+
```bash
22+
pip install al-otto[test]
23+
```
24+
25+
#### local pip install
26+
27+
```bash
28+
pip install .[test]
29+
```
30+
31+
#### pdm
32+
33+
```bash
34+
pdm install -G test
35+
```
36+
37+
## Development
38+
39+
0. Install pdm
40+
41+
```bash
42+
pip install pdm
43+
```
44+
45+
1. Clone the repository
46+
47+
```bash
48+
git clone https://github.com/quaternionmedia/otto.git
49+
```
50+
51+
2. cd into the repo
52+
53+
```bash
54+
cd otto
55+
```
56+
57+
3. Install the development dependencies
58+
59+
```bash
60+
pdm install
61+
```
62+
63+
4. Create a local virtual environment
64+
65+
```bash
66+
pdm venv create
67+
```
68+
69+
5. Activate your local virtual environment
70+
71+
```bash
72+
eval $(pdm venv activate)
73+
```
74+
75+
Or...
76+
77+
```bash
78+
source .venv/bin/activate
79+
```
80+
81+
Deactivate your virtual environment by running `deactivate`
82+
83+
### `test`
84+
85+
Inlcudes pytest and other testing dependencies. Run with:
86+
87+
```bash
88+
pytest
89+
```
90+
91+
Can also be run with VSCode Python test extension, or VSCode debugger.
92+
93+
### `render`
94+
95+
Includes the python dependencies needed for rendering and effects.
96+
97+
**NOTE** Requires a working installation of [imagemagick](https://imagemagick.org/)
98+
99+
#### `docs`
100+
101+
Includes documentation building tool. Run with:
102+
103+
```bash
104+
mkdocs serve -a 0.0.0.0:9000
105+
```
106+
107+
Then visit [localhost:9000](http://localhost:9000/)
108+
109+
## nox
110+
111+
Running all tests and formatters can be done as a one-liner using `nox`
112+
113+
```bash
114+
pip install nox
115+
```
116+
117+
Then run:
118+
119+
```bash
120+
nox
121+
```
122+
123+
### Sessions
124+
125+
To run a single session, i.e. just the test suite, run:
126+
127+
```bash
128+
nox -s coverage
129+
```
130+
131+
See [noxfile.py](noxfile.py) for other commands.
132+
133+
## Credits
134+
135+
Created by [Quaternion Media, LLC](https://www.quaternion.media/)

otto/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from ._version import __version__
2+
3+
__all__ = ['__version__']

otto/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.2.1'
1+
__version__ = '0.2.2'

otto/preview.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ async def previewFrame(t: float, render: Render):
1212
"""# Preview frame
1313
Generates a frame of a given `edl` at time `t`, with `width` and `height`.
1414
15-
Returns the name of a file on this server when available, or a relevant error message
15+
Returns the name of a file on this server when available, or a relevant error
1616
"""
1717
print('previewing', render.edl, 'at frame', t)
1818
active_clips = [

pdm.lock

Lines changed: 28 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ docs = [
4545
dev = [
4646
"uvicorn >= 0.21.1",
4747
"black >= 23.1.0",
48-
"flake8 >= 6.0.0"
48+
"ruff >= 0.0.261"
4949
]
5050
nox = ["nox >= 2022.11.21"]
5151

0 commit comments

Comments
 (0)