Merge branch 'remove-tox'
This commit is contained in:
commit
fccd0134b5
1
.gitignore
vendored
1
.gitignore
vendored
@ -37,7 +37,6 @@ pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
|
14
.travis.yml
14
.travis.yml
@ -1,14 +0,0 @@
|
||||
# Config file for automatic testing at travis-ci.org
|
||||
|
||||
language: python
|
||||
python:
|
||||
- 3.8
|
||||
- 3.7
|
||||
|
||||
# Command to install dependencies, e.g. pip install -r requirements_dev.txt --use-mirrors
|
||||
install: pip install -U tox-travis
|
||||
|
||||
# Command to run tests, e.g. python setup.py test
|
||||
script: tox
|
||||
|
||||
|
@ -70,14 +70,14 @@ Ready to contribute? Here's how to set up `erepublik` for local development.
|
||||
|
||||
Now you can make your changes locally.
|
||||
|
||||
5. When you're done making changes, check that your changes pass flake8 and the
|
||||
tests, including testing other Python versions with tox::
|
||||
5. When you're done making changes, check that your changes pass flake8, isort and the
|
||||
tests::
|
||||
|
||||
$ flake8 erepublik tests
|
||||
$ python setup.py test or py.test
|
||||
$ tox
|
||||
$ isort erepublik
|
||||
$ python setup.py test
|
||||
|
||||
To get flake8 and tox, just pip install them into your virtualenv.
|
||||
To get flake8 and isort, just pip install them into your virtualenv.
|
||||
|
||||
6. Commit your changes and push your branch to GitHub::
|
||||
|
||||
|
5
Makefile
5
Makefile
@ -47,7 +47,6 @@ clean-pyc: ## remove Python file artifacts
|
||||
rm -rf log/
|
||||
|
||||
clean-test: ## remove test and coverage artifacts
|
||||
rm -fr .tox/
|
||||
rm -f .coverage
|
||||
rm -fr htmlcov/
|
||||
rm -fr .pytest_cache
|
||||
@ -58,9 +57,6 @@ lint: ## check style with flake8
|
||||
test: ## run tests quickly with the default Python
|
||||
python setup.py test
|
||||
|
||||
test-all: ## run tests on every Python version with tox
|
||||
tox
|
||||
|
||||
coverage: ## check code coverage quickly with the default Python
|
||||
coverage run --source erepublik setup.py test
|
||||
coverage report -m
|
||||
@ -80,6 +76,7 @@ servedocs: docs ## compile the docs watching for changes
|
||||
|
||||
release: dist ## package and upload a release
|
||||
twine upload dist/*
|
||||
clean
|
||||
|
||||
dist: clean ## builds source and wheel package
|
||||
python setup.py sdist
|
||||
|
@ -6,7 +6,7 @@ __author__ = """Eriks Karls"""
|
||||
__email__ = 'eriks@72.lv'
|
||||
__version__ = '0.23.3.2'
|
||||
|
||||
from erepublik import classes, utils, constants
|
||||
from erepublik import classes, constants, utils
|
||||
from erepublik.citizen import Citizen
|
||||
|
||||
__all__ = ["classes", "utils", "Citizen", 'constants']
|
||||
|
@ -11,7 +11,7 @@ from typing import Any, Dict, List, NoReturn, Optional, Set, Tuple, Union
|
||||
|
||||
from requests import HTTPError, RequestException, Response
|
||||
|
||||
from . import utils, classes, access_points, constants
|
||||
from . import access_points, classes, constants, utils
|
||||
from .classes import OfferItem
|
||||
|
||||
|
||||
|
@ -3,11 +3,11 @@ import hashlib
|
||||
import threading
|
||||
import weakref
|
||||
from decimal import Decimal
|
||||
from typing import Any, Dict, List, NamedTuple, Tuple, Union, NoReturn, Generator, Iterable
|
||||
from typing import Any, Dict, Generator, Iterable, List, NamedTuple, NoReturn, Tuple, Union
|
||||
|
||||
from requests import Response, Session, post
|
||||
|
||||
from . import utils, constants
|
||||
from . import constants, utils
|
||||
|
||||
__all__ = ['Battle', 'BattleDivision', 'BattleSide', 'Company', 'Config', 'Details', 'Energy', 'ErepublikException',
|
||||
'ErepublikNetworkException', 'EnergyToFight',
|
||||
|
@ -10,7 +10,7 @@ import unicodedata
|
||||
import warnings
|
||||
from decimal import Decimal
|
||||
from pathlib import Path
|
||||
from typing import Any, List, Optional, Union, Dict
|
||||
from typing import Any, Dict, List, Optional, Union
|
||||
|
||||
import requests
|
||||
|
||||
@ -158,6 +158,7 @@ def write_file(filename: str, content: str) -> int:
|
||||
|
||||
def write_request(response: requests.Response, is_error: bool = False):
|
||||
from erepublik import Citizen
|
||||
|
||||
# Remove GET args from url name
|
||||
url = response.url
|
||||
last_index = url.index("?") if "?" in url else len(response.url)
|
||||
|
@ -1,6 +1,6 @@
|
||||
from datetime import timedelta
|
||||
|
||||
from erepublik import Citizen, utils, constants
|
||||
from erepublik import Citizen, constants, utils
|
||||
|
||||
CONFIG = {
|
||||
'email': 'player@email.com',
|
||||
|
@ -4,16 +4,15 @@ edx-sphinx-theme==1.5.0
|
||||
flake8==3.8.4
|
||||
ipython>=7.19.0
|
||||
isort==5.6.4
|
||||
pip==20.3.1
|
||||
pip==20.3.3
|
||||
PyInstaller==4.1
|
||||
pytz==2020.4
|
||||
pytest==6.1.2
|
||||
pytest==6.2.1
|
||||
responses==0.12.1
|
||||
setuptools==51.0.0
|
||||
Sphinx==3.3.1
|
||||
requests==2.25.0
|
||||
requests>=2.24.0,<2.26.0
|
||||
PySocks==1.7.1
|
||||
tox==3.20.1
|
||||
twine==3.2.0
|
||||
watchdog==1.0.0
|
||||
wheel==0.36.1
|
||||
wheel==0.36.2
|
||||
pur==5.3.0
|
||||
|
@ -18,13 +18,13 @@ replace = __version__ = '{new_version}'
|
||||
universal = 1
|
||||
|
||||
[flake8]
|
||||
exclude = docs,.tox,.git,log,debug,venv
|
||||
exclude = docs,.git,log,debug,venv
|
||||
max-line-length = 120
|
||||
ignore = D100,D101,D102,D103
|
||||
|
||||
[pycodestyle]
|
||||
max-line-length = 120
|
||||
exclude = .tox,.git,log,debug,venv, build
|
||||
exclude = .git,log,debug,venv, build
|
||||
|
||||
[mypy]
|
||||
python_version = 3.7
|
||||
|
2
setup.py
2
setup.py
@ -13,7 +13,7 @@ with open('HISTORY.rst') as history_file:
|
||||
|
||||
requirements = [
|
||||
'pytz==2020.4',
|
||||
'requests==2.25.0',
|
||||
'requests>=2.24.0,<2.26.0',
|
||||
'PySocks==1.7.1'
|
||||
]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user