Skip to content

Commit

Permalink
Merge 590b907 into 6e674f0
Browse files Browse the repository at this point in the history
  • Loading branch information
Middledot committed Jun 29, 2022
2 parents 6e674f0 + 590b907 commit a7753d4
Show file tree
Hide file tree
Showing 14 changed files with 240 additions and 195 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: codespell
on: [pull_request, push]
jobs:
codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install codespell
- run: codespell
16 changes: 8 additions & 8 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ Other changes
------
* More consistent escaping of db columns, fixes using SQL reserved keywords as field names with a function.
* Fix the aggregates using the wrong side of the join when doing a self-referential aggregation.
* Fix ``F`` funtions wrapped forgetting about ``distinct=True``
* Fix ``F`` functions wrapped forgetting about ``distinct=True``

0.16.3
------
Expand Down Expand Up @@ -468,7 +468,7 @@ New features:
* Relationships (FK/O2O/M2M)
* Callables

At this stage we only suport serialisation, not deserialisation.
At this stage we only support serialisation, not deserialisation.

For mode information, please see :ref:`contrib_pydantic`

Expand Down Expand Up @@ -593,7 +593,7 @@ Removals:
- Changed ``TextField`` to use ``LONGTEXT`` for MySQL to allow for larger than 64KB of text.
- De-duplicate index if specified on both ``index=true`` and as part of ``indexes``
- Primary Keyed ``TextField`` is marked as deprecated.
We can't guarnatee that it will be properly indexed or unique in all cases.
We can't guarantee that it will be properly indexed or unique in all cases.
- One can now disable the backwards relation for FK/O2O relations by passing ``related_name=False``
- One can now pass a PK value to a generated field, and Tortoise ORM will use that as the PK as expected.
This allows one to have a model that has a autonumber PK, but setting it explicitly if required.
Expand Down Expand Up @@ -637,7 +637,7 @@ Removals:
)
- Prefetching is done concurrently now, sending all prefetch requests at the same time instead of in sequence.
- Enabe foreign key enforcement on SQLite for builds where it was optional.
- Enable foreign key enforcement on SQLite for builds where it was optional.

0.15.2
------
Expand Down Expand Up @@ -887,7 +887,7 @@ Docs/examples:
If you define the ``__models__`` variable in ``yourapp.models`` (or wherever you specify to load your models from),
``generate_schema()`` will use that list, rather than automatically finding all models for you.

- Split model consructor into from-Python and from-DB paths, leading to 15-25% speedup for large fetch operations.
- Split model constructor into from-Python and from-DB paths, leading to 15-25% speedup for large fetch operations.
- More efficient queryset manipulation, 5-30% speedup for small fetches.

0.12.5
Expand Down Expand Up @@ -937,7 +937,7 @@ Docs/examples:
.. note::
This is a big feature change. It should not break any existing implementations.

That primary key will be accesible through a reserved field ``pk`` which will be an alias of whichever field has been nominated as a primary key.
That primary key will be accessible through a reserved field ``pk`` which will be an alias of whichever field has been nominated as a primary key.
That alias field can be used as a field name when doing filtering e.g. ``.filter(pk=...)`` etc…

We currently support single (non-composite) primary keys of any indexable field type, but only these field types are recommended:
Expand Down Expand Up @@ -972,7 +972,7 @@ Docs/examples:
0.11.13
-------
- Fixed connection retry to work with transactions
- Added broader PostgreSQL connection failiure detection
- Added broader PostgreSQL connection failure detection

0.11.12
-------
Expand Down Expand Up @@ -1136,7 +1136,7 @@ Docs/examples:

0.10.2
------
- Set single_connection to True by default, as there is known issues with conection pooling
- Set single_connection to True by default, as there is known issues with connection pooling
- Updated documentation

0.10.1
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ endif
#pylint $(checkfiles)
bandit -r $(checkfiles)
twine check dist/*
codespell $(checkfiles)

test: deps
$(py_warn) TORTOISE_TEST_DB=sqlite://:memory: pytest $(pytest_opts)
Expand Down
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Different types of tests
- ``make test_postgres_psycopg``: Runs the psycopg tests on the postgres database
- ``make test_mysql_myisam``: Runs the tests on the mysql database using the ``MYISAM`` storage engine (no transactions)
- ``make test_mysql``: Runs the tests on the mysql database
- ``make testall``: runs the tests on all 4 database types: sqlite (in memory), postgress, MySQL-MyISAM and MySQL-InnoDB
- ``make testall``: runs the tests on all 4 database types: sqlite (in memory), postgresql, MySQL-MyISAM and MySQL-InnoDB
- ``green``: runs the same tests as ``make test``, ensures the green plugin works
- ``nose2 --plugin tortoise.contrib.test.nose2 --db-module tests.testmodels --db-url sqlite://:memory: ``: same test as ``make test`` , ensures the nose2 plugin works

Expand Down
2 changes: 1 addition & 1 deletion docs/databases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ SQLite is an embedded database, and can run on a file or in-memory. Good databas

For example ``DecimalField`` has precision preserved by storing values as strings, except when doing aggregates/ordering on it. In those cases we have to cast to/from floating-point numbers.

Similarily case-insensitivity is only partially implemented.
Similarly case-insensitivity is only partially implemented.

DB URL is typically in the form of :samp:`sqlite://{DB_FILE}`
So if the ``DB_FILE`` is "/data/db.sqlite3" then the string will be ``sqlite:///data/db.sqlite`` (note the three /'s)
Expand Down
2 changes: 1 addition & 1 deletion docs/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ This can be chained if the next key is also a foreign object:

There is however one major limitation. We don't want to restrict foreign column names, or have ambiguity (e.g. a foreign object may have a field called ``isnull``)

Then this would be entirely ambigous:
Then this would be entirely ambiguous:

:samp:`{FKNAME}__isnull`

Expand Down
2 changes: 1 addition & 1 deletion examples/relations_with_unique.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This example shows how relations between models especially unique field work.
Key points in this example are use of ForeignKeyField and OneToOneField has to_field.
For other basic parts, it is the same as relation exmaple.
For other basic parts, it is the same as relation example.
"""
from tortoise import Tortoise, fields, run_async
from tortoise.models import Model
Expand Down
Loading

0 comments on commit a7753d4

Please sign in to comment.