Simone Robutti
ddc706e201
Add publication crud ( #178 )
...
* fixed parsing bug
* implemented events and publications endpoints
split endpoints by entity
removed credentials
* add pagination (#179 )
* added pagination
* integrated pagination with tortoise
* added test for publications
* removed converter file
* updated dependencies
2022-12-07 21:46:57 +01:00
Simone Robutti
44340fde8f
Introduced FastAPI and Postgres support ( #173 )
...
* added poc
* added check for sqlite db
* added events test
* draft docker-compose-test.yml
* improved docker-compose
* added support for postgres migrations
* add documentation
* added some qol to migrations
* added migration generation script
* removed settings.toml
* waiting for postgress in script
* commented script
* added sample web config
* fixed tests
* mock memory db
* reviewed PR
2022-10-14 22:11:27 +02:00
magowiz
45802ecbdd
Feature/optimizing download ( #118 )
...
* add column last_update_time
* save last_update_time in event db record
* use id + updatedAt for comparison instead of mobilizon_id, this will treat updated events like new ones
* rework event selection/comparison to include unpublished with updates to ones need to be saved
* added update for unpublished events
* tests: test_update: Add create_unpublished_events tests.
* Move `MobilizonEvent.to_model` to `storage.query`
* Move `MobilizonEvent.from_model` to `storage.query`
* Move `MobilizonEvent.compute_status` to `storage.query`
* Move `publishers.exception.EventNotFound` to `storage.query.exceptions`
2022-02-09 00:54:56 +01:00
Giacomo Leidi
1f1ff2e5c2
Debug image ( #131 )
...
* config: get_settings_files_paths: Return first existing path.
* tests: Set SETTINGS_FOR_DYNACONF at import time.
* config: get_settings_files_paths: Log config path.
* manifest.scm: Add docker-compose.
* build_docker_image.sh: Allow building debug image.
* storage: db: Use the same configuration for Tortoise and Aerich.
* Distribuite migration queries.
* storage: implement_db_changes: Use pkg_resources.
2022-01-26 10:11:16 +01:00
magowiz
86e698271c
add intermediate variable since aerich doesn't play nice with functions as configuration entrypoint
2021-12-18 12:54:09 +01:00
magowiz
e836e51ee4
fixed exit on migration exception
2021-12-14 22:37:49 +01:00
magowiz
c27a18cc17
completed chain, handling exception
2021-12-07 16:58:12 +01:00
magowiz
e6f25178a5
handle aerich migrations not found
2021-12-07 12:10:32 +01:00
magowiz
14bd3afa5b
move aerich conf to storage.db
2021-12-05 18:37:35 +01:00
magowiz
6cb1f3eedd
changed name of __implement_db_changes__ to _implement_db_changes and using logging facility for printing starting update database
2021-12-05 17:11:24 +01:00
magowiz
f77e11fd9e
add aenrich with migration initialized and auto-upgrade on start
2021-12-04 19:34:00 +01:00
magowiz
1f27f2f78c
add aerich upgrade before init
2021-12-04 17:55:43 +01:00
Giacomo Leidi
1efa191771
Query refactoring ( #102 )
...
* Rename query modules.
* storage: save_publication_report: Create publications.
* Remove placeholder PublicationStatus.UNSAVED
* Minor fixes.
2021-11-24 23:58:06 +01:00
Giacomo Leidi
ed8f752fe6
Make logs a little bit more informative. ( #100 )
2021-11-20 15:53:38 +01:00
Simone Robutti
4dc1e4080a
fix publisher deactivation ( #93 )
...
* filtering publications with inactive publishers
* filtering publications with inactive publishers
* WIP: Generate publications at runtime.
TODO:
- change `MobilizonEvent.compute_status`'s contract and break everything
- while we're at it we should remove `PublicationStatus.WAITING`
- test `storage.query.create_publications_for_publishers`
* cli: inspect_events: Unnest if-then-else.
* publishers: abstract: Remove `EventPublication.make`.
* fixed tests
* split query.py file
* added tests for get_unpublished_events
* added tests
* more tests
* added start test
* main: start: Remove filter_publications_with_inactive_publishers.
Co-authored-by: Giacomo Leidi <goodoldpaul@autistici.org>
2021-11-11 15:18:04 +01:00
Simone Robutti
2c8063cf4a
rename everything ( #50 )
...
* fixed visualization
* simplified tests
* split into files
* refactored test expected publications
* split update tests
* expanded specifications and tests
* added event_status window tests
* fixed 'all' command
* renamed everything
* fixed uppercase
2021-08-16 10:49:52 +02:00