Packaged autophotographer and added tests and test pipelines
This commit is contained in:
parent
74875553d5
commit
f35bd80767
9 changed files with 58 additions and 1 deletions
|
@ -9,4 +9,9 @@ pipeline:
|
|||
commands:
|
||||
- python3.8 -m pip install mypy
|
||||
- mypy src/
|
||||
+branches: dev
|
||||
isort:
|
||||
image: python:3.8
|
||||
commands:
|
||||
- python3.8 -m pip install isort
|
||||
- isort --diff src/
|
||||
branches: dev
|
8
.woodpecker/.test.yml
Normal file
8
.woodpecker/.test.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
pipeline:
|
||||
unit-tests:
|
||||
image: python:3.8
|
||||
commands:
|
||||
- python3.8 -m pip install -r ./requirements_dev.txt -r ./requirements.txt
|
||||
- python3.8 -m pip install -e .
|
||||
- pytest test/ -v
|
||||
branches: dev
|
3
pyproject.toml
Normal file
3
pyproject.toml
Normal file
|
@ -0,0 +1,3 @@
|
|||
[build-system]
|
||||
requires = ["setuptools >= 43.0.0", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
4
requirements_dev.txt
Normal file
4
requirements_dev.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
flake8==4.0.1
|
||||
pytest==7.1.2
|
||||
pytest-cov==3.0.0
|
||||
mypy==0.950
|
26
setup.cfg
Normal file
26
setup.cfg
Normal file
|
@ -0,0 +1,26 @@
|
|||
[metadata]
|
||||
name = autophotographer
|
||||
description = Select aesthetic frames from a video file
|
||||
long_description = README.md
|
||||
author = Oscar Pocock
|
||||
author_email = osp1@aber.ac.uk
|
||||
license = GPLv3+
|
||||
license_files = LICENSE.txt
|
||||
|
||||
[options]
|
||||
packages =
|
||||
autophotographer
|
||||
python_requires = >=3.8
|
||||
package_dir =
|
||||
=src
|
||||
zip_safe = no
|
||||
|
||||
[options.extras_require]
|
||||
testing =
|
||||
flake8>=4.0
|
||||
pytest>=7.1
|
||||
pytest-cov>=3.0
|
||||
mypy>=0.950
|
||||
|
||||
[flake8]
|
||||
max-line-length = 160
|
3
setup.py
Normal file
3
setup.py
Normal file
|
@ -0,0 +1,3 @@
|
|||
from setuptools import setup
|
||||
if __name__ == "__main__":
|
||||
setup()
|
2
test/pytest.ini
Normal file
2
test/pytest.ini
Normal file
|
@ -0,0 +1,2 @@
|
|||
[pytest]
|
||||
addopts = "--cov=autophotographer"
|
6
test/unit/test_autophotographer.py
Normal file
6
test/unit/test_autophotographer.py
Normal file
|
@ -0,0 +1,6 @@
|
|||
from autophotographer import autophotographer_main
|
||||
import pytest
|
||||
|
||||
def test_load_config_nonexistent_file():
|
||||
with pytest.raises(FileNotFoundError):
|
||||
autophotographer_main.load_config("blahblahblah")
|
0
test/unit/test_dataset.py
Normal file
0
test/unit/test_dataset.py
Normal file
Reference in a new issue