Skip to content

Commit

Permalink
Merge branch 'main' into add-facility-to-sync
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartcampbell authored Dec 20, 2024
2 parents e02fa09 + 730d880 commit 1a193ad
Show file tree
Hide file tree
Showing 30 changed files with 392 additions and 174 deletions.
10 changes: 6 additions & 4 deletions performance-tests/locustfile.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import locust


class ApiTest(locust.FastHttpUser):
host = "http://127.0.0.1:8080"

# The time a user 'waits' between requests
wait_time = locust.between(5,30)
wait_time = locust.between(5, 30)

@locust.task(weight=1)
def home_page(self):
self.client.get('/')
self.client.get("/")

@locust.task(weight=5)
def stats(self):
self.client.get('/stats')
self.client.get("/stats")

@locust.task(weight=15)
def recent(self):
self.client.get('/proposals/recent/5')
self.client.get("/proposals/recent/5")
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ hooks.vcs.version-file = "src/nsls2api/_version.py"
[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/.gitignore",
"/.git",
"/.vscode",
"/.pytest_cache",
"/.venv",
]

#[tool.hatch.metadata.hooks.requirements_txt.optional-dependencies]
Expand All @@ -56,5 +61,5 @@ asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "auto"

[tool.ruff]
target-version = "py311"
target-version = "py312"

