mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
twill 3.2 replaced `requests` with `httpx`, and `httpx` has a default
timeout of 5 s on a request, while `requests` didn't enforce a timeout by
default.
Fix errors like the following in ToolShed tests, where resetting
repository metadata takes longer than 5 s:
```
self = <tool_shed.test.functional.test_0000_basic_repository_features.TestBasicRepositoryFeatures object at 0x7f28f99197c0>
def test_0090_verify_repository_metadata(self):
"""Verify that resetting the metadata does not change it."""
repository = self._get_repository_by_name_and_owner(repository_name, common.test_user_1_name)
> self.verify_unchanged_repository_metadata(repository)
lib/tool_shed/test/functional/test_0000_basic_repository_features.py:264:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
lib/tool_shed/test/base/twilltestcase.py:2073: in verify_unchanged_repository_metadata
self.reset_repository_metadata(repository)
lib/tool_shed/test/base/twilltestcase.py:1774: in reset_repository_metadata
self.visit_url("/repository/reset_all_metadata", params=params)
lib/tool_shed/test/base/twilltestcase.py:845: in visit_url
return self._browser.visit_url(url, allowed_codes=allowed_codes)
lib/tool_shed/test/base/twillbrowser.py:35: in visit_url
return visit_url(url, allowed_codes=allowed_codes)
lib/tool_shed/test/base/twillbrowser.py:20: in visit_url
new_url = tc.go(url)
.venv/lib/python3.8/site-packages/twill/commands.py:120: in go
browser.go(url)
.venv/lib/python3.8/site-packages/twill/browser.py:192: in go
self._journey("open", try_url)
.venv/lib/python3.8/site-packages/twill/browser.py:677: in _journey
result = self._client.get(url)
.venv/lib/python3.8/site-packages/httpx/_client.py:1041: in get
return self.request(
.venv/lib/python3.8/site-packages/httpx/_client.py:814: in request
return self.send(request, auth=auth, follow_redirects=follow_redirects)
.venv/lib/python3.8/site-packages/httpx/_client.py:901: in send
response = self._send_handling_auth(
.venv/lib/python3.8/site-packages/httpx/_client.py:929: in _send_handling_auth
response = self._send_handling_redirects(
.venv/lib/python3.8/site-packages/httpx/_client.py:966: in _send_handling_redirects
response = self._send_single_request(request)
.venv/lib/python3.8/site-packages/httpx/_client.py:1002: in _send_single_request
response = transport.handle_request(request)
.venv/lib/python3.8/site-packages/httpx/_transports/default.py:228: in handle_request
resp = self._pool.handle_request(req)
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/contextlib.py:131: in __exit__
self.gen.throw(type, value, traceback)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
@contextlib.contextmanager
def map_httpcore_exceptions() -> typing.Iterator[None]:
try:
yield
except Exception as exc:
mapped_exc = None
for from_exc, to_exc in HTTPCORE_EXC_MAP.items():
if not isinstance(exc, from_exc):
continue
# We want to map to the most specific exception we can find.
# Eg if `exc` is an `httpcore.ReadTimeout`, we want to map to
# `httpx.ReadTimeout`, not just `httpx.TimeoutException`.
if mapped_exc is None or issubclass(to_exc, mapped_exc):
mapped_exc = to_exc
if mapped_exc is None: # pragma: no cover
raise
message = str(exc)
> raise mapped_exc(message) from exc
E httpx.ReadTimeout: timed out
.venv/lib/python3.8/site-packages/httpx/_transports/default.py:83: ReadTimeout
```
215 lines
5.7 KiB
TOML
215 lines
5.7 KiB
TOML
[tool.black]
|
|
line-length = 120
|
|
target-version = ['py38']
|
|
include = '\.pyi?$'
|
|
extend-exclude = '''
|
|
^/(
|
|
| packages
|
|
| lib/tool_shed/test/test_data/repos
|
|
)/
|
|
'''
|
|
|
|
[tool.darker]
|
|
isort = true
|
|
|
|
[tool.poetry]
|
|
name = "galaxy"
|
|
version = "22.01.dev0"
|
|
description = "Galaxy is an open, web-based platform for accessible, reproducible, and transparent computational research."
|
|
authors = ["Galaxy Contributors"]
|
|
license = "AFL-3.0"
|
|
readme = "README.rst"
|
|
homepage = "https://galaxyproject.org/"
|
|
repository = "https://github.com/galaxyproject/galaxy/"
|
|
documentation = "https://docs.galaxyproject.org/"
|
|
|
|
[[tool.poetry.source]]
|
|
name = "PyPI"
|
|
priority = "default"
|
|
|
|
[[tool.poetry.source]]
|
|
name = "galaxyproject"
|
|
url = "https://wheels.galaxyproject.org/simple"
|
|
priority = "primary"
|
|
|
|
[tool.poetry.dependencies]
|
|
a2wsgi = "*"
|
|
aiofiles = "*"
|
|
alembic = "*"
|
|
apispec = "*"
|
|
Babel = "*"
|
|
bdbag = ">=1.6.3"
|
|
Beaker = "*"
|
|
bioblend = "*"
|
|
bleach = "*"
|
|
boltons = "*"
|
|
boto = "*"
|
|
bx-python = "*"
|
|
celery = "*"
|
|
Cheetah3 = "!=3.2.6.post2" # yanked release, https://github.com/python-poetry/poetry/issues/2453
|
|
cloudauthz = "==0.6.0"
|
|
cloudbridge = "*"
|
|
circus = "*"
|
|
cwltool = ">=3.1.20230624081518" # save time, minimum needed by cwl-1.0 branch
|
|
conda-package-streaming = "*"
|
|
dictobj = "*"
|
|
dnspython = "*"
|
|
docutils = "!=0.17, !=0.17.1"
|
|
dparse = "*"
|
|
edam-ontology = "*"
|
|
fastapi = ">=0.71.0, !=0.89.0, <0.99" # https://github.com/tiangolo/fastapi/issues/4041 https://github.com/tiangolo/fastapi/issues/5861
|
|
fastapi-utils = "*"
|
|
fs = "*"
|
|
future = "*"
|
|
galaxy_sequence_utils = "*"
|
|
graphene-sqlalchemy = "3.0.0b3" # need a beta release to be compat. with starlette plugin
|
|
gravity = ">=1.0.4"
|
|
gunicorn = "*"
|
|
gxformat2 = "*"
|
|
h5grove = ">=1.2.1"
|
|
h5py = "*"
|
|
importlib-metadata = "<5" # Work around https://github.com/celery/kombu/issues/1600
|
|
importlib-resources = "*"
|
|
isa-rwval = ">=0.10.10"
|
|
kombu = "*"
|
|
lagom = "*"
|
|
Mako = "*"
|
|
Markdown = "*"
|
|
MarkupSafe = "*"
|
|
Mercurial = "*"
|
|
mrcfile = "*"
|
|
msal = "*"
|
|
nodeenv = "*"
|
|
numpy = "*"
|
|
packaging = "*"
|
|
paramiko = "!=2.9.0, !=2.9.1" # https://github.com/paramiko/paramiko/issues/1961
|
|
Parsley = "*"
|
|
Paste = "*"
|
|
pebble = "*"
|
|
psutil = "*"
|
|
pulsar-galaxy-lib = ">=0.15.0.dev0"
|
|
pycryptodome = "*"
|
|
pydantic = {version = "<2", extras = ["email"]}
|
|
PyJWT = "*"
|
|
pykwalify = "*"
|
|
pylibmagic = "*"
|
|
pyparsing = "*"
|
|
pysam = ">=0.21" # for Python 3.11 support on macOS
|
|
python = ">=3.8,<3.12" # Keep maximum version strict to appease numpy and scipy
|
|
python-dateutil = "*"
|
|
python-magic = "*"
|
|
python-multipart = "*" # required to support form parsing in FastAPI/Starlette
|
|
PyYAML = "*"
|
|
refgenconf = ">=0.12.0"
|
|
regex = "*"
|
|
requests = "*"
|
|
rocrate = "*"
|
|
Routes = "*"
|
|
schema-salad = "!=8.3.20220721194857" # https://github.com/common-workflow-language/schema_salad/issues/575
|
|
social-auth-core = {version = "==4.0.3", extras = ["openidconnect"]}
|
|
sortedcontainers = "*"
|
|
SQLAlchemy = ">=1.4.25,<2"
|
|
sqlitedict = "*"
|
|
sqlparse = "*"
|
|
starlette = "*"
|
|
starlette-context = "*"
|
|
starlette-graphene3 = "*"
|
|
svgwrite = "*"
|
|
tifffile = "*"
|
|
tuswsgi = "*"
|
|
typing-extensions = "*"
|
|
uvicorn = "*"
|
|
uvloop = "*"
|
|
WebOb = "*"
|
|
Whoosh = "*"
|
|
zipstream-new = "*"
|
|
s3fs = "^2023.1.0"
|
|
|
|
[tool.poetry.group.dev.dependencies]
|
|
ase = ">=3.18.1"
|
|
axe-selenium-python = "*"
|
|
black = "*"
|
|
codespell = "*"
|
|
cwltest = "*"
|
|
darker = "*"
|
|
fluent-logger = "*"
|
|
galaxy-release-util = "*"
|
|
httpx = "*"
|
|
isort = "*"
|
|
lxml = "!=4.2.2"
|
|
markdown-it-reporter = "*"
|
|
myst-parser = "*"
|
|
pkce = "*"
|
|
playwright = "*"
|
|
pytest = "*"
|
|
pytest-asyncio = "*"
|
|
pytest-celery = "*"
|
|
pytest-cov = "*"
|
|
pytest-html = "*"
|
|
pytest-httpserver = "*"
|
|
python-irodsclient = "!=1.1.2" # https://github.com/irods/python-irodsclient/issues/356
|
|
pytest-json-report = "*"
|
|
pytest-mock = "*"
|
|
pytest-playwright = "*"
|
|
pytest-postgresql = "!=3.0.0" # https://github.com/ClearcodeHQ/pytest-postgresql/issues/426
|
|
pytest-shard = "*"
|
|
responses = "*"
|
|
selenium = "*"
|
|
urllib3 = "<2" # Necessary for poetry for resolve deps for Python 3.8+
|
|
seletools = "*"
|
|
Sphinx = ">=4.0" # support docutils 0.17
|
|
sphinx-rtd-theme = ">=1.0.0,<2" # https://github.com/python-poetry/poetry/issues/8194
|
|
statsd = "*"
|
|
testfixtures = "*"
|
|
tuspy = "*"
|
|
twill = ">=3.2.1" # https://github.com/twill-tools/twill/issues/18
|
|
watchdog = "*"
|
|
|
|
[tool.poetry.group.typecheck.dependencies]
|
|
mypy = "*"
|
|
pydantic = "<2" # for pydantic.mypy plugin
|
|
types-bleach = "*"
|
|
types-boto = "*"
|
|
types-contextvars = "*"
|
|
types-dataclasses = "*"
|
|
types-docutils = "*"
|
|
types-Markdown = "*"
|
|
types-paramiko = "*"
|
|
types-pkg-resources = "*"
|
|
types-python-dateutil = "*"
|
|
types-PyYAML = "*"
|
|
types-requests = "*"
|
|
types-six = "*"
|
|
|
|
[tool.ruff]
|
|
# Enable: pycodestyle errors (E), Pyflakes (F), flake8-bugbear (B),
|
|
# flake8-logging-format (G) and pyupgrade (UP)
|
|
select = ["E", "F", "B", "G", "UP"]
|
|
target-version = "py38"
|
|
# Exceptions:
|
|
# B008 Do not perform function calls in argument defaults (for FastAPI Depends and Body)
|
|
# B9 flake8-bugbear opinionated warnings
|
|
# E402 module level import not at top of file # TODO, we would like to improve this.
|
|
# E501 is line length (delegated to black)
|
|
# G* are TODOs
|
|
ignore = ["B008", "B9", "E402", "E501", "G001", "G002", "G004"]
|
|
exclude = [
|
|
"lib/tool_shed/test/test_data/repos"
|
|
]
|
|
|
|
[tool.ruff.isort]
|
|
# We are not selecting "I" rules in ruff yet because support for all the isort
|
|
# options we need is not complete, but these are the one currently implemented.
|
|
combine-as-imports = true
|
|
relative-imports-order = "closest-to-furthest"
|
|
|
|
[tool.ruff.per-file-ignores]
|
|
# Don't check pyupgrade rules on tool scripts, which may use different Python versions
|
|
"test/functional/tools/*" = ["UP"]
|
|
"tools/*" = ["UP"]
|
|
# Don't check some pyupgrade rules on generated files
|
|
"lib/galaxy/schema/bco/*" = ["UP006", "UP007"]
|
|
"lib/galaxy/schema/drs/*" = ["UP006", "UP007"]
|
|
"lib/tool_shed_client/schema/trs.py" = ["UP006", "UP007"]
|
|
"lib/tool_shed_client/schema/trs_service_info.py" = ["UP006", "UP007"]
|