Skip to content
Snippets Groups Projects
  1. May 16, 2024
  2. May 15, 2024
    • vlorentz's avatar
      QualifiedSWHID: Fix (de)serialization of 'origin' qualifier · 9cf7ad9d
      vlorentz authored and Antoine Lambert's avatar Antoine Lambert committed
      Having the escaped URL in `swhid.origin` is inconsistent with self.path
      (which is always escaped) and never what we want, because it is only
      useful while serializing, which is already handled by `__str__`.
      
      This led to swh-indexer#4738
      where swh-deposit parsed a qualified SWHID, then used `.origin` to get
      an origin URL.
      
      Additionally, as serialization always escapes the `origin` qualifier,
      this means that deserializing then re-serializing a qualified SWHID
      would double-escape it.
      
      Finally, fixing this made the test uncover that `%` was not escaped
      while serializing, while `;` was, leading to incorrect (and ambiguous)
      escaped URLs.
      9cf7ad9d
    • Pierre-Yves David's avatar
      DiskBackedContent: add a small temporary compatibility layer · f1f62388
      Pierre-Yves David authored
      There are two other package using DiskBackedContent "swh-loader-svn" and
      "swh-loader-cvs". Both use it to check "DiskBackedContent.object_type"
      at the same time as "model.Content.object_type".
      
      so we do this small hack to avoid breaking these other module until
      they migrate.
      f1f62388
    • Pierre-Yves David's avatar
      from_disk: introduce a ModelObjectType enum · 8b29444a
      Pierre-Yves David authored
      This sets the pieces in place to finally cleanup the confusion from the
      various object_type attributes. They now have different type, so we
      should be able to start detecting error at some point.
      
      As for FromDiskType, we keep compatibility with string value for now.
      This avoid breaking existing code.
      8b29444a
    • Pierre-Yves David's avatar
      DiskBackedContent: remove the class in favor of a simpler composition approach · d65a844a
      Pierre-Yves David authored
      Instead of having multiple class and `object_type` value, we just adds
      a few lines in the main `model.Content` class to retrieved data on
      demand. The `with_data` logic already existed there anyway.
      
      This will avoid having from_disk extending the model from the outside.
      d65a844a
  3. May 14, 2024
  4. Apr 24, 2024
    • vlorentz's avatar
      Add size limit to origin URLs · 906e5093
      vlorentz authored
      Currently the only limit is "enforced" by PostgreSQL.
      
      This makes sure that origins created after we switch to Cassandra as the
      primary storage remain compatible with a PostgreSQL-based storage.
      906e5093
  5. Mar 29, 2024
  6. Mar 26, 2024
  7. Feb 29, 2024
    • Franck Bret's avatar
      from_disk: Add optional progress callback · cebe917a
      Franck Bret authored
      Add an optional progress callback to `from_disk` method. It can
      returns the number of computed entries for each top entries traversed.
      This is useful for CLI, in particular to display progress information
      for SWH Scanner.
      v6.12.1
      cebe917a
  8. Feb 20, 2024
  9. Feb 05, 2024
  10. Jan 09, 2024
    • Pierre-Yves David's avatar
      discovery: support optional callback for information · e54151a4
      Pierre-Yves David authored
      Right now, the discovery process offered by `filter_known_objects`
      returns all results after the discovery is complete. The new callback
      provides a way to get information "in real time" which is useful for at
      least a couple of planned use case in the SWH scanner:
      - displaying progress information while processing
      - update a graphical UI in real time.
      
      This simple callback fits this need without too much troubles.
      
      For some reason, mypy complained about the existing type hint in this
      file for unclear reason. So I fixed them.
      v6.11.0
      e54151a4
    • Pierre-Yves David's avatar
      policy: drop async usage that is now unnecessary · 1a59d42f
      Pierre-Yves David authored
      The web Client is no longer using async so we no longer needs it.
      1a59d42f
  11. Dec 05, 2023
  12. Dec 04, 2023
  13. Dec 03, 2023
  14. Nov 29, 2023
    • Antoine Lambert's avatar
      docs/Makefile: Fix doc build outside tox when using make command · f9c8ec3a
      Antoine Lambert authored
      When building package documentation outside tox by calling make in the
      docs directory, the include of Makefile.sphinx inside the docs Makefile
      was failing as its relative path was invalid.
      
      So adapt this relative path according if the SWH_PACKAGE_DOC_TOX_BUILD
      environment variable is set or not.
      f9c8ec3a
  15. Nov 28, 2023
  16. Nov 16, 2023
  17. Nov 15, 2023
  18. Nov 14, 2023
    • Nicolas Dandrimont's avatar
    • Raphaël Gomès's avatar
      Replace the `dir_filter` with a `path_filter` in `Directory` · 1286c8a4
      Raphaël Gomès authored
      `dir_filter` only filters directories. `swh-scanner` needs to
      accurately filter out ignored files before making expensive requests
      to the web API. We introduce a more general `path_filter` that allows
      us to differentiate between files and folders.
      
      `dir_filter` is now deprecated and will be removed once the remaining
      users in other packages are migrated over to the new API.
      
      `accept_all_directories` is also deprecated, because it only implies
      accepting *directories* even though its behavior also accepts
      non-directory entries when used with `path_filter`.
      1286c8a4
  19. Sep 25, 2023
  20. Aug 29, 2023
  21. Aug 21, 2023
  22. Jul 12, 2023
  23. Jun 14, 2023
  24. Mar 16, 2023
    • Jérémy Bobbio (Lunar)'s avatar
      Add several helper methods returning SWHIDs · 48a46285
      Jérémy Bobbio (Lunar) authored
      This adds several helper methods returning SWHIDs to model objects,
      namely:
      
      - SkippedContent.swhid()
      - DirectoryEntry.swhid()
      - SnapshotBranch.swhid()
      - Release.target_swhid()
      - Revision.directory_swhid() and Release.parent_swhids()
      - OriginVisitStatus.origin_swhid() and
        OriginVisitStatus.snapshot_swhid()
      v6.7.0
      48a46285
  25. Feb 17, 2023
Loading