Skip to content
Snippets Groups Projects
  1. Apr 28, 2021
    • Antoine Lambert's avatar
      tox: Add sphinx environments to check sane doc build · d77606e9
      Antoine Lambert authored
      Enable to check package documentation can be built without producing
      sphinx warnings.
      
      The sphinx environment is designed to be used in continuous integration
      in order to prevent breaking documentation build when committing changes.
      
      The sphinx-dev environment is designed to be used inside a full swh
      development environment.
      
      Related to T3258
      d77606e9
    • Antoine Lambert's avatar
      origin_save: Use API endpoint to submit save request in Web UI form · f9b0b666
      Antoine Lambert authored
      The "Save code now" Web UI form was using an internal dedicated endpoint
      to submit an origin save request.
      
      That endpoint is redundant with the /origin/save Web API one so drop
      it and use Web API instead.
      
      The internal endpoint was there to validate the CSRF token injected
      by Django but the /origin/save already has a rate limit of 10 POST
      requests per hour to prevent abuse.
      f9b0b666
    • Antoine R. Dumont's avatar
      Fix malformatted date value when null · 2fb5a2e7
      Antoine R. Dumont authored
      They are rendered as an epoch date instead of not being displayed. The following
      bypasses the transformation if the value is null. In effect, such value should no longer
      be displayed.
      
      Related to T3296
      Verified
      2fb5a2e7
    • Antoine Lambert's avatar
      tests/api/graph: Ensure tests pass with all requests-mock versions · 50c6b1f0
      Antoine Lambert authored
      requests-mock recently changed its way to match URLs, paths are now
      quoted when registering mocked URLs.
      
      As Web API graph endpoint send HTTP requests to the Graph service
      with SWHIDs in URL paths (containing ':' characters), those must
      also be quoted or recent requests-mock will not find the registered
      mocked URLs.
      
      Also ensure tests still pass with older requests-mock versions.
      
      See https://github.com/jamielennox/requests-mock/commit/f072845
      50c6b1f0
  2. Apr 27, 2021
  3. Apr 26, 2021
  4. Apr 23, 2021
  5. Apr 22, 2021
  6. Apr 21, 2021
  7. Apr 20, 2021
    • Antoine Lambert's avatar
      common/highlightjs: Turn some global variables into functions · 2f83416d
      Antoine Lambert authored
      The _hljs_languages* global variables content rely on reading a JSON file
      located through Django static finders.
      
      As a side effect, when the module is imported, the JSON file is located
      then read.
      
      When the DJANGO_SETTINGS_MODULE environment variable is not set, the
      module import will fail as the JSON file could not be located.
      
      So avoid to execute that JSON loading code when importing the module
      by turning the global variables into functions.
      
      The purpose is to avoid import errors when running sphinx autodoc.
      2f83416d
  8. Apr 19, 2021
  9. Apr 16, 2021
    • Antoine Lambert's avatar
      assets/webapp-utils: Add SWHID validation in search inputs · f3f1b7c8
      Antoine Lambert authored
      Check a SWHID entered in a search input is valid by sending a request
      to the resolve endpoint of the Web API.
      
      If the SWHID is not valid, precise parsing error will be extracted from
      the Web API response and displayed in the Web UI to indicate the search
      form can not be validated.
      
      Related to T3247
      v0.0.297
      f3f1b7c8
  10. Apr 15, 2021
  11. Apr 14, 2021
  12. Apr 13, 2021
  13. Apr 09, 2021
  14. Apr 08, 2021
  15. Apr 07, 2021
  16. Apr 02, 2021
  17. Apr 01, 2021
Loading