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

Document how to install prerequisites in examples READMEs #1993

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chrisinmtown
Copy link
Contributor

@chrisinmtown chrisinmtown commented Nov 10, 2024

Add server url /openapi to JWT example
Add TODO to SQLAlchemy example, does not work with current versions
Correct name of module in v3 instructions

Fixes #1987

@chrisinmtown
Copy link
Contributor Author

chrisinmtown commented Nov 10, 2024

Please review this draft, if you like this approach I will extend to other README.rst files.

If it's not obvious, I'm trying to figure out how to work with you all. Baby steps :)

@chrisinmtown chrisinmtown marked this pull request as draft November 11, 2024 12:55
@RobbeSneyders
Copy link
Member

Thanks @chrisinmtown, this looks good to me. Would be great to extend it to the other examples.

@chrisinmtown
Copy link
Contributor Author

I am extending the changes to all the examples. Please check example sqlalchemy which has become a bit stale. I dropped the convert_unicode parameter in the create_engine function and then it started, but the first GET attempt yields this:

sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread. The object was created in thread id 123145410666496 and this is thread id 140704480263680.

Do you have time for this?

@chrisinmtown chrisinmtown force-pushed the 1987-doc-examples branch 2 times, most recently from 180f06a to 0642103 Compare November 11, 2024 23:46
@RobbeSneyders
Copy link
Member

Let's leave that example as is for now then. Would be great if you could add a notice that it is outdated to the README.

For the other examples, the flask extra is not needed for most of them.

@chrisinmtown
Copy link
Contributor Author

chrisinmtown commented Nov 12, 2024

Let's leave that example as is for now then. Would be great if you could add a notice that it is outdated to the README.

I will ask the cloud a few questions and see if I can figure it out :)

For the other examples, the flask extra is not needed for most of them.

I see that Flask is not needed for enforcedefaults, frameworks and hello_async. I copy-pasted those a little too quickly, will adjust.

@chrisinmtown chrisinmtown force-pushed the 1987-doc-examples branch 2 times, most recently from 16effac to 37e84aa Compare November 12, 2024 20:30
@chrisinmtown chrisinmtown marked this pull request as ready for review November 12, 2024 20:33
@chrisinmtown
Copy link
Contributor Author

This PR has primarily documentation changes. I tweaked one API spec and one requirements file to make the examples work. Please consider.

@chrisinmtown
Copy link
Contributor Author

Would you please give me an opinion here? It's a real challenge to contribute when people go silent for a full week at a time.

@coveralls
Copy link

coveralls commented Nov 22, 2024

Coverage Status

coverage: 94.408%. remained the same
when pulling 98f0e3c on chrisinmtown:1987-doc-examples
into 58c8bb6 on spec-first:main.

Copy link
Member

@RobbeSneyders RobbeSneyders left a comment

Choose a reason for hiding this comment

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

Sorry for the delay @chrisinmtown

Two small comments, then it's good to go for me.

@@ -1,3 +1,2 @@
..[swagger-ui]
python-jose[cryptography]
Flask>=0.10.1
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Flask>=0.10.1

Copy link
Contributor Author

@chrisinmtown chrisinmtown Nov 28, 2024

Choose a reason for hiding this comment

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

Ok, dropped the Flask line from requirements.txt


.. code-block:: bash

$ python -m venv my-venv
$ source my-venv/bin/activate
$ pip install 'connexion[flask,swagger-ui,uvicorn]>=3.1.0'
$ pip install -r requirements.txt
Copy link
Member

Choose a reason for hiding this comment

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

We should remove the flask and connexio dependencies from requirements.txt if we install them directly on the command line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, dropped the connexion and Flask lines from requirements.txt

Add server url /openapi to JWT example
Add TODO to SQLAlchemy example, does not work with current versions

Fixes spec-first#1987
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.

Extend helloworld RST with pip install-dependency command
3 participants