Commit Graph

23 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
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
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 a9b90be963 Hotfix release script. 2022-04-19 21:52:45 +02:00
Giacomo Leidi 4e40a1979e
Add completion scripts. (#166) 2022-04-11 08:36:10 +02: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
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 d19f3ac5ca
scheduler.py: Fix intervals. (#146)
APScheduler uses 0-indexed week days.
2022-02-20 12:45:50 +01:00
Giacomo Leidi 3ef8b1f97b
Python scheduler docker image (#134)
* Move scheduler.py into scripts/ .

* docker: Python scheduler image.

* Update channels-lock.scm.

* Use tortoise 0.18.1 and aerich 0.6.2.

* Use fishinthecalculator/publish-docker-image-action@v0.1.10 .

* Make intervals configurable.

* Add platforms to README.md .
2022-02-05 18:46:02 +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
Giacomo Leidi e109106af9
Use test script everywhere in the pipeline. (#130) 2022-01-24 22:34:52 +01:00
Simone Robutti 7aa1587b2b moved run tests to script 2022-01-20 11:58:44 +01:00
Giacomo Leidi 8569a903f1
Run CI tests for every push to master (#123)
* workflows: Separate release workflow from main.
2022-01-05 23:52:25 +01:00
Giacomo Leidi 43d653f37c
Update guix package definition after core-updates merge. (#122) 2022-01-03 20:14:31 +01:00
Giacomo Leidi f273873f67
docker: mobilizon-reshare: Upstream dynaconf. (#115) 2021-12-08 21:11:41 +01:00
Giacomo Leidi 227ce22d57
scripts: Add mobilizon-reshare.sh. (#106)
* scripts: Add mobilizon-reshare.sh.

This script lets you run mobilizon-reshare commands from your git
checkout. This is very useful for debugging new features or in general
just to have a quick feedback loop from your modifications.

Example usage:

$ scripts/mobilizon-reshare.sh inspect all
2021-11-28 16:42:42 +01:00
Giacomo Leidi a91e72c3ef mobilizon-reshare.git: Disable test_format_event.
These tests somehow depend on the system timezone. While we try and make
them reproducible, they'll have to be disabled in prod since they
prevent the image from building.
2021-11-12 02:40:50 +01:00
Giacomo Leidi ba3eef4341
Docker image (#84)
* Add [guix](https://guix.gnu.org/) package.

This enables:

- [direnv](https://direnv.net/) integration to setup and tear down
  a suitable development environment;
- if you're not a direnv user you can always
  `guix environment -l guix.scm` to spawn a shell
  with all the necessary dependencies;
- Export of Mobilizon Reshare and its dependencies
  to one of the formats supported by `guix pack`. Right now they are:

    + tarball       Self-contained tarball, ready to run on another machine
    + squashfs      Squashfs image suitable for Singularity
    + docker        Docker image ready for 'docker load'
    + deb           Debian archive installable via dpkg/apt

* Add docker image and docker-compose.yml.

* Add Github CI workflow.
2021-10-31 01:55:25 +02:00
Giacomo Leidi bbf1ad7350 release.sh: Force POSIX compliance. 2021-09-28 11:38:13 +02:00
Giacomo Leidi 6654d13ed0
publishers: Add Zulip publisher. (#62)
* - publishers: Add Zulip publisher.
- README.md.: Add Zulip.
- LICENSE: `fold -s LICENSE | sed 's/ *$//g' > l; mv l LICENSE`

* tests: publishers: Test Zulip publisher.

* publishers: templates: Update Zulip template.

* zulip: Add more tests.

* release.sh: Safer publication.

* tests: publishers: Move zulip specific fixtures to test_zulip.py
2021-09-26 20:12:06 +02:00
tinoilcotechino fa32af4b09
Add release.sh. (#53)
Co-authored-by: Giacomo Leidi <goodoldpaul@autistici.org>
2021-08-31 00:10:48 +02:00