Skip to content
Snippets Groups Projects

crates: Fixes and improvements

Merged Antoine Lambert requested to merge anlambert/swh-lister:crates-lister-fixes into master
  1. Aug 27, 2024
    • Antoine Lambert's avatar
      crates: Remove crates metadata as loader argument · 5003e658
      Antoine Lambert authored
      Those extrinsic metadata can be directly fetched by the loader
      through the crates Web API, plus it contains more metadata fields.
      5003e658
    • Antoine Lambert's avatar
      crates: Speedup listing by processing crates in batch · 42e76ee6
      Antoine Lambert authored
      Instead of having a single crate and its versions info per page,
      prefer to have up to 1000 crates per page to significantly speedup
      the listing process.
      42e76ee6
    • Antoine Lambert's avatar
      crates: Record lister state only if all crates were processed · c6aa490f
      Antoine Lambert authored
      Previously, the lister state was recorded regardless if errors occurred
      when listing crates as the finalize method is called regardless of raised
      exception during listing.
      
      As a consequence some crates could be missed as the incremental listing
      restarts from the dump date of the last processed crate database.
      
      So ensure all crates have been processed by the lister before recording
      its state.
      c6aa490f
    • Antoine Lambert's avatar
      crates: Use looseversion.LooseVersion2 to parse crate versions · aafaebd5
      Antoine Lambert authored
      packaging.version.parse is dedicated to parse Python package version
      numbers but crate versions do not necessarily respect Python version
      number conventions and thus some crate versions cannot be parsed.
      
      Prefer to use looseversion.LooseVersion2 instead which in a drop-in
      replacement for deprecated distutils.version.LooseVersion and enables
      to parse all kind of version numbers.
      aafaebd5
    • Antoine Lambert's avatar
      crates: Bump csv field size limit · b2ece7ca
      Antoine Lambert authored
      A size limit of 1000000 was not enough to properly process
      all CSV crates data so bump to a higher value.
      b2ece7ca
Loading