-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtox.ini
113 lines (100 loc) · 2.94 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
[tox]
envlist = mypy,flake8,black,isort,coverage
[base]
setenv =
LOG_LEVEL = DEBUG
DEVELOPERS = 999
BOT_TOKEN = TEST_BOT_TOKEN
TELEGRAPH_TOKEN = TEST_TELEGRAPH_TOKEN
GENIUS_TOKEN = TEST_GENIUS_TOKEN
ANNOTATIONS_CHANNEL_HANDLE = TEST_HANDLE
SERVER_ADDRESS = TEST_SERVER
TELETHON_API_ID = TEST_API_ID
TELETHON_API_HASH = TEST_API_HASH
TELETHON_SESSION_STRING = 1aaaaa1aaaaaaaaaaa11aaa1aaaaaaaaaa1aaa11aaa1_aaaaaaaaaaaa1aaa1a1a1aaa-aaaaaaaaaaaaaaaaa1aaaaaaaaaa1aaa1a1aaa1aa_a1aaaaaaaaa1aaaaa1aa1a1aaaaa1aa-a1aaaa11aaaaaaa1aaa1aaaaaaaaaaaaaaaaaaaaaaaaa1a1aaaa1aaaaa1aaaa-a1a1a1aaaaa1aaaaaaa_aaaaaa1aaa1aaaaaaaaaa1a1a-aaa1aaaaaaaaaaaaaaaaaaaaaaaa1aaa11aaaaaaaa1aa1aaaa1-aa--aaa1aaaaaaaa11aaaaaaaa11aaaaa_1aaa1aaa1aaa=
DATABASE_URL = TEST_DB_URL
GENIUS_CLIENT_ID = TEST_CLIENT_ID
GENIUS_REDIRECT_URI = TEST_REDIRECT_URI
GENIUS_CLIENT_SECRET = TEST_CLIENT_SECRET
SPOTIFY_CLIENT_ID = TEST_SPOTIFY_ID
SPOTIFY_REDIRECT_URI = TEST_SPOTIFY_REDIRECT
SPOTIFY_CLIENT_SECRET = TEST_SPOTIFY_SECRET
LASTFM_API_KEY = TEST_LASTFM_KEY
RECOMMENDER_TOKEN = TEST_RECOMMENDER_TOKEN
IMGBB_TOKEN = TEST_IMGBB_TOKEN
BTC_ADDRESS = TEST_BTC_ADDRESS
[test]
python_files = *.py
testpaths = tests
[flake8]
max-line-length = 88
select = C,E,F,W,B,B9
ignore = E203,B305,B950,E402,E501,E722,F401,W503
[coverage:run]
source = geniust
branch = True
command_line = -m pytest
[coverage:report]
exclude_lines =
pragma: no cover
select_language
lastfm
__repr__
def error
if tag.get("class")
if "referent" not in class_ and "ReferentFragment" not in class_
for a in posted_annotations
def artist
def song_page_data
if lyrics[0].get("class")[0] == "lyrics"
if remove_section_headers
if __name__ == "__main__"
def fetch
def download_cover_arts
if translation
def test
if song.get
if tag.get("class")
if public_api or self.public_api
if self.access_token is None
return super().song(song_id, text_format)
omit =
geniust/functions/album_conversion/*
fail_under = 0.90
precision = 1
show_missing = True
skip_covered = True
[testenv]
description = Run test suite with pytest
deps = -rrequirements.txt
extras = dev
allowlist_externals = pytest
passenv = *
commands = pytest {posargs}
setenv =
{[base]setenv}
[testenv:test]
; Inherit everything from testenv
[testenv:mypy]
description = Check type annotations
allowlist_externals = mypy
commands = mypy --allow-redefinition
[testenv:flake8]
description = Check code style
allowlist_externals = flake8
commands = flake8
[testenv:black]
description = Black formatting
allowlist_externals = black
commands = black . --check
[testenv:isort]
description = Isort formatting
extras = checks
allowlist_externals = black
commands = isort . --check --profile black
[testenv:coverage]
description = Run tests with code coverage
whitelist_externals = coverage
commands = coverage run
coverage report
coverage xml