Skip to content
Snippets Groups Projects
  1. Aug 19, 2021
    • Antoine Lambert's avatar
      api/metadata: Fix issues detected with hypothesis · a50e0c5a
      Antoine Lambert authored
      Running metadata tests with multiple hyothesis examples uncovered those
      issues in api-1-raw-extrinsic-metadata-swhid Web API view:
      
        - ExtendedSWHID.from_string must be used to parse extended SWHID.
      
        - link-next URL for pagination was invalid.
      
        - next_page_token must be encoded before providing it to urlsafe_b64encode.
      a50e0c5a
    • 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
  2. Aug 18, 2021
  3. Aug 17, 2021
  4. Aug 16, 2021
  5. 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
  6. Aug 11, 2021
  7. Jul 21, 2021
  8. Jul 20, 2021
  9. Jul 19, 2021
  10. 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
  11. Jul 08, 2021
  12. Jul 07, 2021
  13. Jul 06, 2021
  14. Jul 05, 2021
  15. Jul 01, 2021
  16. Jun 29, 2021
  17. Jun 28, 2021
    • Jayesh's avatar
      Search inside the origin branches with name · e18341dd
      Jayesh authored
      This code enables the possibility to search for branch names inside
      the browse origin branches page.A newly added search input is connected
      to a JS function and that reloads the page on press of return.
      Filtering with name is happening at the storage level.
      
      Related to T3157
      e18341dd
  18. Jun 25, 2021
  19. Jun 15, 2021
  20. Jun 11, 2021
  21. Jun 09, 2021
Loading