Skip to content

Commit 8a13189

Browse files
authored
docs: update documentation url (#1982)
* chore: update docs and make file * fix make check error * chore: remove double `--cov-append` flags in make file * chore: update make file
1 parent 65bc23e commit 8a13189

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

Makefile

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ check: build _check
3333
_check:
3434
ruff format --check $(checkfiles) || (echo "Please run 'make style' to auto-fix style issues" && false)
3535
ruff check $(checkfiles)
36-
mypy $(checkfiles)
3736
#pylint -d C,W,R $(checkfiles)
38-
#bandit -r $(checkfiles)make
39-
twine check dist/*
37+
$(MAKE) _codeqc
4038

4139
style: deps _style
4240
_style:
@@ -46,6 +44,10 @@ _style:
4644
lint: build _lint
4745
_lint:
4846
$(MAKE) _style
47+
$(MAKE) _codeqc
48+
49+
codeqc: build _typehints
50+
_codeqc:
4951
mypy $(checkfiles)
5052
bandit -c pyproject.toml -r $(checkfiles)
5153
twine check dist/*
@@ -60,16 +62,16 @@ test_sqlite_regexp:
6062
$(py_warn) TORTOISE_TEST_DB=sqlite://:memory:?install_regexp_functions=True pytest --cov-report= $(pytest_opts)
6163

6264
test_postgres_asyncpg:
63-
python -V | grep PyPy || $(py_warn) TORTOISE_TEST_DB="asyncpg://postgres:$(TORTOISE_POSTGRES_PASS)@127.0.0.1:5432/test_\{\}" pytest $(pytest_opts) --cov-append --cov-report=
65+
python -V | grep PyPy || $(py_warn) TORTOISE_TEST_DB="asyncpg://postgres:$(TORTOISE_POSTGRES_PASS)@127.0.0.1:5432/test_\{\}" pytest $(pytest_opts) --cov-report=
6466

6567
test_postgres_psycopg:
66-
python -V | grep PyPy || $(py_warn) TORTOISE_TEST_DB="psycopg://postgres:$(TORTOISE_POSTGRES_PASS)@127.0.0.1:5432/test_\{\}" pytest $(pytest_opts) --cov-append --cov-report=
68+
python -V | grep PyPy || $(py_warn) TORTOISE_TEST_DB="psycopg://postgres:$(TORTOISE_POSTGRES_PASS)@127.0.0.1:5432/test_\{\}" pytest $(pytest_opts) --cov-report=
6769

6870
test_mysql_myisam:
69-
$(py_warn) TORTOISE_TEST_DB="mysql://root:$(TORTOISE_MYSQL_PASS)@127.0.0.1:3306/test_\{\}?storage_engine=MYISAM" pytest $(pytest_opts) --cov-append --cov-report=
71+
$(py_warn) TORTOISE_TEST_DB="mysql://root:$(TORTOISE_MYSQL_PASS)@127.0.0.1:3306/test_\{\}?storage_engine=MYISAM" pytest $(pytest_opts) --cov-report=
7072

7173
test_mysql:
72-
$(py_warn) TORTOISE_TEST_DB="mysql://root:$(TORTOISE_MYSQL_PASS)@127.0.0.1:3306/test_\{\}" pytest $(pytest_opts) --cov-append --cov-report=
74+
$(py_warn) TORTOISE_TEST_DB="mysql://root:$(TORTOISE_MYSQL_PASS)@127.0.0.1:3306/test_\{\}" pytest $(pytest_opts) --cov-report=
7375

7476
test_mysql_asyncmy:
7577
$(MAKE) deps_with_asyncmy
@@ -78,18 +80,18 @@ test_mysql_asyncmy:
7880
$(MAKE) deps
7981

8082
test_mssql:
81-
$(py_warn) TORTOISE_TEST_DB="mssql://sa:$(TORTOISE_MSSQL_PASS)@127.0.0.1:1433/test_\{\}?driver=$(TORTOISE_MSSQL_DRIVER)&TrustServerCertificate=YES" pytest $(pytest_opts) --cov-append --cov-report=
83+
$(py_warn) TORTOISE_TEST_DB="mssql://sa:$(TORTOISE_MSSQL_PASS)@127.0.0.1:1433/test_\{\}?driver=$(TORTOISE_MSSQL_DRIVER)&TrustServerCertificate=YES" pytest $(pytest_opts) --cov-report=
8284

8385
test_oracle:
84-
$(py_warn) TORTOISE_TEST_DB="oracle://SYSTEM:$(TORTOISE_ORACLE_PASS)@127.0.0.1:1521/test_\{\}?driver=$(TORTOISE_ORACLE_DRIVER)" pytest $(pytest_opts) --cov-append --cov-report=
86+
$(py_warn) TORTOISE_TEST_DB="oracle://SYSTEM:$(TORTOISE_ORACLE_PASS)@127.0.0.1:1521/test_\{\}?driver=$(TORTOISE_ORACLE_DRIVER)" pytest $(pytest_opts) --cov-report=
8587

8688
_testall: test_sqlite test_postgres_asyncpg test_postgres_psycopg test_mysql_myisam test_mysql test_mysql_asyncmy test_mssql
8789

8890
coverage report
8991

9092
testall: deps _testall
9193

92-
ci: build _check _testall
94+
ci: check _testall
9395

9496
docs: deps
9597
rm -fR ./build
@@ -99,5 +101,5 @@ build: deps
99101
rm -fR dist/
100102
poetry build
101103

102-
publish: deps build
104+
publish: deps _build
103105
twine upload dist/*

docs/CONTRIBUTING.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,14 @@ Different types of tests
115115
- ``make test_mysql``: Runs the tests on the mysql database
116116
- ``make testall``: runs the tests on all 4 database types: sqlite (in memory), postgresql, MySQL-MyISAM and MySQL-InnoDB
117117
- ``green``: runs the same tests as ``make test``, ensures the green plugin works
118-
- ``nose2 --plugin tortoise.contrib.test.nose2 --db-module tests.testmodels --db-url sqlite://:memory: ``: same test as ``make test`` , ensures the nose2 plugin works
119118

120119

121120
Things to be aware of when running the test suite
122121
---------------------------------------------------
123122
- Some tests always run regardless of what test suite you are running (the connection tests for mysql and postgres for example, you don't need a database running as it doesn't actually connect though)
124123
- Some tests use hardcoded databases (usually sqlite) for testing, regardless of what DB url you specified.
125124
- The postgres driver does not work under Pypy so those tests will be skipped if you are running under pypy
126-
- You can run only specific tests by running `` py.test <testfiles>`` or ``green -s 1 <testfile>``
125+
- You can run only specific tests by running ``pytest <testfiles>`` or ``green -s 1 <testfile>``
127126
- If you want a peek under the hood of test that hang to debug try running them with ``green -s 1 -vv -d -a <test>``
128127
- ``-s 1`` means it only runs one test at a time
129128
- ``-vv`` very verbose output

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ psycopg = ["psycopg[pool,binary] (>=3.0.12,<4.0.0)"]
3030
asyncodbc = ["asyncodbc (>=0.1.1,<1.0.0); python_version < '4.0'"]
3131

3232
[project.urls]
33+
documentation = "https://tortoise.github.io"
3334
homepage = "https://github.com/tortoise/tortoise-orm"
3435
repository = "https://github.com/tortoise/tortoise-orm.git"
35-
documentation = "https://tortoise-orm.readthedocs.io"
3636

3737
[tool.poetry]
3838
requires-poetry = ">=2.0"

0 commit comments

Comments
 (0)