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

[SDESK-7381] Support source and parent async resources #2694

Merged
merged 19 commits into from
Sep 16, 2024

Conversation

MarkLark86
Copy link
Contributor

@MarkLark86 MarkLark86 commented Sep 11, 2024

Purpose

Provides the following features to async resources:

  1. allow multiple ResourceConfig to point to the same MongoDB collection and Elasticsearch index
  2. ability for a ResourceRestEndpoint URL to contain a parent resource (parent/child relationship).

What has changed

  1. New datasource_name attribute added to the ResourceConfig dataclass
  2. New parent_links attribute added to the rest_endpoints attribute of the ResourceConfig dataclass

Documentation

Documentation has been added to the readthedocs with an example usage and brief explanation

Resolves: SDESK-7381

@MarkLark86 MarkLark86 added this to the 3.0 milestone Sep 11, 2024
@MarkLark86
Copy link
Contributor Author

@eos87 For example usage, please see the resource_parent_links test file

Copy link

@eos87 eos87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@@ -21,3 +21,4 @@ exclude = '''
testpaths = ["tests", "superdesk", "apps", "content_api"]
python_files = "*_test.py *_tests.py test_*.py tests_*.py tests.py test.py"
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting discussion about this setting pytest-dev/pytest-asyncio#924

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I read that, seems silly to me!

@MarkLark86 MarkLark86 merged commit 8d0f4c8 into superdesk:async Sep 16, 2024
8 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants