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

chore(example): fix example #265

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

chore(example): fix example #265

wants to merge 5 commits into from

Conversation

grdsdev
Copy link
Contributor

@grdsdev grdsdev commented Jan 22, 2025

What kind of change does this PR introduce?

Bug fix, feature, docs update, ...

What is the current behavior?

Please link any relevant issues here.

What is the new behavior?

Feel free to include screenshots if it includes visual changes.

Additional context

Add any other context or screenshots.

@coveralls
Copy link

coveralls commented Jan 22, 2025

Pull Request Test Coverage Report for Build 12947462764

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.4%) to 80.514%

Files with Coverage Reduction New Missed Lines %
realtime/_async/client.py 4 68.02%
Totals Coverage Status
Change from base Build 12917981641: -0.4%
Covered Lines: 814
Relevant Lines: 1011

💛 - Coveralls

headers = {"Prefer": "return=representation"}

# does not match filter and will therefore only be received by the * listen, but not the INSERT listen
requests.post(
Copy link
Contributor

@silentworks silentworks Jan 24, 2025

Choose a reason for hiding this comment

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

Am I correct in thinking the requests library is used here purely for testing purpose? if yes then I don't think this should be in the example as users will blindly copy this without understanding what is going on. Rather instructions should be left in a README on how to run the example and call the endpoints from a HTTP GUI client or CURL.

Copy link
Contributor Author

@grdsdev grdsdev Jan 30, 2025

Choose a reason for hiding this comment

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

Yes, @silentworks, the example is only for testing purposes. It is there to have a quick app to run and test the real-time implementation, actually. But thinking more about that, maybe it is better to remove this example and use an integration test instead.

What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah if its for testing purpose only then it should be in the tests directory as an integration test instead. This is how we've structured the postgrest-py repo, it has normal unit tests and integration tests inside of the tests directory.

@silentworks silentworks linked an issue Jan 24, 2025 that may be closed by this pull request
2 tasks
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.

Example is broken
6 participants