Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "ukbot"
version = "1.1.0"
description = "Wikipedia writing contest bot"
authors = [
{ name = "Dan Michael O. Heggø", email = "danmichaelo@gmail.com" },
{ name = "Jon Harald Søby", email = "jhsoby@wikimedia.no" }
]
license = { text = "MIT" }
readme = "README.md"
requires-python = ">=3.7"
keywords = ["wikipedia"]
dependencies = [
"Flask",
"isoweek",
"jsonpath-rw",
"lxml",
"matplotlib",
"more-itertools",
"mwclient",
"mwtemplates",
"mwtextextractor",
"numpy",
"psutil",
"pydash",
"PyMySQL",
"python-dotenv",
"pytz",
"PyYAML",
"requests",
"requests-oauthlib",
]

classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.9"
]

[project.scripts]
ukbot = "ukbot.ukbot:main"

[tool.setuptools.packages.find]
where = ["."]
25 changes: 21 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
.
pytest
responses
Faker
Flask
isoweek
jsonpath_rw
lxml
matplotlib
mock
faker
more_itertools
mwclient
mwtemplates
mwtextextractor
numpy
psutil
pydash
PyMySQL
python-dotenv
pytz
PyYAML
Requests
requests_oauthlib
setuptools
uwsgi
49 changes: 0 additions & 49 deletions setup.py

This file was deleted.

5 changes: 4 additions & 1 deletion ukbot/ukbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from mwtemplates import TemplateEditor
import platform
from dotenv import load_dotenv
from importlib.metadata import version

from .common import get_mem_usage, Localization, _, STATE_NORMAL, InvalidContestPage
from .util import load_config
Expand All @@ -26,6 +27,7 @@

matplotlib.use('svg')

__version__ = version('ukbot')

class AppFilter(logging.Filter):

Expand Down Expand Up @@ -119,8 +121,9 @@ def main():
mainstart.strftime('%F %T'),
mainstart.astimezone(config['wiki_timezone']).strftime('%F %T'))
logger.info(
'Platform: Python %s, Mwclient %s, %s',
'Platform: Python %s, UKBot %s, Mwclient %s, %s',
platform.python_version(),
__version__,
mwclient.__version__,
platform.platform()
)
Expand Down