Install them with either of the following commands:
pip install -r requirements.txt
OR
python -m pip install -r requirements.txt
If you instead want to keep your global python packages tidy, you can use the
pipenv
python package.
- Install
pipenv
with:
pip install pipenv
ORpython -m pip install pipenv
- Create a virtual environment and install the required packages to it:
pipenv update -d --pre
- Before running any of the programs, you'll have to enter the pipenv
environment like so:
pipenv shell
You can now run any of the commands directly as though you went through the setup as described in Normal Setup
Please look at the TODO.md file for the current status of the project and what tasks are left to be done.
The program uses the following libraries for general runtime:
defusedxml
for parsing XML files with security and safetytoml
for parsing thrtoml
configuration files that the programs useffmpy
for interacting with theFFmpeg
exectuablegooey
for handling the creation of a Graphical User Interface (GUI) to make running and using the programs easier for people who are not comnfortable with the command line.tqdm
for presenting the user with progress barsnumpy
andpandas
for creating and manipulating arrays of data.matplotlib
for generating the different graphs
The program uses the following libraries for development:
black
formatter libraryisort
library import sorter libraryflake8
styling and lint checkervermin
for detecting the minimum required version of the Python runtime required to run this projectpre-commit
for running checks on commits before they are pushedpyinstaller
for generating an executable file to more easily run the program (NOTE: this is a planned feature for the future!)
The best way to support this project is to look at the items in the TODO.md file and see what's left to be done. There are also projects on the GitHub page that you can take a look at to contribute to. You can even help on migrating the stuff in the TODO.md file into projects on GitHub.
When contributing Python code specifically, the pre-commit
library should
run these checks automatically when you try to push your commits.
- Fork the branch from this repository that you want to work on.
- Make your changes to the code.
- Test your changes.
- Commit the changes.
- Push the changes to your forked repository.
The pre-commit
program should automatically run the checks for the project.
If you want to run the pre-commit
check before pushing your code, you can do
do by following these instructions after step #4 mentioned above:
- Inside the command line, go to the project's directory.
- Run the
pre-commit
program manually to run the checks for you automatically:
pre-commit run -a
Alternatively, you can run the individual checks manually with the following:
black src/
isort src/
flake8
black
Formats the code withblack
as per the pyproject.toml file dictates in the[tool.black]
section.isort
Sorts the dependencies at the top of all the files. The style for this project's dependency import sorting is described in Formatting and Styling.flake8
Scans the files and identify and other styling, linting, or other general issues with the code. The rules used forflake8
are described in[flake8]
section in the setup.cfg file.
- The line limit is 120 characters. The normal 80 character limit is a bit too restricting.
- When defining or calling functions:
- If the function takes a singular argument, keep the definition on a
single line like so:
def foo(my_argument)
- If the function has multipel arguments, then split each argument onto it's own line like so:
def foo( first_arg, second_arg, ):
- If the function takes a singular argument, keep the definition on a
single line like so:
- Dependency imports should follow the following rules:
- Section 1: Importing entire built-in libraries. These should be imported at the very top of the individual program files.
- Section 2: Importing portions of built-in libraries.
- Section 3: Importing entire 3rd-party libraries.
- Section 4: Importing portions of 3rd-party libraries.
- Section 5: Importing entire libraries from this project.
- Section 6: Importing portions of libraries from this project.
- Each section should be separated by a single blank line.
- All imports for a section should be sorted alphabetically (this is
normally handled by the
isort
library). For section 2 and 4, if mutiple modules are being imported from a single library, the library that is being imported from should be sorted first, and then sorted by the imported module. For example:
# This is incorrect, as Path should come before PurePath from pathlib import PurePath, Path # This is the correct version from pathlib import Path, PurePath # This is also incorrect, as csv should come before pathlib from pathlib import Path from csv import reader # This is the correct version from csv import reader from pathlib import Path
flake8
should not report any issues. Ifflake8
does report issues, then the commit will not be accepted until the issues are fixed. These include unused imports, undefined functions/variables, declared but unused variables, etc.