5 changes: 5 additions & 0 deletions requirements-dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ asyncer
black
bunnet
coverage
hatch
hatchling
hatch-requirements-txt
hatch-vcs
ipython
locust
pyright
pytest
pytest-asyncio
ruff
textual-dev
uv
128 changes: 107 additions & 21 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# uv pip compile requirements-dev.in -o requirements-dev.txt
aiohappyeyeballs==2.4.3
# via aiohttp
aiohttp==3.10.10
aiohttp==3.10.11
# via
# aiohttp-jinja2
# textual-dev
Expand All @@ -14,7 +14,9 @@ aiosignal==1.3.1
annotated-types==0.7.0
# via pydantic
anyio==4.6.2.post1
# via asyncer
# via
# asyncer
# httpx
asgi-lifespan==2.1.0
# via -r requirements-dev.in
asttokens==2.4.1
Expand All @@ -25,7 +27,7 @@ attrs==24.2.0
# via aiohttp
black==24.10.0
# via -r requirements-dev.in
blinker==1.8.2
blinker==1.9.0
# via flask
brotli==1.1.0
# via geventhttpclient
Expand All @@ -34,25 +36,37 @@ bunnet==1.3.0
certifi==2024.8.30
# via
# geventhttpclient
# httpcore
# httpx
# requests
cffi==1.17.1
# via cryptography
charset-normalizer==3.4.0
# via requests
click==8.1.7
# via
# black
# bunnet
# flask
# hatch
# textual-dev
# userpath
configargparse==1.7
# via locust
coverage==7.6.4
# via -r requirements-dev.in
cryptography==43.0.3
# via secretstorage
decorator==5.1.1
# via ipython
distlib==0.3.9
# via virtualenv
dnspython==2.7.0
# via pymongo
executing==2.1.0
# via stack-data
filelock==3.16.1
# via virtualenv
flask==3.0.3
# via
# flask-cors
Expand All @@ -66,15 +80,37 @@ frozenlist==1.5.0
# via
# aiohttp
# aiosignal
gevent==24.10.3
gevent==24.11.1
# via geventhttpclient
geventhttpclient==2.3.1
# via locust
greenlet==3.1.1
# via gevent
h11==0.14.0
# via httpcore
hatch==1.13.0
# via -r requirements-dev.in
hatch-requirements-txt==0.4.1
# via -r requirements-dev.in
hatch-vcs==0.4.0
# via -r requirements-dev.in
hatchling==1.26.3
# via
# -r requirements-dev.in
# hatch
# hatch-requirements-txt
# hatch-vcs
httpcore==1.0.6
# via httpx
httpx==0.27.2
# via hatch
hyperlink==21.0.0
# via hatch
idna==3.10
# via
# anyio
# httpx
# hyperlink
# requests
# yarl
iniconfig==2.0.0
Expand All @@ -83,20 +119,32 @@ ipython==8.29.0
# via -r requirements-dev.in
itsdangerous==2.2.0
# via flask
jedi==0.19.1
jaraco-classes==3.4.0
# via keyring
jaraco-context==6.0.1
# via keyring
jaraco-functools==4.1.0
# via keyring
jedi==0.19.2
# via ipython
jeepney==0.8.0
# via
# keyring
# secretstorage
jinja2==3.1.4
# via
# aiohttp-jinja2
# flask
# textual-serve
keyring==25.5.0
# via hatch
lazy-model==0.2.0
# via bunnet
linkify-it-py==2.0.3
# via markdown-it-py
locust==2.32.0
locust==2.32.2
# via -r requirements-dev.in
markdown-it-py==3.0.0
markdown-it-py[linkify,plugins]==3.0.0
# via
# mdit-py-plugins
# rich
Expand All @@ -111,6 +159,10 @@ mdit-py-plugins==0.4.2
# via markdown-it-py
mdurl==0.1.2
# via markdown-it-py
more-itertools==10.5.0
# via
# jaraco-classes
# jaraco-functools
msgpack==1.1.0
# via
# locust
Expand All @@ -123,22 +175,34 @@ mypy-extensions==1.0.0
# via black
nodeenv==1.9.1
# via pyright
packaging==24.1
packaging==24.2
# via
# black
# hatch
# hatch-requirements-txt
# hatchling
# pytest
# setuptools-scm
parso==0.8.4
# via jedi
pathspec==0.12.1
# via black
# via
# black
# hatchling
pexpect==4.9.0
# via ipython
# via
# hatch
# ipython
platformdirs==4.3.6
# via
# black
# hatch
# textual
# virtualenv
pluggy==1.5.0
# via pytest
# via
# hatchling
# pytest
prompt-toolkit==3.0.48
# via ipython
propcache==0.2.0
Expand All @@ -149,6 +213,8 @@ ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.3
# via stack-data
pycparser==2.22
# via cffi
pydantic==2.9.2
# via
# bunnet
Expand All @@ -161,7 +227,7 @@ pygments==2.18.0
# rich
pymongo==4.10.1
# via bunnet
pyright==1.1.386
pyright==1.1.388
# via -r requirements-dev.in
pytest==8.3.3
# via
Expand All @@ -173,25 +239,29 @@ pyzmq==26.2.0
# via locust
requests==2.32.3
# via locust
rich==13.9.3
rich==13.9.4
# via
# hatch
# textual
# textual-serve
ruff==0.7.1
ruff==0.7.3
# via -r requirements-dev.in
setuptools==75.2.0
# via
# zope-event
# zope-interface
secretstorage==3.3.3
# via keyring
setuptools-scm==8.1.0
# via hatch-vcs
shellingham==1.5.4
# via hatch
six==1.16.0
# via asttokens
sniffio==1.3.1
# via
# anyio
# asgi-lifespan
# httpx
stack-data==0.6.3
# via ipython
textual==0.85.0
textual==0.85.2
# via
# textual-dev
# textual-serve
Expand All @@ -201,10 +271,16 @@ textual-serve==1.1.1
# via textual-dev
toml==0.10.2
# via bunnet
tomli-w==1.1.0
# via hatch
tomlkit==0.13.2
# via hatch
traitlets==5.14.3
# via
# ipython
# matplotlib-inline
trove-classifiers==2024.10.21.16
# via hatchling
typing-extensions==4.12.2
# via
# pydantic
Expand All @@ -218,16 +294,26 @@ urllib3==2.2.3
# via
# geventhttpclient
# requests
userpath==1.9.2
# via hatch
uv==0.5.1
# via
# -r requirements-dev.in
# hatch
virtualenv==20.27.1
# via hatch
wcwidth==0.2.13
# via prompt-toolkit
werkzeug==3.0.6
werkzeug==3.1.3
# via
# flask
# flask-login
# locust
yarl==1.16.0
yarl==1.17.1
# via aiohttp
zope-event==5.0
# via gevent
zope-interface==7.1.1
# via gevent
zstandard==0.23.0
# via hatch
Loading

0 comments on commit 1a193ad

Please sign in to comment.