Commit Graph

207 Commits

Author SHA1 Message Date
Giacomo Leidi
3874acf247
Failures (#183)
* Update beautifulsoup4 to 4.11.

* Update docker image.

* Add type annotations.

* Publish where you can and notify errors.

* Add tests for partial publishing.
2023-05-22 12:53:32 +02:00
Giacomo Leidi
6b72b2630f
Update tweepy to 4.13. 2023-04-18 01:16:16 +02:00
Giacomo Leidi
28446c3401
Update .envrc. 2023-01-03 18:55:50 +01:00
Giacomo Leidi
1d3e5047e8
Update development-environment-with-guix.md 2023-01-03 18:54:19 +01:00
Giacomo Leidi
1c9a95db84
Update development-environment-with-guix.md 2023-01-03 16:46:35 +01:00
Giacomo Leidi
1678e836c9
Update development-environment-with-guix.md 2023-01-03 16:42:19 +01:00
Giacomo Leidi
a445eedaea
Switch to TWC DockerHub account (#182) 2022-12-20 22:36:38 +01:00
Simone Robutti
370e00d187
decouple dataclasses from models (#181)
* 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

* moved publications to dataclasses module

* implemented import pattern on dataclasses to prevent circular imports

* removed redundant fetch

* removed unused query

* split build_publications

* split failed_publications

* removed redundant query functions

* split publication retrieve

* split all read functions

* removed redundant write function

* fixed lock
2022-12-11 14:15:04 +01:00
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
Giacomo Leidi
081ca87857
Update dependencies. (#177) 2022-11-13 14:31:03 +01:00
Giacomo Leidi
cf9ffd2149 query: Add get_event_publications. 2022-10-26 00:43:25 +02:00
Giacomo Leidi
04f29e37e4
Drop Guix CI for master and PRs. (#176) 2022-10-20 19:16:57 +02: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
Simone Robutti
63a30bb483
refactor coordinators (#171)
* introduced CommandConfig object

* added dry_run for start command

* added test to start_dry_run

* added dry_run recap

* fixed import

* improved printing

* fixed zulip debug info

* improved recap dry-run print

* moved coordinator classes into dedicated package

* removed unused init

* divided event coordinators from recap coordinators

* added some docstrings
2022-09-24 16:46:03 +02:00
Giacomo Leidi
2d328a30bf
Update development-environment-with-guix.md 2022-08-16 01:04:51 +02:00
Giacomo Leidi
4ce6c7b171
Update dependencies. (#170)
* Update Guix commit.

* Update dependencies

* Drop CONNECTION_NAME hack.
2022-07-26 22:23:47 +02:00
Simone Robutti
b6e203577e
add dry run (#172)
* introduced CommandConfig object

* added dry_run for start command

* added test to start_dry_run

* added dry_run recap

* fixed import

* improved printing

* fixed zulip debug info

* improved recap dry-run print
2022-07-25 19:26:47 +02:00
Simone Robutti
9d71ef36b9
add dry run (#169)
* introduced CommandConfig object

* added dry_run for start command

* added test to start_dry_run

* added dry_run recap

* fixed import

* improved printing

* fixed zulip debug info

* improved recap dry-run print
2022-07-12 07:39:56 +02:00
Giacomo Leidi
cf2fabefb4 Release v0.3.2. 2022-06-05 19:12:08 +02:00
Giacomo Leidi
9810c9d5a5
Move Guix packages to a channel. (#168)
* Move Guix packages to a channel.

This patch moves the core Mobilizon Reshare package definition to
https://github.com/fishinthecalculator/mobilizon-reshare-guix .
2022-05-26 22:46:59 +02:00
Giacomo Leidi
b66c94c8a2
Add publish command. (#167)
* Add publish command.

* publish: Add tests.

* Add list-platforms and test-configuration.

* Update Guix dependencies.

* Move publishing of events and publications to retry.
2022-05-17 23:14:52 +02:00
Giacomo Leidi
7f3ce9a55a Release v0.3.1. 2022-04-19 21:53:02 +02:00
Giacomo Leidi
a9b90be963 Hotfix release script. 2022-04-19 21:52:45 +02:00
Simone Robutti
94c85d8b48
introduce locale (#165)
* introduced locale option

* added tests
2022-04-11 18:13:35 +02:00
Giacomo Leidi
4e40a1979e
Add completion scripts. (#166) 2022-04-11 08:36:10 +02:00
Giacomo Leidi
5f51d68c82 Release v0.3.0. 2022-04-04 11:35:24 +02:00
Giacomo Leidi
05a8c9d5b0
Update docker-compose.yml 2022-03-30 21:21:31 +02:00
Giacomo Leidi
981fcf0486
Fix recap (#161)
* Drop dependency on python-telegram-bot, as it's not used.

* Align default templates.

This patch tries to bring some consistency to the default templates and
fixes some small bug in the output of some formatters.
2022-03-26 22:46:33 +01:00
Giacomo Leidi
002399161d
Pull publish (#157)
* Add pull command.

* Add publish command.

* Enforce start's old semantics.

* Add pull test cases:

- Pull with no events anywhere
- Pull with one event on mobilizon and none on the db
- Pull with one event on mobilizon and another on the db
- Pull with one event on mobilizon and the same event on the db

* Add pull tests:

- Sequence: pull->start
- Sequence: start->pull
- Sequence: pull->new event on mobilizon -> pull

* manifest.scm: Add cloc.

* query: read: Prefer return list to generators.

* tests: pull: Actually test that models are written to the DB.
2022-03-22 21:16:34 +01:00
Simone Robutti
3e7b9097a4
Update twitter.tmpl.j2 (#160)
* Update twitter.tmpl.j2

* Update twitter_recap.tmpl.j2
2022-03-15 21:52:14 +01:00
Giacomo Leidi
af45f2b5ea
Run CI for pull requests. (#159) 2022-03-13 21:51:25 +01:00
Giacomo Leidi
f8a614750c
Upstream python-tweepy. (#155)
* Upstream python-tweepy.

* Update requests to 2.26.

* Remove python-requests-2.25 as it's not needed.

* Add guide to update dependencies.

* Fix link.
2022-03-12 11:29:56 +01:00
Giacomo Leidi
e558034194 Release v0.2.3. 2022-03-07 10:20:13 +01:00
Simone Robutti
1217b17326
fix event retry (#152)
* added twitter error handling

* added facebook tests

* added header format test

* added multiple newlines check

* added test list command

* fixed commands structure

* fixed event retry

* fixed publication retry

* added publication tests

* removed unused option

* fixed list begin/end window

* added test retry failures

* linting

* refactored sender

* added timezone freeze

* fixed facebook-sdk and beatifulsoup errors
2022-03-06 10:41:02 +01:00
Simone Robutti
8b81ceedd0
Merge pull request #154 from Tech-Workers-Coalition-Italia/set_timezone
set timezone
2022-03-04 10:57:01 +01:00
Simone Robutti
dae9dfd889 set timezone to CUT 2022-03-04 10:56:20 +01:00
Simone Robutti
cb0fe7b5fc
set timezone to Rome (#153) 2022-03-04 10:45:11 +01:00
Simone Robutti
f04942eefe
test commands (#151)
* added twitter error handling

* added facebook tests

* added header format test

* added multiple newlines check

* added test list command

* fixed commands structure
2022-03-02 08:59:57 +01:00
Simone Robutti
420f823dd4
platform tests (#150)
* added twitter error handling

* added facebook tests

* added header format test

* added multiple newlines check
2022-03-02 08:59:49 +01:00
Giacomo Leidi
9c77afa456 Restore tests in Guix package. 2022-03-01 23:42:32 +01:00
Giacomo Leidi
db659e9cdc Release v0.2.2. 2022-02-24 00:06:54 +01:00
Giacomo Leidi
ca878454b4 mobilizon-reshare.scm: Hotfix applied to the image
This patch allows mobilizon-reshare to be installed in a Guix profile.
2022-02-24 00:04:20 +01:00
Giacomo Leidi
5afbcd2192 Release v0.2.1. 2022-02-23 23:10:38 +01:00
magowiz
8ff6555c60
Feature/autogenerate api doc (#147)
* initial commit with generate-doc.sh script and generated documentation, added pdoc3 dependency

* fixed import errors due to missing SECRETS_FOR_DYNACONF environment value, updated doc, force/overwrite if documentation exists

* moved pdoc3 dependency from dependencies to dev-dependencies

* removed generated doc

* add api-documentation (pdoc3 target directory) to .gitignore

* switch to sphinx which supports better typehints notation

* remove module path prefix from methods name

* add support for typehints

* remove autogenerated files

* ignore autogenerated files

* fixed typo in .gitignore

* added empty _static folder to avoid warning on build

* initial commit with generate-doc.sh script and generated documentation, added pdoc3 dependency

* fixed import errors due to missing SECRETS_FOR_DYNACONF environment value, updated doc, force/overwrite if documentation exists

* moved pdoc3 dependency from dependencies to dev-dependencies

* removed generated doc

* switch to sphinx which supports better typehints notation

* remove autogenerated files

* remove gui browser documentation open, use /bin/sh instead of /bin/bash

* remove windows/dos documentation generation make, drop windows/dos support

Co-authored-by: Giacomo Leidi <goodoldpaul@autistici.org>
2022-02-23 17:29:37 +01:00
Giacomo Leidi
529f83825e
Pave the way for using only EventPublications outside of storage module. (#149)
* Move `EventPublication.from_orm` to `storage.query.converter`.

Co-authored-by: Simone Robutti <simone.robutti@protonmail.com>
2022-02-23 17:26:13 +01:00
Simone Robutti
bda4b8ee0d
fix timezone in test (#145)
* added timezone fixture

* Make output dependent on local timezone.

* Fix non deterministic behavior in html to text conversion.

Co-authored-by: Giacomo Leidi <goodoldpaul@autistici.org>
2022-02-22 11:28:16 +01:00
Giacomo Leidi
e003cf9a90
README.md: Add Pypi link. (#148) 2022-02-21 15:26:03 +01:00
Giacomo Leidi
d19f3ac5ca
scheduler.py: Fix intervals. (#146)
APScheduler uses 0-indexed week days.
2022-02-20 12:45:50 +01:00
Simone Robutti
b0e88a9e1f
fixed missing whitespace (#143) 2022-02-16 15:54:10 +01:00
Simone Robutti
11de1e1213
fixed facebook format (#142) 2022-02-16 13:51:00 +01:00