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

Framework for docs-only info #1556

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

ugtthis
Copy link
Contributor

@ugtthis ugtthis commented Dec 4, 2024

In response to Adeebs message from PR #1478 .

I was originally going to do the NHTSA vin decoder route but then when I was searching through discord it seemed like the NHTSA vin decoder info can be a hit and miss for cars(refer to discord screenshots), and also doesn't include international cars. Though I think the docs/data will be able to make up for the missing/inaccurate NHTSA data over time. Below is what I'm thinking I will add.

docs/data: Acts as the grocery store and will house data from different sources, including:
- NHTSA Vin Decoder API
- Data sources for international makes/models
- Data pulled from values.py
- opendbc-data longitudinal reports
- Other relevant sources as needed

docs/scripts: Contains scripts for:
- Fetching and organizing data from different sources.
- Parsing information from values.py to extract powertrain type and other metrics that are specific to certain car brands or makes.

/workflows/car_docs.yml: A GitHub Actions file that:
- Automates and triggers updates to the data pipeline.
- Ensures scripts are re-run regularly or on-demand to keep generated files up-to-date.

docs/generated: Stores outputs like JSON files that:
- Can be used directly in documentation.
- Provide data for other web experiences, such as a potential opendbc.com


Had some things pop up recently which prevented me from continuing to work on this but will have more time this week. After thinking about your comment this is the general structure I'm thinking about going with so web experiences can get specific data in a better way


discord-comment-nhtsa

@ugtthis
Copy link
Contributor Author

ugtthis commented Dec 4, 2024

docs/
├── lib/                    
│   ├── __init__.py          
│   ├── docs_definitions.py  # Core documentation classes (file moved from car/)
│   └── car_attributes.py    # Doc-specific attributes (Powertrain, MPG etc.)
├── data/                
│   ├── nhtsa/               # NHTSA VIN Decoder API data
│   │   └── cache/           # Cached API responses
│   └── car_attributes/      # Car-specific doc attributes
│       ├── toyota.py        # Toyota-specific doc attributes
│       ├── honda.py         # Honda-specific doc attributes
│       └── ...
├── scripts/   
│   ├── __init__.py
│   ├── docs.py              # Main docs generation script (file moved from car/)
│   ├── parsers/             # Data parsers
│   │   ├── __init__.py
│   │   ├── nhtsa.py         # NHTSA API parser
│   │   └── values.py        # values.py + car attributes parser
├── templates/               # Templates
│   └── CARS_template.md     # (file moved from car/)
└── generated/               # Generated output
    ├── CARS.md              # Generated documentation (file moved from docs/)
    └── cars.json            # Generated data for web use

This is the current direction I will be going that I think would help with being able to add attributes that are important to docs(refer to list from discord message here) without bloating up the main opendbc code

Update: Will be going slightly in another direction. I continued this conversation in this Discord current-projects

@ugtthis ugtthis force-pushed the docs-only-framework branch 3 times, most recently from 8377254 to 3767116 Compare December 18, 2024 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant