1. 23 Feb, 2022 1 commit
  2. 10 Feb, 2022 1 commit
  3. 07 Feb, 2022 1 commit
  4. 18 Jan, 2022 1 commit
  5. 14 Jan, 2022 1 commit
  6. 25 Dec, 2021 1 commit
  7. 01 Dec, 2021 1 commit
  8. 29 Nov, 2021 1 commit
  9. 17 Nov, 2021 2 commits
    • Kevin Morris's avatar
      change: rework test_rpc's TestClient usage into a fixture · ccf50cbd
      Kevin Morris authored
      
      
      This is the first step on our path to reworking the test
      suite in general.
      Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
      ccf50cbd
    • Kevin Morris's avatar
      change(aurweb): add parallel tests and improve aurweb.db · fa43f6bc
      Kevin Morris authored
      
      
      This change utilizes pytest-xdist to perform a multiproc test
      run and reworks aurweb.db's code. We no longer use a global
      engine, session or Session, but we now use a memo of engines
      and sessions as they are requested, based on the PYTEST_CURRENT_TEST
      environment variable, which is available during testing.
      
      Additionally, this change strips several SQLite components
      out of the Python code-base.
      
      SQLite is still compatible with PHP and sharness tests, but
      not with our FastAPI implementation.
      
      More changes:
      ------------
      - Remove use of aurweb.db.session global in other code.
      - Use new aurweb.db.name() dynamic db name function in env.py.
      - Added 'addopts' to pytest.ini which utilizes multiprocessing.
          - Highly recommended to leave this be or modify `-n auto` to
            `-n {cpu_threads}` where cpu_threads is at least 2.
      Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
      fa43f6bc
  10. 31 Oct, 2021 5 commits
  11. 30 Oct, 2021 2 commits
  12. 21 Oct, 2021 3 commits
    • Kevin Morris's avatar
      feat(rpc): enforce ratelimiting · 65240c83
      Kevin Morris authored
      
      
      New configuration options:
      
      - `[ratelimit] cache`
          - A boolean indicating whether we should use configured cache (1)
            or database (0) for ratelimiting.
      Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
      65240c83
    • Kevin Morris's avatar
      change(fastapi): rework /rpc (get) · 7c4fb539
      Kevin Morris authored
      
      
      This reworks the base implementation of the RPC to use a
      class called RPC for handling of requests. Took a bit of
      a different approach than PHP in terms of exposed methods,
      but it does end up achieving the same goal, with one additional
      error: "Request type '{type}' is not yet implemented."
      
      For FastAPI development, we'll stick with:
      
      - If the supplied 'type' argument has an alias mapping in
        RPC.ALIASES, we convert the type argument over to its alias
        before doing anything. Example: 'info' is aliased to 'multiinfo',
        so when a user requests type=info, it is converted to type=multiinfo.
      - If the type does not exist in RPC.EXPOSED_TYPES, the following
        error is produced: "No request type/data specified."
      - If the type **does** exist in RPC.EXPOSED_TYPES, but does not
        have an implemented `RPC._handle_{type}_type` function, the
        following error is produced: "Request type '{type}' is not yet
        implemented."
      Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
      7c4fb539
    • Kevin Morris's avatar
      feat(rpc): add 'suggest-pkgbase' type · 990f4d18
      Kevin Morris authored
      
      
      This feature of RPC is required to take advantage of
      javascript typeahead.
      Signed-off-by: Kevin Morris's avatarKevin Morris <kevr@0cost.org>
      990f4d18
  13. 17 Sep, 2021 2 commits
  14. 16 Sep, 2021 1 commit
  15. 12 Sep, 2021 1 commit