JimLakis / PDM_Wildlife

0 stars 0 forks source link

priorities and next steps after 10th of August 2023 check in meeting #22

Open bbelderbos opened 1 year ago

bbelderbos commented 1 year ago

@JimLakis next steps and planning ...

  1. Update readme with mission project, what problem does it try to solve?
  2. Image model: make the 1-to-many relation work in models.py, then integrate it in the existing FastAPI view code
  3. Add pytest code to test the API, start with this guide: https://sqlmodel.tiangolo.com/tutorial/fastapi/tests/ (for a pytest intro check out this Code Clinic: https://pybites.mykajabi.com/products/pybites-developer-mindset-pdm-program/categories/3729330/posts/2152747224)
  4. Run black/flake8 with the pre-commit tool, please follow https://www.youtube.com/watch?v=XFyLzr5Ehf0 and let me know if you have questions.
  5. (optional) Make an AWS account and an s3 bucket, then reuse my upload_to_s3 function to upload images to the s3 bucket upon post request to the endpoint (also issue'd here https://github.com/JimLakis/PDM_Wildlife/issues/6)
  6. Tabled for now: adding a login

Ideally you commit each "feature" / change set on a new branch and open a pull request so I can review 🙏


As agreed we spend the remaining of this week (10) and the coming two weeks (11 and 12) on this to wrap up this project.

Then weeks 13-16 will be for the 2nd recipe app (Standard Library only restraint / work towards a "polished app" goal)

As discussed: please minimize consumption of full tutorials / guides, work backwards from the problem and use whatever it takes (Google, Stack Overflow, Chat GPT, etc) as a first attempt, then when you get stuck ping me in an issue, pull request or on Slack. Ideally you do that every day please. Thanks and good luck, keep going!

bbelderbos commented 1 year ago

23rd of Aug 2023 prio list:

  1. commit the sqlmodel relationship code
  2. update app.py create_image endpoint to link an image to the proper animal (where you will use the relationship)
  3. update app.py read_images endpoint to get images for a specific animal (which you will have to pass in)
  4. pre-commit -> check video and try to work with my yaml example file (although it has too many tools, so feel free to skip a few, specifically mypy and codelimit) -> https://github.com/JimLakis/PDM_Wildlife/issues/25
  5. pytest -> watch the clinic and ping me if you have conceptual questions about the clinic + when you get here I will try to make this a bit more digestible https://sqlmodel.tiangolo.com/tutorial/fastapi/tests/

example 1.

# Define the models
class Author(SQLModel, table=True):
    id: int = Field(primary_key=True)
    name: str
    books: List["Book"] = Relationship(back_populates="author")

class Book(SQLModel, table=True):
    id: int = Field(primary_key=True)
    title: str
    author_id: int = Field(foreign_key="author.id")
    author: Author = Relationship(back_populates="books")
bbelderbos commented 1 year ago

As per final minutes, how to get help: https://pybit.es/articles/python-help/

bbelderbos commented 1 year ago

And pdb is extremely useful as well, see: https://www.youtube.com/watch?v=OWGyfBBwpSM

JimLakis commented 1 year ago

Thank you Bob. I'm going to watch those videos now

James Lakis

*For greater access to the content on my LinkedIn account, please request for us to 'Connect'. *www.linkedin.com/pub/jim-lakis/3/306/a93 http://www.linkedin.com/pub/jim-lakis/3/306/a93 .

On Thu, Aug 10, 2023 at 10:40 AM Bob Belderbos @.***> wrote:

@JimLakis https://github.com/JimLakis next steps and planning ...

  1. Update readme with mission project, what problem does it try to solve?
  2. Image model: make the 1-to-many relation work in models.py, then integrate it in the existing FastAPI view code
  3. Add pytest code to test the API, start with this guide: https://sqlmodel.tiangolo.com/tutorial/fastapi/tests/ (for a pytest intro check out this Code Clinic: https://pybites.mykajabi.com/products/pybites-developer-mindset-pdm-program/categories/3729330/posts/2152747224 )
  4. Run black/flake8 with the pre-commit tool, please follow https://www.youtube.com/watch?v=XFyLzr5Ehf0 and let me know if you have questions.
  5. (optional) Make an AWS account and an s3 bucket, then reuse my upload_to_s3 function to upload images to the s3 bucket upon post request to the endpoint (also issue'd here #6 https://github.com/JimLakis/PDM_Wildlife/issues/6)
  6. Tabled for now: adding a login

Ideally you commit each "feature" / change set on a new branch and open a pull request so I can review 🙏

As agreed we spend the remaining of this week (10) and the coming two weeks (11 and 12) on this to wrap up this project.

Then weeks 13-16 will be for the 2nd recipe app (Standard Library only restraint / work towards a "polished app" goal)

As discussed: please minimize consumption of full tutorials / guides, work backwards from the problem and use whatever it takes (Google, Stack Overflow, Chat GPT, etc) as a first attempt, then when you get stuck ping me in an issue, pull request or on Slack. Ideally you do that every day please. Thanks and good luck, keep going!

— Reply to this email directly, view it on GitHub https://github.com/JimLakis/PDM_Wildlife/issues/22, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJBIOUIONA57HTS6ZXMTNMLXUUMHRANCNFSM6AAAAAA3L2ZVKU . You are receiving this because you were mentioned.Message ID: @.***>