summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: replace mock with stdlib unittest.mockOlly Cope2022-10-025-7/+6
|
* tests: drop tables created by tests that access a backend via a fixtureOlly Cope2022-10-031-2/+10
| | | | | I was seeing spurious test failures due to lack of teardown code. This is an unobtrusive fix for the problem.
* tests: use freezegun instead of frozendateOlly Cope2022-08-292-10/+6
| | | | | Recent versions of pyparsing seem to break frozendate. freezegun works smoothly and is maintained.
* Fix linter errorsOlly Cope2022-10-032-4/+6
|
* docs: fix sphinx configuration warningOlly Cope2022-10-041-1/+1
|
* setup: switch to attr: syntax for version specificationOlly Cope2022-10-052-26/+2
|
* tox: fix linter confirmation and reinstate Python 3.7Olly Cope2022-10-052-7/+8
|
* merge new toposort algorithmOlly Cope2022-08-294-172/+180
|\
| * Reformat code with BlackOlly Cope2021-05-231-29/+12
| |
| * topological sort: don't raise an error for non-existent dependenciesOlly Cope2021-05-161-1/+3
| |
| * topological sort/tests: fix spurious error for edges that are not in inputOlly Cope2021-05-161-1/+4
| |
| * topological sort: stricter typehintsOlly Cope2021-05-161-0/+1
| |
| * topological sort/tests: simplify edge notation and invert senseOlly Cope2021-05-161-21/+22
| | | | | | | | I find it less confusing to read "AB" as "A depends on B".
| * topological sort: more fixes for cycle detectionOlly Cope2021-05-161-15/+18
| |
| * topological sort: move tests into separate moduleOlly Cope2021-05-162-90/+74
| |
| * topological sort: raise CycleError if unsorted items remain at endOlly Cope2021-05-151-6/+17
| |
| * Use a priority queue to improve ordering of resultOlly Cope2021-05-151-8/+16
| |
| * topological sort: add extra test assertion to ensure dependency order correctOlly Cope2021-05-151-0/+2
| |
| * topological sort: fix loop detectionOlly Cope2021-05-151-5/+16
| |
| * topological sort: ensure dependency graph passed to topological_sort is validOlly Cope2021-05-151-1/+2
| |
| * Add new topological sort algorithmOlly Cope2021-05-152-69/+56
| | | | | | | | | | This algorithm is simpler and is designed to be better at maintaining the original sort order of the input migrations.
| * topological sort: add test for sort stabilityOlly Cope2021-05-021-1/+14
| |
* | tox: add python 3.10, remove 3.6, 3.7Olly Cope2022-08-291-6/+4
| |
* | Bump version number for devOlly Cope2021-05-231-1/+1
| |
* | Added tag v7.3.2-release for changeset 97c69a15fd21Olly Cope2021-05-230-0/+0
| |
* | Bump version number for releasev7.3.2-releaseOlly Cope2021-05-231-1/+1
| |
* | Mark changelog with release date for v7.3.2Olly Cope2021-05-231-2/+2
| |
* | Update changelogOlly Cope2021-05-231-0/+5
| |
* | Fix access to StepCollector from imported yoyo.migrations.stepOlly Cope2021-05-231-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | Fixes https://todo.sr.ht/~olly/yoyo/79 The old logic relied on a string comparison of the module path. This broke when Python's importlib switched to using absolute paths. It's safer to simply look for a ``__yoyo_collector__`` attribute in the caller frame's namespace, which is injected by Migration.load. I also chose to rename this attribute from 'collector' to __yoyo_collector__ to reduce the risk of collision with a user defined variable.
* | Add test for reading migrations from a relative pathOlly Cope2021-05-231-0/+14
| | | | | | | | This fails in Python 3.8.10, see https://todo.sr.ht/~olly/yoyo/79
* | Reformatted source with blackOlly Cope2021-05-232-26/+15
| |
* | Fix typo in error messageOlly Cope2021-05-231-1/+1
|/
* read_migrations: sort migrations when a glob pattern source is passedOlly Cope2021-05-021-2/+2
|
* Reformat source with BlackOlly Cope2021-05-021-55/+20
|
* Support for snowflake connect parametersCharles Julian Knight2021-04-071-1/+1
| | | | | | | | | | | | For the snowflake database, I ended up needing to configure the role option. This change passes all query options to 'snowflake.connector', allowing you to set any of the parameters snowflake supports. The full list is available here: https://docs.snowflake.com/en/user-guide/python-connector-api.html#connect Julian
* Fix test failure with mysql backendOlly Cope2021-04-061-1/+1
|
* Fix mypy identified errorsOlly Cope2021-04-062-8/+8
|
* Update changelogOlly Cope2021-04-061-0/+8
|
* tests: fix deadlocked test in postgresqlOlly Cope2021-01-241-0/+1
|
* tests: refactor test fixtures to use `backend` pytest fixtureOlly Cope2021-01-242-80/+82
| | | | | | | Using the `backend` pytest fixture instead of calling `get_backend` removes the need to add cleanup code in each and every test. This has become necessary because sqlite3 connections have changed to use a shared cache, and so if the db is not cleaned up between tests we get spurious failures.
* tests: replace `@with_migrations` decorator with equivalent context managerOlly Cope2021-01-244-412/+416
| | | | | | | | | | | | | This has been causing problems because pytest fixtures don't work well with function decorators. If `with_migrations` doesn't correctly wrap the decorator using `functools.wraps`, pytest fixtures cannot be used by the decorated test function. But if we do use `functools.wraps`, pytest fixtures assumes the extra function argument is a fixture name and then fails either because it conflicts with the builtin `tmpdir` fixture or, if we rename it, because such a fixture doesn't exist.
* tests: rename yoyo.tests.dburi to dburi_sqlite3Olly Cope2021-01-243-44/+45
|
* Open sqlite3 connections using uri modeOlly Cope2021-01-243-3/+5
| | | | | | | | | This appears to be the only way to pass additional options to sqlite3, including the ?cache=shared parameter. The previous changeset to enable cache sharing was broken, but appeared to work because sqlite3 interpreted ':memory:?cache=shared' as a file name, so the test suite was running against a file-backed database.
* tests: remove accidentally duplicated test functionOlly Cope2021-01-241-15/+0
|
* mergeOlly Cope2021-01-1817-50/+283
|\
| * readme: remove note about repository migrationOlly Cope2021-01-181-2/+0
| |
| * Bump version number for devOlly Cope2021-01-181-1/+1
| |
| * Added tag v7.3.1-release for changeset 30068294eda6Olly Cope2021-01-180-0/+0
| |
| * Bump version number for releasev7.3.1-releaseOlly Cope2021-01-181-1/+1
| |
| * Mark changelog with release date for v7.3.1Olly Cope2021-01-181-2/+2
| |