openfaba 0.1.2__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.
- openfaba-0.1.2/LICENSE +21 -0
- openfaba-0.1.2/PKG-INFO +231 -0
- openfaba-0.1.2/README.md +218 -0
- openfaba-0.1.2/pyproject.toml +120 -0
- openfaba-0.1.2/setup.cfg +4 -0
- openfaba-0.1.2/src/openfaba/__init__.py +6 -0
- openfaba-0.1.2/src/openfaba/cli.py +169 -0
- openfaba-0.1.2/src/openfaba/consts.py +152 -0
- openfaba-0.1.2/src/openfaba/io.py +94 -0
- openfaba-0.1.2/src/openfaba/main.py +9 -0
- openfaba-0.1.2/src/openfaba/media.py +196 -0
- openfaba-0.1.2/src/openfaba/py.typed +0 -0
- openfaba-0.1.2/src/openfaba/utils.py +18 -0
- openfaba-0.1.2/src/openfaba.egg-info/PKG-INFO +231 -0
- openfaba-0.1.2/src/openfaba.egg-info/SOURCES.txt +20 -0
- openfaba-0.1.2/src/openfaba.egg-info/dependency_links.txt +1 -0
- openfaba-0.1.2/src/openfaba.egg-info/entry_points.txt +2 -0
- openfaba-0.1.2/src/openfaba.egg-info/requires.txt +2 -0
- openfaba-0.1.2/src/openfaba.egg-info/top_level.txt +1 -0
- openfaba-0.1.2/tests/test_cli.py +493 -0
- openfaba-0.1.2/tests/test_main.py +7 -0
- openfaba-0.1.2/tests/test_media.py +93 -0
openfaba-0.1.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gustavo Viera López
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
openfaba-0.1.2/PKG-INFO
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: openfaba
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: A modern reimplementation of redele.
|
|
5
|
+
Author-email: Gustavo Viera López <gvieralopez@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.13
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: typer>=0.9.0
|
|
11
|
+
Requires-Dist: mutagen>=1.47.0
|
|
12
|
+
Dynamic: license-file
|
|
13
|
+
|
|
14
|
+
# openFABA
|
|
15
|
+
|
|
16
|
+
**openFABA** is a command-line tool for inspecting, extracting, and exporting audio
|
|
17
|
+
files for the **FABA** storytelling box. It allows you to convert standard MP3 files
|
|
18
|
+
into FABA-compatible files for specific figures.
|
|
19
|
+
|
|
20
|
+
This project builds upon the reverse-engineering work by
|
|
21
|
+
[wansors](https://github.com/wansors/myfaba-hacks/blob/main/python/redele.py).
|
|
22
|
+
At the moment, openFABA supports **only the original FABA device**.
|
|
23
|
+
|
|
24
|
+
### Disclaimer
|
|
25
|
+
|
|
26
|
+
openFABA is an independent project and is **not affiliated with or endorsed by FABA**.
|
|
27
|
+
|
|
28
|
+
This software is provided *as is*, without warranties of any kind. You are responsible
|
|
29
|
+
for how you use it and for any consequences that may arise, including device malfunction
|
|
30
|
+
or account-related actions. Some features may conflict with FABA’s terms of service or
|
|
31
|
+
usage policies.
|
|
32
|
+
|
|
33
|
+
The goal of openFABA is to:
|
|
34
|
+
|
|
35
|
+
* simplify the creation of custom, FABA-compatible figures
|
|
36
|
+
* enable personalization of figures you already own
|
|
37
|
+
|
|
38
|
+
We do **not** endorse music piracy, copyright infringement, or any misuse that could
|
|
39
|
+
negatively impact FABA or its ecosystem. FABA is a great company, and we encourage
|
|
40
|
+
supporting them by purchasing their products.
|
|
41
|
+
|
|
42
|
+
Use this tool responsibly and at your own risk.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## 🚀 Prerequisites
|
|
46
|
+
|
|
47
|
+
Before working with this project, make sure you have [uv](https://docs.astral.sh/uv/) installed. 👉 Install guide: [uv docs](https://docs.astral.sh/uv/getting-started/installation/)
|
|
48
|
+
|
|
49
|
+
If you are a developer and want to contribute to this project, you may want to have
|
|
50
|
+
[make](https://www.gnu.org/software/make/) installed as well.
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## ⚡ Installation
|
|
54
|
+
|
|
55
|
+
Install dependencies into a local virtual environment:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
uv sync --all-groups
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Then, to activate the virtual environment:
|
|
62
|
+
|
|
63
|
+
On Linux / macOS:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
source .venv/bin/activate
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
On Windows (PowerShell):
|
|
70
|
+
|
|
71
|
+
```powershell
|
|
72
|
+
.venv\Scripts\Activate.ps1
|
|
73
|
+
# If your PowerShell execution policy prevents running the script, run:
|
|
74
|
+
powershell -ExecutionPolicy Bypass -File .venv\Scripts\Activate.ps1
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
On Windows (CMD):
|
|
78
|
+
|
|
79
|
+
```cmd
|
|
80
|
+
.venv\Scripts\activate.bat
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## 🛠️ Usage
|
|
84
|
+
|
|
85
|
+
### Create your own figure
|
|
86
|
+
|
|
87
|
+
Create a new FABA figure from a folder containing MP3 files. The target figure must
|
|
88
|
+
not already exist in the FABA library, otherwise the command will fail to avoid
|
|
89
|
+
accidental overwrites.
|
|
90
|
+
|
|
91
|
+
For example, to create a new FABA figure with ID `4742` using the songs in `/home/user/songs`
|
|
92
|
+
and copy it to the FABA box mounted at `/mnt/faba/MKI01`, run:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
openfaba insert \
|
|
96
|
+
--figure-id 4742 \
|
|
97
|
+
--source /home/user/songs \
|
|
98
|
+
--faba-library /mnt/faba/MKI01
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Write an NFC TAG with the figure ID and enjoy it! If you need help on how todo it,
|
|
102
|
+
[these FAQs](https://github.com/wansors/myfaba-hacks/blob/main/FAQ.md) from the original
|
|
103
|
+
wansors' project have a lot of useful information.
|
|
104
|
+
|
|
105
|
+
### Add songs to an existing figure
|
|
106
|
+
|
|
107
|
+
Append additional MP3 files to an already existing figure. New tracks are added after the
|
|
108
|
+
existing ones and never overwrite previously stored audio.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
openfaba extend \
|
|
112
|
+
--figure-id 4742 \
|
|
113
|
+
--source /home/user/new_songs \
|
|
114
|
+
--faba-library /mnt/faba/MKI01
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
### Replace a figure
|
|
119
|
+
|
|
120
|
+
Delete an existing figure and recreate it from scratch using a new set of MP3 files. This
|
|
121
|
+
operation removes the previous contents of the figure.
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
openfaba replace \
|
|
125
|
+
--figure-id 4742 \
|
|
126
|
+
--source /home/user/songs \
|
|
127
|
+
--faba-library /mnt/faba/MKI01
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
### Listen to some FABA songs on your computer
|
|
132
|
+
|
|
133
|
+
Extract (deobfuscate) a single figure from a FABA box and convert it back to standard MP3
|
|
134
|
+
files so they can be played on a computer or mobile device.
|
|
135
|
+
|
|
136
|
+
For example, to extract the Italian red elephant **Ele** (figure ID `0010`):
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
openfaba extract \
|
|
140
|
+
--figure-id 0010 \
|
|
141
|
+
--faba-library /mnt/faba/MKI01 \
|
|
142
|
+
--output /home/user/elephant_ele
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
### Obfuscate an entire MP3 library
|
|
147
|
+
|
|
148
|
+
Convert a directory tree of MP3 files into a FABA-compatible MKI library. Subfolders named
|
|
149
|
+
`K####` are interpreted as figure IDs; otherwise a default figure ID is used.
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
openfaba obfuscate \
|
|
153
|
+
--mp3-library /home/user/mp3_library \
|
|
154
|
+
--faba-library /mnt/faba/MKI01
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
### Deobfuscate an entire FABA library
|
|
159
|
+
|
|
160
|
+
Convert all figures from a FABA MKI library back into MP3 files, preserving the original
|
|
161
|
+
folder structure.
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
openfaba deobfuscate \
|
|
165
|
+
--faba-library /mnt/faba/MKI01 \
|
|
166
|
+
--mp3-library /home/user/output_mp3
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## 🪙 Resources used to create this project
|
|
170
|
+
|
|
171
|
+
- [myfaba-hacks GitHub repository](https://github.com/wansors/myfaba-hacks)
|
|
172
|
+
- [Hacking MyFaba Medium Article](https://medium.com/@wansors/hacking-myfaba-an-educational-journey-into-storytelling-box-customization-cc6fc5db719d)
|
|
173
|
+
- [Myfaba Store](https://www.myfaba.it/prodotti-sonori/acquista-per-tipologia/personaggi-sonori/)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
## 📦 Tools for Developers
|
|
177
|
+
|
|
178
|
+
Common development tasks are wrapped in the `Makefile` for convenience.
|
|
179
|
+
|
|
180
|
+
### Linting, Formatting, and Type Checking
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
make qa
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Runs **Ruff** for linting and formatting, and **Mypy** for type checking.
|
|
187
|
+
|
|
188
|
+
### Running Unit Tests
|
|
189
|
+
|
|
190
|
+
Before running tests, override any required environment variables in the `.env.test` file.
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
make test
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Executes the test suite using **Pytest**.
|
|
197
|
+
|
|
198
|
+
### Building the Project
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
make build
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Generates a distribution package inside the `dist/` directory.
|
|
205
|
+
|
|
206
|
+
### Cleaning Up
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
make clean
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Removes build artifacts, caches, and temporary files to keep your project directory clean.
|
|
213
|
+
|
|
214
|
+
### Updating project version
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
make version
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Interactively prompts you to select the type of version update to apply (major, minor, patch, tag)
|
|
221
|
+
and automatically updates the project version accordingly.
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
## 🤝 Contributing
|
|
225
|
+
|
|
226
|
+
Contributions are welcome!
|
|
227
|
+
Please ensure all QA checks and tests pass before opening a pull request.
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
<sub>🚀 Project starter provided by [Cookie Pyrate](https://github.com/gvieralopez/cookie-pyrate)</sub>
|
openfaba-0.1.2/README.md
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# openFABA
|
|
2
|
+
|
|
3
|
+
**openFABA** is a command-line tool for inspecting, extracting, and exporting audio
|
|
4
|
+
files for the **FABA** storytelling box. It allows you to convert standard MP3 files
|
|
5
|
+
into FABA-compatible files for specific figures.
|
|
6
|
+
|
|
7
|
+
This project builds upon the reverse-engineering work by
|
|
8
|
+
[wansors](https://github.com/wansors/myfaba-hacks/blob/main/python/redele.py).
|
|
9
|
+
At the moment, openFABA supports **only the original FABA device**.
|
|
10
|
+
|
|
11
|
+
### Disclaimer
|
|
12
|
+
|
|
13
|
+
openFABA is an independent project and is **not affiliated with or endorsed by FABA**.
|
|
14
|
+
|
|
15
|
+
This software is provided *as is*, without warranties of any kind. You are responsible
|
|
16
|
+
for how you use it and for any consequences that may arise, including device malfunction
|
|
17
|
+
or account-related actions. Some features may conflict with FABA’s terms of service or
|
|
18
|
+
usage policies.
|
|
19
|
+
|
|
20
|
+
The goal of openFABA is to:
|
|
21
|
+
|
|
22
|
+
* simplify the creation of custom, FABA-compatible figures
|
|
23
|
+
* enable personalization of figures you already own
|
|
24
|
+
|
|
25
|
+
We do **not** endorse music piracy, copyright infringement, or any misuse that could
|
|
26
|
+
negatively impact FABA or its ecosystem. FABA is a great company, and we encourage
|
|
27
|
+
supporting them by purchasing their products.
|
|
28
|
+
|
|
29
|
+
Use this tool responsibly and at your own risk.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## 🚀 Prerequisites
|
|
33
|
+
|
|
34
|
+
Before working with this project, make sure you have [uv](https://docs.astral.sh/uv/) installed. 👉 Install guide: [uv docs](https://docs.astral.sh/uv/getting-started/installation/)
|
|
35
|
+
|
|
36
|
+
If you are a developer and want to contribute to this project, you may want to have
|
|
37
|
+
[make](https://www.gnu.org/software/make/) installed as well.
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## ⚡ Installation
|
|
41
|
+
|
|
42
|
+
Install dependencies into a local virtual environment:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
uv sync --all-groups
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Then, to activate the virtual environment:
|
|
49
|
+
|
|
50
|
+
On Linux / macOS:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
source .venv/bin/activate
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
On Windows (PowerShell):
|
|
57
|
+
|
|
58
|
+
```powershell
|
|
59
|
+
.venv\Scripts\Activate.ps1
|
|
60
|
+
# If your PowerShell execution policy prevents running the script, run:
|
|
61
|
+
powershell -ExecutionPolicy Bypass -File .venv\Scripts\Activate.ps1
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
On Windows (CMD):
|
|
65
|
+
|
|
66
|
+
```cmd
|
|
67
|
+
.venv\Scripts\activate.bat
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## 🛠️ Usage
|
|
71
|
+
|
|
72
|
+
### Create your own figure
|
|
73
|
+
|
|
74
|
+
Create a new FABA figure from a folder containing MP3 files. The target figure must
|
|
75
|
+
not already exist in the FABA library, otherwise the command will fail to avoid
|
|
76
|
+
accidental overwrites.
|
|
77
|
+
|
|
78
|
+
For example, to create a new FABA figure with ID `4742` using the songs in `/home/user/songs`
|
|
79
|
+
and copy it to the FABA box mounted at `/mnt/faba/MKI01`, run:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
openfaba insert \
|
|
83
|
+
--figure-id 4742 \
|
|
84
|
+
--source /home/user/songs \
|
|
85
|
+
--faba-library /mnt/faba/MKI01
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Write an NFC TAG with the figure ID and enjoy it! If you need help on how todo it,
|
|
89
|
+
[these FAQs](https://github.com/wansors/myfaba-hacks/blob/main/FAQ.md) from the original
|
|
90
|
+
wansors' project have a lot of useful information.
|
|
91
|
+
|
|
92
|
+
### Add songs to an existing figure
|
|
93
|
+
|
|
94
|
+
Append additional MP3 files to an already existing figure. New tracks are added after the
|
|
95
|
+
existing ones and never overwrite previously stored audio.
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
openfaba extend \
|
|
99
|
+
--figure-id 4742 \
|
|
100
|
+
--source /home/user/new_songs \
|
|
101
|
+
--faba-library /mnt/faba/MKI01
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### Replace a figure
|
|
106
|
+
|
|
107
|
+
Delete an existing figure and recreate it from scratch using a new set of MP3 files. This
|
|
108
|
+
operation removes the previous contents of the figure.
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
openfaba replace \
|
|
112
|
+
--figure-id 4742 \
|
|
113
|
+
--source /home/user/songs \
|
|
114
|
+
--faba-library /mnt/faba/MKI01
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
### Listen to some FABA songs on your computer
|
|
119
|
+
|
|
120
|
+
Extract (deobfuscate) a single figure from a FABA box and convert it back to standard MP3
|
|
121
|
+
files so they can be played on a computer or mobile device.
|
|
122
|
+
|
|
123
|
+
For example, to extract the Italian red elephant **Ele** (figure ID `0010`):
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
openfaba extract \
|
|
127
|
+
--figure-id 0010 \
|
|
128
|
+
--faba-library /mnt/faba/MKI01 \
|
|
129
|
+
--output /home/user/elephant_ele
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
### Obfuscate an entire MP3 library
|
|
134
|
+
|
|
135
|
+
Convert a directory tree of MP3 files into a FABA-compatible MKI library. Subfolders named
|
|
136
|
+
`K####` are interpreted as figure IDs; otherwise a default figure ID is used.
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
openfaba obfuscate \
|
|
140
|
+
--mp3-library /home/user/mp3_library \
|
|
141
|
+
--faba-library /mnt/faba/MKI01
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
### Deobfuscate an entire FABA library
|
|
146
|
+
|
|
147
|
+
Convert all figures from a FABA MKI library back into MP3 files, preserving the original
|
|
148
|
+
folder structure.
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
openfaba deobfuscate \
|
|
152
|
+
--faba-library /mnt/faba/MKI01 \
|
|
153
|
+
--mp3-library /home/user/output_mp3
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## 🪙 Resources used to create this project
|
|
157
|
+
|
|
158
|
+
- [myfaba-hacks GitHub repository](https://github.com/wansors/myfaba-hacks)
|
|
159
|
+
- [Hacking MyFaba Medium Article](https://medium.com/@wansors/hacking-myfaba-an-educational-journey-into-storytelling-box-customization-cc6fc5db719d)
|
|
160
|
+
- [Myfaba Store](https://www.myfaba.it/prodotti-sonori/acquista-per-tipologia/personaggi-sonori/)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
## 📦 Tools for Developers
|
|
164
|
+
|
|
165
|
+
Common development tasks are wrapped in the `Makefile` for convenience.
|
|
166
|
+
|
|
167
|
+
### Linting, Formatting, and Type Checking
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
make qa
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Runs **Ruff** for linting and formatting, and **Mypy** for type checking.
|
|
174
|
+
|
|
175
|
+
### Running Unit Tests
|
|
176
|
+
|
|
177
|
+
Before running tests, override any required environment variables in the `.env.test` file.
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
make test
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Executes the test suite using **Pytest**.
|
|
184
|
+
|
|
185
|
+
### Building the Project
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
make build
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Generates a distribution package inside the `dist/` directory.
|
|
192
|
+
|
|
193
|
+
### Cleaning Up
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
make clean
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Removes build artifacts, caches, and temporary files to keep your project directory clean.
|
|
200
|
+
|
|
201
|
+
### Updating project version
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
make version
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Interactively prompts you to select the type of version update to apply (major, minor, patch, tag)
|
|
208
|
+
and automatically updates the project version accordingly.
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
## 🤝 Contributing
|
|
212
|
+
|
|
213
|
+
Contributions are welcome!
|
|
214
|
+
Please ensure all QA checks and tests pass before opening a pull request.
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
<sub>🚀 Project starter provided by [Cookie Pyrate](https://github.com/gvieralopez/cookie-pyrate)</sub>
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "openfaba"
|
|
3
|
+
version = "0.1.2"
|
|
4
|
+
description = "A modern reimplementation of redele."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">= 3.13"
|
|
7
|
+
authors = [
|
|
8
|
+
{ name = "Gustavo Viera López", email = "gvieralopez@gmail.com" },
|
|
9
|
+
]
|
|
10
|
+
license = { text = "MIT" }
|
|
11
|
+
|
|
12
|
+
dependencies = [
|
|
13
|
+
"typer>=0.9.0",
|
|
14
|
+
"mutagen>=1.47.0",
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
[dependency-groups]
|
|
18
|
+
dev = [
|
|
19
|
+
"bumpver",
|
|
20
|
+
"mypy",
|
|
21
|
+
"pytest",
|
|
22
|
+
"pytest-cov",
|
|
23
|
+
"pytest-dotenv",
|
|
24
|
+
"pytest-mock",
|
|
25
|
+
"ruff",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
build = ["build"]
|
|
29
|
+
|
|
30
|
+
[build-system]
|
|
31
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
32
|
+
build-backend = "setuptools.build_meta"
|
|
33
|
+
|
|
34
|
+
[tool.setuptools]
|
|
35
|
+
package-dir = { "" = "src" }
|
|
36
|
+
|
|
37
|
+
[project.scripts]
|
|
38
|
+
openfaba = "openfaba.main:main"
|
|
39
|
+
|
|
40
|
+
[tool.ruff]
|
|
41
|
+
line-length = 100
|
|
42
|
+
indent-width = 4
|
|
43
|
+
target-version = "py313"
|
|
44
|
+
|
|
45
|
+
[tool.ruff.format]
|
|
46
|
+
quote-style = "double"
|
|
47
|
+
indent-style = "space"
|
|
48
|
+
skip-magic-trailing-comma = false
|
|
49
|
+
docstring-code-format = true
|
|
50
|
+
docstring-code-line-length = "dynamic"
|
|
51
|
+
|
|
52
|
+
[tool.ruff.lint]
|
|
53
|
+
select = [
|
|
54
|
+
"A", # flake8-builtins: Check variables shadowing
|
|
55
|
+
"B", # flake8-bugbear: Finds likely bugs and design problems
|
|
56
|
+
"C", # McCabe: Complexity checker to ensure maintainable code
|
|
57
|
+
"DJ", # flake8-django: Checks on Django code
|
|
58
|
+
"E4", # Pycodestyle: Line length, indentation, etc.
|
|
59
|
+
"E7", # Pycodestyle: Miscellaneous checks
|
|
60
|
+
"E9", # Pycodestyle: Syntax errors
|
|
61
|
+
"F", # Pyflakes: Unused imports, undefined variables, etc.
|
|
62
|
+
"FIX", # Avoid lines containing TODO tags
|
|
63
|
+
"G", # flake8-logging-format: Ensure logging messages follow best practices.
|
|
64
|
+
"I", # Isort: Import sorting
|
|
65
|
+
"LOG", # flake8-logging: Use the logging module correctly
|
|
66
|
+
"N", # pep8-naming: Enforce naming conventions
|
|
67
|
+
"PGH004", # Enforce specify the rule to avoid on noqa tags
|
|
68
|
+
"PTH", # flake8-use-pathlib: Enforces pathlib usage
|
|
69
|
+
"RUF", # Ruff-specific rules: Mostly for handling noqa tags and general stuff
|
|
70
|
+
"S", # flake8-bandit: Identifies common security issues in code
|
|
71
|
+
"T20", # flake8-print: Avoids print in the code
|
|
72
|
+
]
|
|
73
|
+
ignore = [
|
|
74
|
+
"S101", # Use of assert function
|
|
75
|
+
"G004", # F-strings on logging
|
|
76
|
+
"B008", # Typer Options
|
|
77
|
+
"C901"
|
|
78
|
+
]
|
|
79
|
+
fixable = ["ALL"]
|
|
80
|
+
unfixable = []
|
|
81
|
+
|
|
82
|
+
[tool.ruff.lint.per-file-ignores]
|
|
83
|
+
"scripts/**" = ["T20"] # Allow print statements on the scripts
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
[tool.mypy]
|
|
87
|
+
python_version = "3.13"
|
|
88
|
+
files = ["src", "scripts", "tests"]
|
|
89
|
+
warn_unused_configs = true
|
|
90
|
+
warn_redundant_casts = true
|
|
91
|
+
warn_unused_ignores = true
|
|
92
|
+
strict_equality = true
|
|
93
|
+
check_untyped_defs = true
|
|
94
|
+
disallow_subclassing_any = true
|
|
95
|
+
disallow_untyped_decorators = true
|
|
96
|
+
disallow_any_generics = true
|
|
97
|
+
disallow_untyped_calls = false
|
|
98
|
+
disallow_incomplete_defs = true
|
|
99
|
+
disallow_untyped_defs = true
|
|
100
|
+
no_implicit_reexport = true
|
|
101
|
+
warn_return_any = true
|
|
102
|
+
extra_checks = true
|
|
103
|
+
|
|
104
|
+
[tool.pytest.ini_options]
|
|
105
|
+
minversion = "6.0"
|
|
106
|
+
addopts = "-ra -q --cov=src --cov-report=term-missing --cov-fail-under=85"
|
|
107
|
+
python_files = "tests.py test_*.py *_test.py"
|
|
108
|
+
pythonpath = "./src"
|
|
109
|
+
env_override_existing_values = 1
|
|
110
|
+
env_files = [".env.test"]
|
|
111
|
+
|
|
112
|
+
[tool.bumpver]
|
|
113
|
+
current_version = "0.1.2"
|
|
114
|
+
version_pattern = "MAJOR.MINOR.PATCH[-TAGNUM]"
|
|
115
|
+
|
|
116
|
+
[tool.bumpver.file_patterns]
|
|
117
|
+
"pyproject.toml" = ['^version = "{version}"', '^current_version = "{version}"']
|
|
118
|
+
"src/openfaba/__init__.py" = [
|
|
119
|
+
'^__version__ = "{version}"$',
|
|
120
|
+
]
|
openfaba-0.1.2/setup.cfg
ADDED