Skip to content

Commit

Permalink
fix precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
vemonet committed Aug 4, 2023
1 parent f988a17 commit b2fe7e6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ jobs:
- name: ☂️ Upload coverage to Coveralls
uses: coverallsapp/github-action@v2

- name: ☂️ Upload coverage to Codecov
uses: codecov/codecov-action@v3

- name: ☁️ Analyze with SonarCloud
uses: sonarsource/sonarcloud-github-action@master
env:
Expand Down
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ oxigraph =[
test = [
"pytest >=7.1.3",
"pytest-cov >=3.0.0",
"pre-commit >=3.3.0",
"pre-commit",
"mypy >=1.4.1",
"requests",
"httpx",
Expand Down Expand Up @@ -89,6 +89,7 @@ post-install-commands = [
"pre-commit install",
]


[tool.hatch.envs.default.scripts]
dev = "uvicorn example.app.main:app --reload {args}"
fmt = [
Expand All @@ -109,13 +110,17 @@ cov = [
[[tool.hatch.envs.all.matrix]]
python = ["3.7", "3.8", "3.9", "3.10", "3.11"]


# TOOLS
# [tool.hatch.build]
# sources = ["src"]

[tool.hatch.version]
path = "src/rdflib_endpoint/__init__.py"


[tool.coverage.run]
source = ["src"]
source = ["src/rdflib_endpoint"]
branch = false

[tool.pytest.ini_options]
Expand Down
3 changes: 1 addition & 2 deletions src/rdflib_endpoint/sparql_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,5 @@ def __init__(
async def add_process_time_header(request: Request, call_next: Any) -> Response:
start_time = time.time()
response: Response = await call_next(request)
process_time = time.time() - start_time
response.headers["X-Process-Time"] = str(process_time)
response.headers["X-Process-Time"] = str(time.time() - start_time)
return response

0 comments on commit b2fe7e6

Please sign in to comment.