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

Reorganize python backend modules #58

Closed
1 of 7 tasks
waseem-polus opened this issue Dec 1, 2023 · 0 comments
Closed
1 of 7 tasks

Reorganize python backend modules #58

waseem-polus opened this issue Dec 1, 2023 · 0 comments

Comments

@waseem-polus
Copy link
Collaborator

waseem-polus commented Dec 1, 2023

As a...

member of the development team

Wants to...

organize python code into a clean file structure

So that...

more easily dockerize, and host code on AWS lambda

Acceptance Criteria

  • separate python code into 3 independent modules (that do not call each other): Scrapers, Cleaners, Models
  • These modules are controlled by a main script (app.y) that controls when each module is called
  • Each module should have an entry point function
  • Each module has the dataflow:
    1. pull from database
    2. perform tasks
    3. push to database
    4. report failure to app.script
  • Update entry points in AWS Lambda
  • Restructure repo to the following file structure
root
│
├── backend (currently called scrapers)
│   ├── src
│   │   ├── database.py
│   │   ├── scrapers
│   │   │   ├── __init__.py
│   │   │   ├── # scraper files here
│   │   ├── cleaners
│   │   │   ├── __init__.py
│   │   │   └── # cleaner files here
│   │   ├── models
│   │   │   ├── __init__.py
│   │   │   └── # model files here
│   └── app.py
│   └── Dockerfile
│   └── # lambda function entry points
│
└── frontend
    # frontend code here

Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants