55 Commits

Author SHA1 Message Date
Adrian Moennich
6397e2ea39 Release 3.0rc2 2021-07-09 13:16:54 +02:00
Adrian Moennich
ab77c69b5f Exclude Python 3.10 in python_requires 2021-07-09 12:01:12 +02:00
Adrian Moennich
075250fb40 Add README files to all plugins 2021-06-28 17:33:08 +02:00
Adrian Moennich
79481aed27 Release 3.0rc1 2021-06-25 23:17:21 +02:00
Adrian Moennich
b063e00955 Move search export schems back to the indico core 2021-06-18 14:08:32 +02:00
Adrian Moennich
6d1303c761 LiveSync: Allow overriding disabled cat runs on the CLI 2021-06-03 14:32:07 +02:00
Adrian Moennich
25af285d6e LiveSync: Remove chunking 2021-05-27 19:30:18 +02:00
Adrian Moennich
ca2e860415 Citadel: Make thread counts configurable 2021-05-20 11:18:35 +02:00
Adrian
ec3d167175
Add new search infrastructure (#125)
* Enable CI on search branch

* LiveSync: Clean titles in verbose iterator

* LiveSync: Refactor initial export batching

And make the batch size configurable via commandline option

* LiveSync/Citadel: Support Citadel as the sync backend

Co-authored-by: penelope <penelope@fnal.gov>

* LiveSync/Citadel: Upgrade to python3

* LiveSync/Citadel: Update backend and refactor schemas

* LiveSync/Citadel: Add placeholders and filters/aggregations

* LiveSync/Citadel: Add range filters

* LiveSync/Citadel: Update the schemas and initial indexing

* LiveSync/Citadel: Refactor tests

* LiveSync/Citadel: Add status force list to upload retries

* LiveSync/Citadel: Update clean_old_entries filter

* LiveSync/Citadel: Update file headers

* LiveSync/Citadel: Add allowed methods in citadel retry

Commit more often in batches

* Citadel: Rename livesync_citadel to citadel

It's no longer just livesync

* Citadel: Move metadata to setup.cfg

* Citadel: Remove tika import

* Citadel: Mock things using the pytest way

* Citadel: Run pyupgrade

* Citadel: Run tests in CI

* Citadel: Use 'search' plugin category

* Citadel: Improve settings form

* Citadel: Fix model and alembic revision

* Citadel: Make livesync backend unique

* Citadel: Fix is_group error

* Citadel: Include schema attribute in the record context

* Citadel: Exclude content from Attachment schema

* Citadel: Use cached category path from context

* Citadel: Fix passing category tree cache to schemas

* Citadel: Remove unused imports

* Citadel: Be more strict with category cache

If the cache exists, we can expect ALL categories to be in there

* Citadel: Fix duplicate _get_identifiers call

* Citadel: Simplify record uploading

* ci: Allow `search` as valid upstream branch

* Add support for attachment file uploading

* Update file id mapping

* Update cli to a unique backend

* Merge file column migration with previous revision

* Refactor citadel and remove obsolete parts

* Citadel: Cache search_owner_role setting

* Citadel: Dump before parallelization

* Citadel: Do not retry on 500, use lower delays

* Remove change_type from upload_record

* Define a maximum number of pages

ES limits results up to 10,000 hits

* Add missing linebreak

* Citadel: Include category_id in search data

* Convert the aggregations to an object

* Raise request exceptions

* Move query formatting methods to util

* Remove search owner role setting

* Move the object type to filters

* Fix optional string based matches

Update tests

* Citadel: Include start/end dt for subcontribs

* Citadel: Add tests for schemas

* LiveSync: Pass force flag to backends

* Citadel: Skip already-exported entries unless forced

Like this resuming a failed initial export is as easy as just
running the command again.

* LiveSync: eager-load subcontrib timetable entry

* Citadel: Remove obsolete context

* Citadel: Do not upload empty files

* LiveSync: Fix changing root category protection mode

* Citadel: Fix access logic for empty ACLs

Also add unit tests for this

* Citadel: Add contrib/subcontrib duration to schemas

* LiveSync: Add verbose mode

* Remove record dumping if it's being deleted

* Simplify run_initial_export

* Citadel: Print change type in verbose mode

* Citadel: Ignore create-and-delete changes

* LiveSync: Fix tests

* LiveSync: Move citadel-specific code to citadel plugin

* Citadel: Make id mapping entries unique

* Citadel: Refactor http logic

* Citadel: Use 1:1 relationship for id mapping

* Citadel: Use more sensible argument order in id mapping

* LiveSync: Correctly handle (sub) contribution changes

- track contribution time changes
- cascade contribution changes to subcontributions

* Simplify livesync uploader entries

* LiveSync: Improve naming

* LiveSync: Fix attachment handling

Also fix cascading of contribution changes during simplification step

* Citadel: Fix enum display in error message

* LiveSync: Cascade creation to children

This is necessary e.g. when cloning events because in that case we only
have the event creation record but nothing for the elements inside that
event.

To avoid sending the same thing twice (e.g. a contribution) chunking now
only happens on the simplified change level, not on the record level, to
ensure all recorded changes are taken into account when simplifying them
to creation/updates/deletions.

* LiveSync: Allow deferring initial export done flag

In case of Citadel we want to require a file export as well before
starting to process the queue to avoid cases where we are still doing
an initial file upload but queue runs start happening and we would
end up sending old files as well.

* Citadel: Upload files after a queue run

* Refactor checks whether queue runs are possible

Also add an `indico citadel reset` command to throw away all local
citadel data

* Citadel: Re-upload attachments whose file changed

* LiveSync: Fix title in initial export progress

* Citadel: Make max file size configurable

* Check if a livesync plugins is properly configured

And use it to check whether citadel has url and token set

* LiveSync/Debug: Fix errors and use schemas

* Citadel: Refactor verbose printing

* LiveSync: Remove unnecessary default value

* Update the search API to support multiple types

* Move reset cli from citadel to livesync core

* Citadel: Rename model/table

* Citadel: Remove unnecessary timestamp column

* Citadel: Remove some overly verbose comments

* Citadel: Commit explicitly outside create()

* Citadel: Do not send None inside _data

* LiveSync: Fix handling notes

* Citadel: Integrate placeholders with Indico (#117)

* LiveSync: Fix query spam in user.is_system check

* Citadel: Use new result schemas

* Update search schemas

* Citadel: Various improvements/fixes

* Citadel: Integrate filters with Indico & update placeholders (#119)

* Move dump schemas from core to livesync

* Use type_format only in citadel code

* Citadel: Strip HTML from descriptions/notes

* Citadel: Show message if some fails failed to upload

* Add category id filter

* Citadel: Add some debug logging during file uploads

* Citadel: Allow filtering by category name

* Update title and type placeholders

* Citadel: Add -f as --force shortcut

* Fix quote dividers in a multi placeholder query

* Use all worker threads all the time

* Close responses from uploads

Hopefully this fixes running out of fds after ~240k uploads

* Add some more debug logging

* Fix incorrect output

* Rename type placeholder

* Supported quotes for exact matches

* LiveSync: Fix cascading issues

- do not cascade implicit changes to deleted attachments
- correctly cascade changes involving session-linked objects

* Improve error handling

* Citadel: Do not enable queue runs after max-size usage

* LiveSync: Add setting to disable queue runs

* LiveSync: Check category blacklist in initial export

* LiveSync: Add schema tests

* LiveSync: Handle and cascade location changes

* Move query formatting outside the f-string

* Refactor the search query parser

Ensures the keyword positioning isn't changed and correctly
sanitizes placeholder content.

* Escape whitelisted placeholders

Co-authored-by: Adrian <adrian@planetcoding.net>

* Strip the result query

* Remove placeholder operator

* Add default operator

* Update tests

* Add support for sort options (#123)

* Add support for sort options
* Rename SearchFilter to SearchOption
* Rename sort option keys

* Fix error with lazy strings in filter labels

* Revert "Enable CI on search branch"

This reverts commit 2ec3f650eed02cd6c72ea336fa92df6927b8da39.

Co-authored-by: Pedro Lourenço <pedro.lourenco@cern.ch>
Co-authored-by: Michal Kolodziejski <michal.kolodziejski@cern.ch>
Co-authored-by: Penelope Constanta <penelope@fnal.gov>
2021-05-07 14:47:59 +00:00
Adrian Moennich
e5a3842bf3 LiveSync/Debug: Remove MARCXML code 2021-04-19 18:26:30 +02:00
Adrian Moennich
09523e81fd Move indico.util.struct.* -> indico.util.* 2021-02-08 15:33:20 +01:00
Adrian Moennich
baad04bd4a Move metadata to setup.cfg
related to indico/indico#4680
2021-01-20 17:33:20 +01:00
Adrian Moennich
490f86b498 Merge branch '2.3-maintenance' 2021-01-05 14:31:54 +01:00
Indico Team
81802aa297 Happy new year 2021 🎆 2021-01-05 12:30:39 +01:00
Indico Team
01406b3d2a Fix empty lines after file headers 2020-11-12 14:47:29 +01:00
Indico Team
f2755b4be4 Run modernize, pyupgrade, autoflake and isort 2020-11-12 14:47:29 +01:00
Adrian Moennich
9d1c6268a0 Bump versions to 3.0-dev 2020-11-12 14:46:40 +01:00
Indico Team
43c703e1b4 Happy new year 2020 🎆 2020-01-16 11:32:21 +01:00
Indico Team
4b39714dbf Update license headers (and add missing) 2019-05-08 15:41:55 +02:00
Adrian Moennich
04219821e9 Update package licenses 2019-05-08 15:41:55 +02:00
Adrian Moennich
c5cb95d0ed Release 1.0 (for indico 2.0) 2018-01-12 14:20:58 +01:00
Indico Team
44e2d03c3b Happy new year 2018 🎆 2018-01-09 14:03:14 +01:00
Adrian Moennich
bb6606a200 Prepare 2.0rc1 release 2017-11-10 12:55:25 +01:00
Adrian Moennich
286fa6359c Prepare 2.0a1 release 2017-10-20 15:04:03 +02:00
Adrian Moennich
47acd2ed39 Add package descriptions 2017-10-19 18:21:39 +02:00
Adrian Moennich
4992b1b3a9 Rename plugins to indico-plugin-* 2017-10-17 17:29:13 +02:00
Adrian Moennich
f9dbb1d281 Add meta package containing all plugins 2017-10-17 17:29:13 +02:00
Adrian Moennich
b8aca1b58a isort everything 2017-09-14 17:47:45 +02:00
Adrian Moennich
5bc931713e Require indico 2.0, bump versions to 1.0.dev0 2017-06-30 12:03:27 +02:00
Adrian Moennich
702e4b1dc3 Delete empty translation templates 2017-06-26 11:09:10 +02:00
Adrian Moennich
d0c6370f2e Remove useless platforms from setup.py 2017-05-09 15:56:52 +02:00
Adrian Moennich
3601a18be3 Require indico 1.9.10 2017-04-10 16:27:34 +02:00
Indico Team
4515d8c0a6 Happy new year 2017! 2017-01-10 15:03:10 +01:00
Indico Team
a450292342 Update translation files 2016-08-29 11:00:27 +02:00
Pedro Ferreira
230848dbd9 LiveSync: add sessions, use proper DB queries 2016-08-12 11:34:50 +02:00
Indico Team
b16a368ba1 Happy new year 2016!
Bump license headers to 2016
2016-01-01 04:59:45 +01:00
Adrian Moennich
95a0f3ba22 LiveSync/Debug: Fix debug output 2015-07-08 22:48:02 +02:00
Indico Team
8930bfd486 Updated *.pot files for i18n (extract) 2015-04-01 11:12:35 +02:00
Indico Team
203dfb2fad Added translation files from Transifex (fr_FR)
Author: Pedro Ferreira <pedro.ferreira@cern.ch>
2015-04-01 11:12:35 +02:00
Indico Team
79c567eab0 Unify file headers and bump copyright year to 2015 2015-01-22 12:07:32 +01:00
Adrian Moennich
84f4bd8816 Rename ~IndicoPlugin.hidden => .configurable 2015-01-19 13:34:08 +01:00
Ilias Trichopoulos
9932656558 Use PluginCategory enum 2015-01-12 10:53:00 +01:00
Ilias Trichopoulos
a912a226b7 Assign categories to plugins 2015-01-08 17:51:27 +01:00
Adrian Moennich
c59e98c96a Update setup.py urls 2014-11-26 10:01:05 +01:00
Adrian Moennich
a2aa6f8c70 LiveSync: Rename agent.py to backend.py 2014-11-20 11:36:20 +01:00
Adrian Moennich
e4e7c5bd1f LiveSync: Rename agents to backends 2014-11-20 11:21:52 +01:00
Adrian Moennich
9c1f76a2c2 Remove obsolete gitignore/license files 2014-11-19 16:05:44 +01:00
Adrian Moennich
dd56e15b6c Update agent last_run 2014-11-17 18:02:13 +01:00
Adrian Moennich
7943ffebfe Remove obsolete argument 2014-11-13 10:29:34 +01:00
Adrian Moennich
15ff205086 import Uploader from indico_livesync 2014-11-13 10:14:37 +01:00