Commit graph

12 commits

Author SHA1 Message Date
Antoine R. Dumont (@ardumont)
a1000dfeb7
requirements-test: Pin pytest to < 7.0.0
Related to T3916
2022-02-07 16:10:49 +01:00
Antoine Lambert
bf7d44db3c mypy: Fix errors with release >= v0.900 2021-06-09 14:02:23 +02:00
Antoine Lambert
8933544521 Remove no longer used legacy Lister API and update CLI options
Legacy Lister classes from the swh.lister.core mdule are no longer
used in swh-lister codebase so it is time to remove them.

Also remove lister CLI options related to legacy Lister API.

As a consequence, the following requirements are no longer needed:
arrow, SQLAlchemy, sqlalchemy-stubs and testing.postgresql.

Closes T2442
2021-02-02 15:54:55 +01:00
tenma
565e7423e3 Reimplement Bitbucket lister using new Lister API
The new lister has incremental and full listing capability.
It can request the Bitbucket API in anonymous and HTTP basic authentication
modes. Rate-limiting is not aggressive and is handled.
2021-01-20 15:28:34 +01:00
Antoine R. Dumont (@ardumont)
d2f4781669
requirements: Rework dependencies
Without the following, and the new swh.scheduler bump, some dependencies were
no longer resolved properly.

Related to T2746
2020-11-23 15:39:51 +01:00
Antoine R. Dumont (@ardumont)
2e9bb5388b
requirements-test.txt: Explicit swh.core[db] as test requirement
instead of pytest-postgresql which is a transitive dependency from swh.core[db]

Related to T2746
2020-11-20 17:26:25 +01:00
Nicolas Dandrimont
c9963d4302 Use the new names for the swh.scheduler test fixtures 2020-07-09 17:06:50 +02:00
Stefano Zacchiroli
974f80f966 typing: minimal changes to make a no-op mypy run pass 2019-10-28 15:35:21 +01:00
David Douard
e3c0ea9d90 implement listers as plugins
Listers are declared as plugins via the `swh.workers` entry_point.

As such, the registry function is expected to return a dict with the
`task_modules` field (as for generic worker plugins), plus:

- `lister`: the lister class,
- `models`: list of SQLAlchemy models used by this lister,
- `init` (optionnal): hook (callable) used to initialize the lister's state
  (typically, create/initialize the database for this lister).
  If not set, the default implementation creates database tables (after
  optionally having deleted exisintg ones) according to models declared in
  the `models` register field.

There is no need for explicitely add lister task modules in the main
`conftest` module, but any new/extra lister to be tested must be registered
(the tested lister module must be properly installed in the test environment).

Also refactor a bit the cli tools:
- add support for the standard --config-file option at the 'lister' group
  level,
- move the --db-url to the 'lister' group,
- drop the --lister option for the `swh lister db-init` cli tool:
  initializing (especially with --drop-tables) the database for a single
  lister is unreliable, since all tables are created using a sibgle MetaData
  (in the same namespace).
2019-09-03 15:02:24 +02:00
David Douard
6957f3c435 update dep on swh-scheduler>0.0.39 and pytest<4 (tests)
pytest<4 because of https://github.com/pytest-dev/pytest/issues/4641
2019-01-16 16:39:03 +01:00
David Douard
9da0bd26eb setup: kill remaining nose whims to be around 2018-10-30 12:17:25 +01:00
Nicolas Dandrimont
2922b68570 Clean up dependencies to enable tests on build 2017-10-30 17:04:49 +01:00