Upd: setup.py (extra deps), makefile, check.sh; fixed deps versions (==)

This commit is contained in:
DarkCat09 2023-06-30 11:07:31 +04:00
parent cfee59d119
commit b8399c2de5
5 changed files with 41 additions and 26 deletions

View file

@ -8,7 +8,7 @@ doc:
python3 -m mkdocs build
clean:
rm -rf dist python_aternos.egg-info
rm -rf dist build python_aternos.egg-info
rm -rf python_aternos/__pycache__
rm -rf examples/__pycache__
rm -rf tests/__pycache__
@ -18,11 +18,11 @@ test:
python3 -m unittest discover -v ./tests
check:
python3 -m mypy .
python3 -m mypy ./python_aternos
python3 -m pylint ./python_aternos
fullcheck:
chmod +x check.sh; bash check.sh
format:
python3 -m autopep8 -r --in-place .
python3 -m autopep8 -r --in-place ./python_aternos

View file

@ -8,7 +8,7 @@ title () {
COLOR='\033[1;36m'
echo
echo -e "$COLOR[#] $1$RESET"
echo -e "${COLOR}[#] $1$RESET"
}
error_msg () {
@ -19,9 +19,9 @@ error_msg () {
if (( $1 )); then
failed+="$2, "
echo -e "$ERR[X] Found errors$RESET"
echo -e "${ERR}[X] Found errors$RESET"
else
echo -e "$OK[V] Passed successfully$RESET"
echo -e "${OK}[V] Passed successfully$RESET"
fi
}
@ -32,26 +32,23 @@ display_failed() {
SUCCESS='\033[1;32m'
if [[ $failed != '' ]]; then
joined=`echo -n "$failed" | sed 's/, $//'`
echo -e "$FAILED[!] View output of: $joined$RESET"
joined=$(echo -n "$failed" | sed 's/, $//')
echo -e "${FAILED}[!] See output of: $joined$RESET"
else
echo -e "$SUCCESS[V] All checks were passed successfully$RESET"
echo -e "${SUCCESS}[V] All checks were passed successfully$RESET"
fi
}
title 'Checking needed modules...'
python3 -m pip install pycodestyle mypy pylint
title 'Running unit tests...'
python3 -m unittest discover -v ./tests
error_msg $? 'unittest'
title 'Running pep8 checker...'
python3 -m pycodestyle .
python3 -m pycodestyle ./python_aternos
error_msg $? 'pep8'
title 'Running mypy checker...'
python3 -m mypy .
python3 -m mypy ./python_aternos
error_msg $? 'mypy'
title 'Running pylint checker...'

View file

@ -22,7 +22,7 @@ if TYPE_CHECKING:
OneArgT = Callable[[Any], Coroutine[Any, Any, None]]
TwoArgT = Callable[[Any, Tuple[Any, ...]], Coroutine[Any, Any, None]]
FunctionT = Union[OneArgT, TwoArgT]
FunctionT = Union[OneArgT, TwoArgT] # pylint: disable=invalid-name
ArgsTuple = Tuple[FunctionT, Tuple[Any, ...]]

View file

@ -1,5 +1,5 @@
lxml>=4.8.0
cloudscraper>=1.2.60
js2py>=0.71
websockets>=10.1
regex>=2022.3.15
cloudscraper==1.2.71
Js2Py==0.74
lxml==4.9.2
regex==2023.6.3
websockets==11.0.3

View file

@ -5,7 +5,7 @@ with open('README.md', 'rt') as readme:
setuptools.setup(
name='python-aternos',
version='3.0.0',
version='3.0.1',
author='Chechkenev Andrey (@DarkCat09)',
author_email='aacd0709@mail.ru',
description='An unofficial Aternos API',
@ -34,12 +34,30 @@ setuptools.setup(
'Typing :: Typed',
],
install_requires=[
'lxml>=4.8.0',
'cloudscraper>=1.2.60',
'js2py>=0.71',
'websockets>=10.1',
'regex>=2022.3.15',
'cloudscraper==1.2.71',
'Js2Py==0.74',
'lxml==4.9.2',
'regex==2023.6.3',
'websockets==11.0.3',
],
extras_require={
'dev': [
'autopep8==2.0.2',
'pycodestyle==2.10.0',
'mypy==1.4.1',
'pylint==2.17.4',
'requests-mock==1.11.0',
'types-requests==2.31.0.1',
],
'pypi': [
'build==0.10.0',
'twine==4.0.2',
],
'docs': [
'mkdocs==1.4.3',
'mkdocstrings[python]==0.22.0',
]
},
packages=['python_aternos'],
python_requires=">=3.7",
include_package_data=True,