Skip to content

Commit

Permalink
chore: documentation updates (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
cofin authored Apr 19, 2024
1 parent a618d62 commit 08574f8
Show file tree
Hide file tree
Showing 19 changed files with 105 additions and 38 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,17 @@ jobs:
- if: matrix.python-version == '3.12' && runner.os == 'Linux'
name: Lint
run: hatch run lint:check

- name: Run tests and track code coverage

- if: matrix.python-version == '3.12' && runner.os == 'Linux'
name: Run tests with coverage tracking
run: hatch run +py=${{ matrix.python-version }} test:cov

- uses: actions/upload-artifact@v4
- if: matrix.python-version != '3.12' || runner.os != 'Linux'
name: Run tests without tracking coverage
run: hatch run +py=${{ matrix.python-version }} test:no-cov

- if: matrix.python-version == '3.12' && runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: coverage-xml
path: coverage.xml
Expand Down Expand Up @@ -100,8 +106,6 @@ jobs:

- name: Initialize CodeQL Without Dependencies
uses: github/codeql-action/init@v3
with:
setup-python-dependencies: false

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down
25 changes: 11 additions & 14 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false
}
]
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false
}
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pytest-databases
# Pytest Databases

Reusable test fixtures for any and all databases.

Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions docs/usage/bigquery.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===========
Placeholder
===========

.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
back soon for updates.
6 changes: 6 additions & 0 deletions docs/usage/cockroachdb.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===========
Placeholder
===========

.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
back soon for updates.
6 changes: 6 additions & 0 deletions docs/usage/dragonfly.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===========
Placeholder
===========

.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
back soon for updates.
6 changes: 6 additions & 0 deletions docs/usage/elastic_search.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===========
Placeholder
===========

.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
back soon for updates.
6 changes: 6 additions & 0 deletions docs/usage/keydb.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===========
Placeholder
===========

.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
back soon for updates.
6 changes: 6 additions & 0 deletions docs/usage/mariadb.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===========
Placeholder
===========

.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
back soon for updates.
6 changes: 6 additions & 0 deletions docs/usage/mssql.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
====================
Microsoft SQL Server
====================

.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
back soon for updates.
6 changes: 6 additions & 0 deletions docs/usage/mysql.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===========
Placeholder
===========

.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
back soon for updates.
6 changes: 6 additions & 0 deletions docs/usage/oracle.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===========
Placeholder
===========

.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
back soon for updates.
6 changes: 6 additions & 0 deletions docs/usage/postgres.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===========
Placeholder
===========

.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
back soon for updates.
6 changes: 6 additions & 0 deletions docs/usage/redis.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===========
Placeholder
===========

.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
back soon for updates.
6 changes: 6 additions & 0 deletions docs/usage/spanner.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
===========
Placeholder
===========

.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
back soon for updates.
17 changes: 5 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ template = "default"
type = "virtual"

[tool.hatch.envs.test.env-vars]
PYTHONPATH = "."
PYTHONPATH = ".:src/"
PYTHONUNBUFFERED = "1"
SOURCE_DATE_EPOCH = "1580601600"

Expand All @@ -133,7 +133,7 @@ SOURCE_DATE_EPOCH = "1580601600"
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]

[tool.hatch.envs.test.scripts]
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov-report=xml"
cov = "pytest --cov=pytest_databases --cov-report=xml"
debug = "cov --no-cov -s --pdb --pdbcls=IPython.core.debugger:Pdb"
no-cov = "cov --no-cov"

Expand Down Expand Up @@ -595,7 +595,7 @@ line-length = 120
## Testing Tools

[tool.pytest.ini_options]
addopts = "-ra -q --doctest-glob='*.md'"
addopts = "--dist loadfile -n 2 -ra -q --doctest-glob='*.md'"
filterwarnings = ["ignore::DeprecationWarning:pkg_resources", "ignore::DeprecationWarning:xdist.*"]
markers = [
"mysql: MySQL Tests",
Expand All @@ -606,26 +606,19 @@ markers = [
"mssql: Microsoft SQL Server Tests",
"elasticsearch: Elasticsearch Tests",
]
minversion = "6.0"
testpaths = ["tests"]

[tool.coverage.run]
branch = true
concurrency = ["multiprocessing", "thread"]
disable_warnings = ["no-data-collected", "module-not-measured"]
concurrency = ["multiprocessing"]
disable_warnings = ["no-data-collected", "module-not-measured", "module-not-imported"]
omit = [
"_version.py", # automatically created by hatch-vcs, not in repo
"src/pytest_databases/__metadata__.py",
"tests/*",
"scripts/*",
]
parallel = true
source = ["src/pytest_databases"]
source_pkgs = ["pytest_databases"]

[tool.coverage.paths]
pytest_databases = ["src/pytest_databases"]
tests = ["tests"]

[tool.coverage.report]
# Regexes for lines to exclude from consideration
Expand Down
9 changes: 5 additions & 4 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sonar.organization=litestar-org
sonar.projectKey=litestar-org_pytest_databases
sonar.organization=litestar-api
sonar.projectKey=litestar-org_pytest-databases
sonar.python.coverage.reportPaths=coverage.xml
sonar.python.version=3.8, 3.9, 3.10, 3.11, 3.12
sonar.sourceEncoding=UTF-8
Expand All @@ -11,5 +11,6 @@ sonar.coverage.exclusions=\
tests/*.py
sonar.cpd.exclusions=\
examples/*.py, \
tests/conftest.py
sonar.projectName=PyTest Databases
tests/conftest.py, \
src/pytest_databases/docker/**/*.py
sonar.projectName=Pytest Databases
4 changes: 2 additions & 2 deletions src/pytest_databases/docker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ async def start(
)

def stop(self, name: str) -> None:
self.run_command("down", "--remove-orphans", "--volumes", "-t", "10", name)
self.run_command("down", "--volumes", "-t", "10", name)

def down(self) -> None:
if not SKIP_DOCKER_COMPOSE:
self.run_command("down", "--remove-orphans", "--volumes", "-t", "10")
self.run_command("down", "-t", "10")


@pytest.fixture(scope="session")
Expand Down

0 comments on commit 08574f8

Please sign in to comment.