Skip to content
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

Reverse lookup: some fixes for PR #1

Merged
merged 41 commits into from
Dec 19, 2022

Conversation

powellnorma
Copy link

No description provided.

dantownsend and others added 30 commits September 1, 2022 19:36
* Add named exports for column module

* fix linter

Co-authored-by: Daniel Townsend <dan@dantownsend.co.uk>
* Cockroach config for tests.

* Added feedback from piccolo-orm#607

* New CockroachDB engine.

* No more extension=[] !

* Running tests as postgres.

* Initial build for CockroachDB

* Running tests.

* Run workflow.

* Naming consistency. Making roughly equivalent to Postgres.

* Timestamp bug.

* DDL for Cockroach. for_engines decorator.

* Progress.

* Added database prep for cluster settings.

* Tests passing.

* Passing migration type checks.

* Cockroach ALTER COLUMN TYPE moved outside of transaction until #49351 is solved.

* New test helpers.

* Fixtures.

* Cockroach specific stuff.

* Array tests.

* Column tests.

* JSON tests.

* M2M tables. as_list is effected by cockroachdb/cockroach#71908

* Skip test for numeric.

* Pool test.

* Transaction tests.

* Related readable tests.

* Save tests.

* To dict tests.

* JOIN tests.

* Output tests.

* Raw tests.

* Repr tests.

* Select tests.

* "As string" tests.

* Cockroach having trouble with one specific operator.

* Skipping until CRDB issue is resolved. Should work though!

* Minor updates.

* Test dump load. Other CRDB things.

* Migration manager tests.

* ALTER tests.

* SQL Generator tests.

* Serialization tests.

* Test helpers.

* Cockroach Specific stuff.

* Numerics all the same for CRDB.

* Cockroach specific stuff.

* Cleanup.

* Skipping timestamp tests.

* DDL resolution stuff for Cockroach.

* WIP.

* Cohesion and special test tables for Cockroach.

* WIP

* Special table for Cockroach.

* Removed hack.

* Should pass now.

* Removed some debug stuff.

* LGTM stuff.

* Feedback.

* Feedback.

* Feedback.

* More readable "postgres" or "cockroach.

* Added Cockroach overrides for COLUMN_TYPE_MAP, COLUMN_DEFAULT_PARSER

* Restore SmallInt functionality for Cockroach.

* Restored type() comparison for reflection / generators.

* Updated to latest Cockroach release.

* Cleanup.

* Cleanup.

* Build stuff.

* Cockroach Serial now uses unique_rowid() as default value always instead of DEFAULT.

* Removed first_id() test helper.

* Time Travel queries using AS OF SYSTEM TIME

* Added documentation.

* Small docs fix.

* Test update.

* Refactored out unnecessary code because we use unique_rowid() as default for Cockroach Serial and BigSerial.

* BIGINT instead of BIGSERIAL for Cockroach.

* LGTM stuff

* LGTM...

* Made compatible with older Python versions.

* Get Cockroach passing without Python 3.9 stuff.

* Removed unused variable.

* Fixed test for SQLite.

* Re-add Python 3.7 for CRDB + new CRDB version.

* Consolidated cockroach_skip() into engines_skip() everywhere.

* Re-add SQLite DDL.

* Moved back to original engine DDL selector.

* Reverted mistake in test suite.

* Remove migration that should not be available.

* Moving back to postgres_only for specific test. Probably cannot detect engine type at this stage.

* postgres_only() to engine_only()

* Set sane default for JSONB because we override column_type in JSON for some engines.

* Ran isort.

* Black being obnoxious, part 1.

* Black being obnoxious Part 2.

* Flake8

* Black

* Flake8

* Flake8

* Flake8

* isort

* Flake8

* Flake8

* Added alternate test names for duplicates to remove F811

* Added alternative name.

* mypy

* mypy

* mypy

* mypy

* mypy

* mypy

* mypy

* mypy

* mypy

* Cockroach: Now testing latest stable and upcoming release.

* Cockroach: Testing only v22.2

* Cockroach version documentation.

* Engine detection now based on type because CockroachEngine inherits PostgresEngine.

* postgres_only is now engines_only("postgres", "cockroach") because CockroachEngine was always tested as a child class.

* Updated to Cockroach 22.2 beta.

* isort.

* assertAlmostEqual for Decimal test. Docs update.

* Linter

* Cockroach 22.2 Beta 2.

* Added notes about special Column types for Cockroach

* version pin xpresso, so integration tests pass

* add small section about running cockroach in contributing docs

* fix typo

Co-authored-by: Daniel Townsend <dan@dantownsend.co.uk>
* Fix a couple of type conflicts

* Add references to replacement functions for deprecated functions

* format with black

Co-authored-by: Daniel Townsend <dan@dantownsend.co.uk>
…piccolo-orm#638)

* Documentation: as_of() clause (Added with CockroachDB).

* Added reference to formats accepted.
* remove `run` from transaction docs

* add a note about why we use `MyTable._meta.db`
* add Python 3.11 to setup.py

* add Postgres 15 and Python 3.11, drop Postgres 9.6 from GitHub actions

* update min Postgres version in `PostgresEngine`
* Fix create_pydantic_model for nullable JSON and JSONB

* validation outside try statement, and simple tests for None values in pydantic model added

* remove env file

* minor tweak - use `assertIsNone` instead of `assert`

It gives us slightly better output if an exception occurs.

Co-authored-by: Daniel Townsend <dan@dantownsend.co.uk>
* Playground: Option to use ipython profile

* Playground: use conf params

* remove `type: ignore` for iPython import

* don't show migrations warning if running the playground

* remove mouse support for now

* updated examples in playground to use await, and using coloured prints

The iPython shell supports top level await, so may as well use the async queries.

* added comment about how to set custom iPython colours

* tweaked docstring

Co-authored-by: Daniel Townsend <dan@dantownsend.co.uk>
dantownsend and others added 10 commits November 8, 2022 20:59
…rm#667)

* adds docs for required fields and `create_pydantic_model`

* add docs for subclassing Pydantic models

* fix integration test failures

Need to version pin `di` for now with `xpresso`.

* fix linter
* Add error check for order_by mixin columns

* fix linter warning, and add simple test

Co-authored-by: Daniel Townsend <dan@dantownsend.co.uk>
Make it work when the ForeignKey is named differently than the
referenced Table.
@sinisaos sinisaos merged commit c4f2777 into sinisaos:reverse_lookup Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants