Skip to content
Snippets Groups Projects
  1. Sep 03, 2021
  2. Sep 02, 2021
    • Antoine Lambert's avatar
      misc/coverage: Revamp and improve archive coverage widget in homepage · d0335365
      Antoine Lambert authored
      Add new origins types that we now archived.
      
      Update source code provider logos to png only in order to ease the
      integration of future ones
      
      Split origins in multiple categories: listed, legacy and deposited.
      
      Add global origins counts per origin type.
      
      Add detailed origins counts for each listed forge, those details are
      hidden by default and can be displayed on demand through collapsible
      elements.
      
      Remove dead code.
      
      Related to T3127
      d0335365
    • Antoine Lambert's avatar
      package.json: Upgrade dependencies · 2a6ce0bc
      Antoine Lambert authored
      2a6ce0bc
    • Antoine Lambert's avatar
      origin_save: Filter out visit type with no scheduler load-* task type · 9ef590cb
      Antoine Lambert authored
      In order to ease the integration of new visit types for the "Save code now"
      service, filter out those with no associated task type in scheduler db.
      
      It means that a new visit type can be added to "Save code now" implementation
      but it will not be available until the associated scheduler load task type
      gets created. It enables to test the new visit type in dev environments
      and deploy safely to production if the associated scheduler load task type
      did not get created yet.
      
      Also remove the internal endpoint to get savable visit types, those can
      be simply added in Django template.
      
      As that change broke a lot of tests due to scheduler being previously
      mocked, most of the tests related to "Save code now" got improved by
      removing the mocks and using the swh_scheduler pytest fixture.
      
      Related to D5992
      9ef590cb
  3. Aug 30, 2021
  4. Aug 27, 2021
  5. Aug 26, 2021
  6. Aug 25, 2021
  7. Aug 23, 2021
  8. Aug 20, 2021
  9. Aug 19, 2021
    • Antoine Lambert's avatar
      e18d30e5
    • Antoine Lambert's avatar
      tests: Ensure they all can be run with multiple hypothesis examples · 87cc9e04
      Antoine Lambert authored
      When running swh-web tests using 'make test-full', multiple hypothesis examples
      are provided as test inputs instead of a single one when running 'make test'.
      In that case some tests were failing mostly due to the fact they were not stateless
      between test runs.
      
      That commit fixes those tests execution and ensures stateless test runs by:
      
        - turning some hypothesis strategies into stateless ones
      
        - turning the archive_data fixture into a function scope one
      
        - using subtest fixture from pytest-subtesthack when it is required to reset
          the archive_data fixture for a test between hypothesis example runs
      
      As a consequence, tests will be longer to execute as global state will be reseted
      between each test.
      
      Nevertheless, metadata related tests are still failing when running with multiple
      hypothesis examples, fix will be handled in next commit.
      
      Related to T1695
      87cc9e04
  10. Aug 18, 2021
  11. Aug 17, 2021
  12. Aug 16, 2021
  13. Aug 13, 2021
    • Kumar Shivendu's avatar
      origin/search: Add support for search query language · c5259fce
      Kumar Shivendu authored
      This diff introduces a new config parameter "enable_ql"
      
      If it's set to yes/True, the swh-search query language can be used for the archive search
      
      While using the /origin/search API endpoint, "use_ql=true" can be
      passed to use the url_pattern as the search query language input
      c5259fce
  14. Aug 11, 2021
  15. Jul 21, 2021
  16. Jul 20, 2021
  17. Jul 19, 2021
  18. Jul 09, 2021
    • Antoine Lambert's avatar
    • Antoine Lambert's avatar
      assets: Upgrade highlight.js to version 11.x · 66b3a6c4
      Antoine Lambert authored and Antoine Lambert's avatar Antoine Lambert committed
      This new major version of highlight.js brings notable improvements in
      terms of language parsing.
      
      As the github theme we were using has been updated to match the current
      github.com one, we now use a custom theme adapted from the old github
      one to keep the same look and feel for code highlighting as before.
      
      Closes T3368
      66b3a6c4
    • vlorentz's avatar
      apidoc: Remove explicit recursion used in visit_field_list · 3bfc6942
      vlorentz authored
      The visit is already recursive, we don't need to add this explicit
      recursion.
      
      Children nodes can be dispatched to visit_field_name and
      visit_field_body instead.
      3bfc6942
    • vlorentz's avatar
      apidoc: Stop parsing docutils trees with regexps on its pseudo-XML · dd2e5e26
      vlorentz authored
      Motivation:
      
      This commit started as a simple change: I wanted to replace:
      
      ```
      `<type> <IRI>`
      ```
      
      with:
      
      ```
      ``<type> <IRI>``
      ```
      
      Unfortunately, this syntax looks too much like XML for its own good,
      so it was stripped by the `process_paragraph` method, because it reads
      the docutils pseudo-XML representation and strips every tag it doesn't
      know about.
      (I'm saying pseudo-XML, because my poor `<type> <IRI>` string was not
      escaped with XML entities, so it was in fact undistinguishable from
      actual XML tags).
      
      Changes:
      
      Therefore, stops using the XML-like string representation of docutils
      trees, and visits tree nodes directly instead.
      Conveniently, this is already in a node visit, so we can reuse that;
      simply by iterating recursively instead of stopping the recursion
      as soon as we see a known node (ie. the visitors actually visited
      only nodes very close to the root).
      
      This means that we needed to add methods to handle each node type,
      and produce its ReST output. And since we don't have a global view
      anymore, we need to return the produced ReST instead of appending
      directly to `self.data["description"]`, because handlers of parent
      nodes may need to re-indent their children's output.o
      
      This results in cleaner code (and also closer to what we expect from
      a visitor transformer), so it's a win too.
      
      This has some other nice side-effects:
      
      * our custom role code is now neatly restricted in `visit_problematic`,
        so it can't overflow, because docutils runs `visit_problematic` with
        *only* the role's string as child
      * it detects unexpected nodes, such as the `title_reference` roles,
        which is usually produced when accidentally using single-backquotes
        instead of double-backquotes to wrap inline code blocks (it happens
        a lot when one is used to markdown)
      dd2e5e26
  19. Jul 08, 2021
  20. Jul 07, 2021
  21. Jul 06, 2021
  22. Jul 05, 2021
Loading