Skip to content

Commit 08574f8

Browse files
authored
chore: documentation updates (#32)
1 parent a618d62 commit 08574f8

19 files changed

+105
-38
lines changed

.github/workflows/ci.yaml

+9-5
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,17 @@ jobs:
5656
- if: matrix.python-version == '3.12' && runner.os == 'Linux'
5757
name: Lint
5858
run: hatch run lint:check
59-
60-
- name: Run tests and track code coverage
59+
60+
- if: matrix.python-version == '3.12' && runner.os == 'Linux'
61+
name: Run tests with coverage tracking
6162
run: hatch run +py=${{ matrix.python-version }} test:cov
6263

63-
- uses: actions/upload-artifact@v4
64+
- if: matrix.python-version != '3.12' || runner.os != 'Linux'
65+
name: Run tests without tracking coverage
66+
run: hatch run +py=${{ matrix.python-version }} test:no-cov
67+
68+
- if: matrix.python-version == '3.12' && runner.os == 'Linux'
69+
uses: actions/upload-artifact@v4
6470
with:
6571
name: coverage-xml
6672
path: coverage.xml
@@ -100,8 +106,6 @@ jobs:
100106

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

106110
- name: Perform CodeQL Analysis
107111
uses: github/codeql-action/analyze@v3

.vscode/launch.json

+11-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5-
"version": "0.2.0",
6-
"configurations": [
7-
{
8-
"name": "Python Debugger: Current File",
9-
"type": "debugpy",
10-
"request": "launch",
11-
"program": "${file}",
12-
"console": "integratedTerminal",
13-
"justMyCode": false
14-
}
15-
]
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Python Debugger: Current File",
6+
"type": "debugpy",
7+
"request": "launch",
8+
"program": "${file}",
9+
"console": "integratedTerminal",
10+
"justMyCode": false
11+
}
12+
]
1613
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# pytest-databases
1+
# Pytest Databases
22

33
Reusable test fixtures for any and all databases.
44

File renamed without changes.

docs/usage/bigquery.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
===========
2+
Placeholder
3+
===========
4+
5+
.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
6+
back soon for updates.

docs/usage/cockroachdb.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
===========
2+
Placeholder
3+
===========
4+
5+
.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
6+
back soon for updates.

docs/usage/dragonfly.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
===========
2+
Placeholder
3+
===========
4+
5+
.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
6+
back soon for updates.

docs/usage/elastic_search.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
===========
2+
Placeholder
3+
===========
4+
5+
.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
6+
back soon for updates.

docs/usage/keydb.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
===========
2+
Placeholder
3+
===========
4+
5+
.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
6+
back soon for updates.

docs/usage/mariadb.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
===========
2+
Placeholder
3+
===========
4+
5+
.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
6+
back soon for updates.

docs/usage/mssql.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
====================
2+
Microsoft SQL Server
3+
====================
4+
5+
.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
6+
back soon for updates.

docs/usage/mysql.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
===========
2+
Placeholder
3+
===========
4+
5+
.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
6+
back soon for updates.

docs/usage/oracle.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
===========
2+
Placeholder
3+
===========
4+
5+
.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
6+
back soon for updates.

docs/usage/postgres.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
===========
2+
Placeholder
3+
===========
4+
5+
.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
6+
back soon for updates.

docs/usage/redis.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
===========
2+
Placeholder
3+
===========
4+
5+
.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
6+
back soon for updates.

docs/usage/spanner.rst

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
===========
2+
Placeholder
3+
===========
4+
5+
.. todo:: You've stumbled upon a beautiful work in progress! Please excuse our unfinished work and check
6+
back soon for updates.

pyproject.toml

+5-12
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ template = "default"
124124
type = "virtual"
125125

126126
[tool.hatch.envs.test.env-vars]
127-
PYTHONPATH = "."
127+
PYTHONPATH = ".:src/"
128128
PYTHONUNBUFFERED = "1"
129129
SOURCE_DATE_EPOCH = "1580601600"
130130

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

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

@@ -595,7 +595,7 @@ line-length = 120
595595
## Testing Tools
596596

597597
[tool.pytest.ini_options]
598-
addopts = "-ra -q --doctest-glob='*.md'"
598+
addopts = "--dist loadfile -n 2 -ra -q --doctest-glob='*.md'"
599599
filterwarnings = ["ignore::DeprecationWarning:pkg_resources", "ignore::DeprecationWarning:xdist.*"]
600600
markers = [
601601
"mysql: MySQL Tests",
@@ -606,26 +606,19 @@ markers = [
606606
"mssql: Microsoft SQL Server Tests",
607607
"elasticsearch: Elasticsearch Tests",
608608
]
609-
minversion = "6.0"
610609
testpaths = ["tests"]
611610

612611
[tool.coverage.run]
613612
branch = true
614-
concurrency = ["multiprocessing", "thread"]
615-
disable_warnings = ["no-data-collected", "module-not-measured"]
613+
concurrency = ["multiprocessing"]
614+
disable_warnings = ["no-data-collected", "module-not-measured", "module-not-imported"]
616615
omit = [
617616
"_version.py", # automatically created by hatch-vcs, not in repo
618617
"src/pytest_databases/__metadata__.py",
619618
"tests/*",
620619
"scripts/*",
621620
]
622621
parallel = true
623-
source = ["src/pytest_databases"]
624-
source_pkgs = ["pytest_databases"]
625-
626-
[tool.coverage.paths]
627-
pytest_databases = ["src/pytest_databases"]
628-
tests = ["tests"]
629622

630623
[tool.coverage.report]
631624
# Regexes for lines to exclude from consideration

sonar-project.properties

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
sonar.organization=litestar-org
2-
sonar.projectKey=litestar-org_pytest_databases
1+
sonar.organization=litestar-api
2+
sonar.projectKey=litestar-org_pytest-databases
33
sonar.python.coverage.reportPaths=coverage.xml
44
sonar.python.version=3.8, 3.9, 3.10, 3.11, 3.12
55
sonar.sourceEncoding=UTF-8
@@ -11,5 +11,6 @@ sonar.coverage.exclusions=\
1111
tests/*.py
1212
sonar.cpd.exclusions=\
1313
examples/*.py, \
14-
tests/conftest.py
15-
sonar.projectName=PyTest Databases
14+
tests/conftest.py, \
15+
src/pytest_databases/docker/**/*.py
16+
sonar.projectName=Pytest Databases

src/pytest_databases/docker/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ async def start(
125125
)
126126

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

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

134134

135135
@pytest.fixture(scope="session")

0 commit comments

Comments
 (0)