Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor paginator #425

Merged
merged 32 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
93dce58
capsule some of the request calls
InnocentBug Feb 22, 2024
807d72d
final touches
InnocentBug Feb 23, 2024
b6eac0b
make mypy happy
InnocentBug Feb 23, 2024
a0faedd
add missing file
InnocentBug Feb 21, 2024
d6c25f9
implement the new paginator design
InnocentBug Feb 21, 2024
ea4aa42
adjust tests to the new design
InnocentBug Feb 21, 2024
dcf33df
trunk catches
InnocentBug Feb 21, 2024
100cb1b
remove wrong file
InnocentBug Feb 21, 2024
abc0e48
small improvements
InnocentBug Feb 21, 2024
95cff3e
make mypy happy
InnocentBug Feb 21, 2024
196025b
adjust expected result for doctest
InnocentBug Feb 23, 2024
78b1839
further smaller fixes
InnocentBug Feb 23, 2024
f32e06a
fix vocab test
InnocentBug Feb 23, 2024
d6d70cd
automate cancelling outdated workflow runs
InnocentBug Feb 23, 2024
7f64970
fix doctest
InnocentBug Feb 23, 2024
39ea5f7
fix test expectations
InnocentBug Feb 23, 2024
f51a1c5
remove tests that don't really make sense. I don't think we should pr…
InnocentBug Feb 23, 2024
3b89b7a
Merge branch 'develop' into capsule-requests
InnocentBug Feb 23, 2024
1ab94da
Merge branch 'capsule-requests' into refactor-paginator
InnocentBug Feb 23, 2024
80e7bb9
fix trunk check
InnocentBug Feb 23, 2024
162c1d3
make API and data schema smarter. Delay init of DBschema to raise API…
InnocentBug Feb 26, 2024
5345649
full circle and we still don't have the correct search results
InnocentBug Feb 26, 2024
27da74d
reenable tests
InnocentBug Feb 26, 2024
376fbdb
stupid mistakes
InnocentBug Feb 26, 2024
9fe4b88
remove unmerged paths
InnocentBug Feb 26, 2024
5519bf9
add missing page increase
InnocentBug Feb 26, 2024
8753080
add good changes
InnocentBug Feb 26, 2024
e8b6996
less error prone
InnocentBug Feb 26, 2024
8b61a74
raw is better for debugging
InnocentBug Feb 26, 2024
139a5c2
fix import error
InnocentBug Feb 26, 2024
01ed9ef
Merge branch 'capsule-requests' into refactor-paginator
InnocentBug Feb 26, 2024
71f0980
remove obsolete test
InnocentBug Feb 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/docs_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ on:
- main
- develop
- "*"
concurrency:
# github.workflow: name of the workflow
# github.event.pull_request.number || github.ref: pull request number or branch name if not a pull request
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

# Cancel in-progress runs when a new workflow with the same group name is triggered
cancel-in-progress: true

jobs:
build:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/doctest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ on:
- main
- develop

concurrency:
# github.workflow: name of the workflow
# github.event.pull_request.number || github.ref: pull request number or branch name if not a pull request
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

# Cancel in-progress runs when a new workflow with the same group name is triggered
cancel-in-progress: true

jobs:
doctest:
strategy:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ on:
- main
- develop

concurrency:
# github.workflow: name of the workflow
# github.event.pull_request.number || github.ref: pull request number or branch name if not a pull request
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

# Cancel in-progress runs when a new workflow with the same group name is triggered
cancel-in-progress: true

jobs:
mypy-test:
strategy:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/test_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ on:
- main
- develop

concurrency:
# github.workflow: name of the workflow
# github.event.pull_request.number || github.ref: pull request number or branch name if not a pull request
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

# Cancel in-progress runs when a new workflow with the same group name is triggered
cancel-in-progress: true

jobs:
test-coverage:
runs-on: ubuntu-latest
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/test_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ on:
- main
- develop

concurrency:
# github.workflow: name of the workflow
# github.event.pull_request.number || github.ref: pull request number or branch name if not a pull request
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

# Cancel in-progress runs when a new workflow with the same group name is triggered
cancel-in-progress: true

jobs:
test-examples:
runs-on: ${{ matrix.os }}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ on:
- develop
- "*"

concurrency:
# github.workflow: name of the workflow
# github.event.pull_request.number || github.ref: pull request number or branch name if not a pull request
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

# Cancel in-progress runs when a new workflow with the same group name is triggered
cancel-in-progress: true

jobs:
install:
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 3 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

The fixtures are all functional fixtures that stay consistent between all tests.
"""
import logging
import os

import pytest
Expand Down Expand Up @@ -49,14 +50,15 @@ def cript_api():
"""
storage_token = os.getenv("CRIPT_STORAGE_TOKEN")

with cript.API(host=None, api_token=None, storage_token=storage_token) as api:
with cript.API(host=None, api_token=None, storage_token=storage_token, default_log_level=logging.DEBUG) as api:
# overriding AWS S3 cognito variables to be sure we do not upload test data to production storage
# staging AWS S3 cognito storage variables
api._IDENTITY_POOL_ID = "us-east-1:25043452-a922-43af-b8a6-7e938a9e55c1"
api._COGNITO_LOGIN_PROVIDER = "cognito-idp.us-east-1.amazonaws.com/us-east-1_vyK1N9p22"
api._BUCKET_NAME = "cript-stage-user-data"
# using the tests folder name within our cloud storage
api._BUCKET_DIRECTORY_NAME = "tests"
api.extra_api_log_debug_info = True

yield api

Expand Down
Loading
Loading