added video link to msToken input, improved handling of output directories without write permission (and added relevant unit test), removed unused requirements.txt things

This commit is contained in:
Tristan Lee
2023-09-06 19:51:16 -05:00
parent 6a56c354e1
commit 91a8aaef38
6 changed files with 93 additions and 42 deletions

View File

@@ -1,30 +1,6 @@
from setuptools import setup
def read_requirements(filename: str):
with open(filename) as requirements_file:
import re
def fix_url_dependencies(req: str) -> str:
"""Pip and setuptools disagree about how URL dependencies should be handled."""
m = re.match(
r"^(git\+)?(https|ssh)://(git@)?github\.com/([\w-]+)/(?P<name>[\w-]+)\.git",
req,
)
if m is None:
return req
else:
return f"{m.group('name')} @ {req}"
requirements = []
for line in requirements_file:
line = line.strip()
if line.startswith("#") or len(line) <= 0:
continue
requirements.append(fix_url_dependencies(line))
return requirements
with open("README.md", "r", encoding="utf-8") as file:
long_description = file.read()
@@ -45,8 +21,6 @@ setup(
long_description_content_type="text/markdown",
url="https://github.com/bellingcat/tiktok-hashtag-analysis",
license="MIT License",
# install_requires=read_requirements("requirements.txt"),
# extras_require={"dev": read_requirements("dev-requirements.txt")},
install_requires=["seaborn", "matplotlib", "TikTokApi", "requests", "yt_dlp"],
extras_require={"test": ["pytest", "pytest-cov", "pytest-html", "pytest-metadata"]},
classifiers=[