sparckles / Robyn

Robyn is a Super Fast Async Python Web Framework with a Rust runtime.
https://robyn.tech/
BSD 2-Clause "Simplified" License
4.29k stars 221 forks source link

feat: support for structured scaffold in create command #970

Open ashupednekar opened 1 week ago

ashupednekar commented 1 week ago

Description

This PR fixes #969

Summary

PR: Add Structured Scaffold Option to Robyn's Create Command

Description:

This PR introduces a new feature to Robyn's create command, allowing users to choose between two scaffold options:

  1. Simple Starter Kit – Ideal for minimal, quick-start projects.
  2. Structured Scaffold – A more opinionated setup, providing separation of concerns and enhanced organization for scaling projects.

Changes:

Example Structured Scaffold:

├── no-db
│   ├── api
│   │   ├── handlers
│   │   │   ├── __init__.py
│   │   │   ├── probes.py
│   │   │   └── sample.py
│   │   └── middlewares
│   │       └── __init__.py
│   ├── conf.py
│   ├── config.env
│   ├── devops
│   │   ├── Dockerfile
│   │   ├── Dockerfile.src
│   │   └── docker-compose.yaml
│   ├── requirements.txt
│   ├── server.py
│   └── utils
│       └── __init__.py
└── sqlalchemy
    ├── adaptors
    │   ├── __init__.py
    │   ├── models.py
    │   ├── mutators
    │   │   └── __init__.py
    │   ├── schema.py
    │   └── selectors
    │       └── __init__.py
    ├── api
    │   ├── handlers
    │   │   ├── __init__.py
    │   │   ├── probes.py
    │   │   └── sample.py
    │   └── middlewares
    │       └── __init__.py
    ├── conf.py
    ├── config.env
    ├── devops
    │   ├── Dockerfile
    │   ├── Dockerfile.src
    │   └── docker-compose.yaml
    ├── requirements.txt
    ├── server.py
    └── utils
        ├── __init__.py
        └── db.py

PR Checklist

Please ensure that:

Pre-Commit Instructions:

vercel[bot] commented 1 week ago

@pre-commit-ci[bot] is attempting to deploy a commit to the sparckles Team on Vercel.

A member of the Team first needs to authorize it.

codspeed-hq[bot] commented 1 week ago

CodSpeed Performance Report

Merging #970 will not alter performance

Comparing ashupednekar:feat_structured_scaffold (42c61fc) with main (d5394e0)

Summary

✅ 116 untouched benchmarks

ashupednekar commented 5 days ago

@sansyrox lmk if you have any suggestions for the scaffold structure

ashupednekar commented 5 days ago

I'll fix the issues in the create script to make sure tests are passing tomorrow morning

sansyrox commented 5 days ago

Hey @ashupednekar 👋

Thank you for the PR 😄

But the ci is failing. Could you please have a look?

ashupednekar commented 5 days ago

Hi, the new flag wasn't being passed in the create_robyn test, added that, with one new test for the new path, it says CI (tests) waiting for approval.

What should I do? Did it cross some limit on number of test runs?

ashupednekar commented 5 days ago
Screenshot 2024-09-28 at 10 44 53 AM

passing locally