Skip to content
Snippets Groups Projects
  1. Nov 26, 2020
  2. Nov 24, 2020
  3. Nov 23, 2020
  4. Nov 20, 2020
  5. Nov 19, 2020
  6. Oct 30, 2020
  7. Oct 29, 2020
    • Tenma's avatar
      core tests: disambiguate arg 'request' through typing · 12fa6f26
      Tenma authored
      Both requests.Request and _pytest.FixtureRequest objects are passed to
      test fixtures as argument 'request'. This hurts readability.
      Adding typing annotations makes it clear which one is meant.
      12fa6f26
  8. Oct 28, 2020
  9. Oct 23, 2020
  10. Oct 22, 2020
  11. Oct 21, 2020
  12. Oct 19, 2020
  13. Oct 07, 2020
  14. Oct 02, 2020
    • Antoine R. Dumont's avatar
      config: Deprecated SWHConfig in favor of load_from_envvar function · 82a47667
      Antoine R. Dumont authored
      That new function declares exactly what happens today during our configuration
      loading (for loader/lister/indexer/... and rpc services in general not for the
      CLIs which will be dealt with later).
      
      Loads and parses the yaml configuration file out of the SWH_CONFIG_FILENAME
      environment variable. Allowing eventual dict enrichment with default
      configuration if provided.
      
      Related to T1532
  15. Sep 30, 2020
    • vlorentz's avatar
      SortedList: Don't inherit from UserList. · d230cb3d
      vlorentz authored
      A class should only inherit from UserList if the type of data it presents is
      the same as the data in the 'data' attribute, which isn't true here.
      
      This means, for example, that SortedList.__contains__ checked if the value
      is in self.data, which always returns False (unless unlucky, but then it
      returns True while it shouldn't).
      
      By removing this inheritance, methods that are no longer implemented no longer
      default to a buggy implementation.
      v0.3.1
      d230cb3d
  16. Sep 25, 2020
    • Nicolas Dandrimont's avatar
      Add specific celery task arguments to metadata sent to systemd-journald · d46d4c7a
      Nicolas Dandrimont authored
      We used to log all task arguments, which was a bit too much for the logging
      pipeline to handle. Now that a lot of tasks arguments have been "canonicalized",
      we can go back to logging some specific arguments directly.
      
      Use the opportunity to drop an unused argument and improve the documentation of
      these logging-related functions.
      d46d4c7a
  17. Sep 23, 2020
  18. Sep 22, 2020
    • Antoine R. Dumont's avatar
    • Antoine Lambert's avatar
      bfca0a8d
    • David Douard's avatar
      Do not automagically add click cmd from swh.cli.subcommands · 08788aa3
      David Douard authored
      the idea is now to be a bit more explicit, and expect thoses commands
      to have the main `swh` click group as parent.
      
      Then the swh.cli.subcommands entrypoint hooks only have to load the
      declared cli modules.
      
      So we now expect to:
      
      - use swh.core.cli.swh as parent group when declaring
        sub-groups/commands in a swh package.
      - the swh.cli.subcommand entrypoint to only refer the module rather than
        the click group/command, ie. have:
      
        '''
          [swh.cli.subcommands]
          name = swh.path.to.cli_module
        '''
      
        instead of:
      
        '''
          [swh.cli.subcommands]
          name = swh.path.to.cli_module:click_command
        '''
      
      A backward compatilibility mech is provided: if the loaded entrypoint
      object is indeed a click command, auto add it to the main swh group.
      08788aa3
    • David Douard's avatar
      Split db-init cli in 2 (init and create) and move them under 'swh db' · 56d505f3
      David Douard authored
      The idea it to have the 'swh db create' command to create the database
      and prepare it by executing SQL -superuser- files, i.e. SQL files which
      execution requires superuser permissions -- typically install languages
      or extensions.
      
      Then the 'swh db init' execute the initialization SQL files that do not
      require superuser permissions.
      
      Also get rid of the previous (unused) 'swh db init' command.
      56d505f3
  19. Sep 18, 2020
  20. Sep 17, 2020
  21. Sep 16, 2020
    • Nicolas Dandrimont's avatar
      Make swh db init and swh db-init behavior much closer to one another · 6b983c28
      Nicolas Dandrimont authored
      While named similarly, these two CLI utilities used to take quite a different
      approach to doing the same thing.
      
      They now both call out the same initialization function for a given module. The
      main difference is now the source of information for what databases to
      initialize: `swh db init` uses the SWH_CONFIG_FILENAME configuration file, while
      `swh db-init` only uses its own command line arguments.
      6b983c28
Loading