-
-
Notifications
You must be signed in to change notification settings - Fork 293
chore: Tox configuration scripts #718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
400af96
83031e1
852a59e
f1a31b9
298c990
41f0ccb
4970052
7ce083f
905838f
9bb6283
95c1fde
035fc50
4b98beb
f0e4303
915378e
9c95e50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
This file was deleted.
Large diffs are not rendered by default.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import subprocess | ||
|
||
|
||
class Command: | ||
@staticmethod | ||
def run(cmd): | ||
return subprocess.run(cmd, shell=True, check=True) | ||
|
||
|
||
def install(): | ||
return Command.run("poetry install --verbose") | ||
|
||
|
||
def lint(): | ||
return Command.run("poetry run pre-commit run --all-files") | ||
|
||
|
||
def coverage(): | ||
return Command.run("poetry run pytest --cov=./ --cov-report=html -vv") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (llm): While the coverage command is a good addition, it's crucial to ensure that the test suite includes tests that cover the new There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (llm): The addition of a coverage command is commendable as it emphasizes the importance of test coverage. However, it would be beneficial to document the expected coverage threshold within the project's contribution guidelines or as a comment within this script. This ensures that contributors are aware of the coverage expectations and maintain or improve the test coverage with their contributions. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[tox] | ||
isolated_build = True | ||
envlist = py37, py38, py39, py310, py311 | ||
|
||
[gh] | ||
python = | ||
3.11 = py311 | ||
3.10 = py310 | ||
3.9 = py39 | ||
3.8 = py38 | ||
|
||
[testenv] | ||
allowlist_externals = poetry | ||
require_locked_deps = true | ||
poetry_dep_groups = | ||
dev | ||
setenv = | ||
PYTHONPATH = {toxinidir} | ||
passenv = | ||
SUPABASE_URL | ||
SUPABASE_KEY | ||
commands = | ||
poetry install --no-root -v | ||
poetry run pytest -s --cov=./ --cov-report=term --cov-report=html | ||
|
||
[testenv:build] | ||
commands = | ||
poetry install --only dev | ||
poetry run unasync supabase tests | ||
|
||
[testenv:format] | ||
deps = pre-commit | ||
commands = pre-commit run --all-files --show-diff-on-failure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (llm): It's great to see automation scripts being added to enhance the development workflow. However, it would be beneficial to include unit tests for these scripts themselves, especially for the
Command.run
method, to ensure its reliability and handle potential exceptions gracefully. Testing the scripts will help in maintaining the robustness of the development workflow.