Skip to content

Conversation

sshane
Copy link
Contributor

@sshane sshane commented Mar 3, 2025

No description provided.

@github-actions github-actions bot added the car related to opendbc/car/ label Mar 3, 2025
@sshane sshane changed the title docs: cleanup and support type test docs: cleanup extra cars Mar 3, 2025
@github-actions github-actions bot added the toyota label Mar 3, 2025
@sshane
Copy link
Contributor Author

sshane commented Mar 3, 2025

@jyoung8607 I don't have time for this now, but this is a good proof of concept. Want to take it over? Does this look reasonable to you?

You just need to ignore != SupportType.UPSTREAM on the site jinja template



def get_params_for_docs(platform) -> CarParams:
cp_platform = platform if platform in interfaces else MOCK.MOCK
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we can remove this once done

@jyoung8607
Copy link
Collaborator

@jyoung8607 I don't have time for this now, but this is a good proof of concept. Want to take it over? Does this look reasonable to you?

You just need to ignore != SupportType.UPSTREAM on the site jinja template

It's more than the CARS.md jinja template, it's the functions consumed by comma.ai/vehicles and shop.comma.ai. At the time I wasn't free to alter that interface at all. Hence the EXTRA_STUFF, so those original functions could continue filtering down to the set of release-supported cars.

# CAUTION: This function is imported by shop.comma.ai and comma.ai/vehicles, test changes carefully
def get_all_car_docs() -> list[CarDocs]:
collected_footnotes = get_all_footnotes()
sorted_list: list[CarDocs] = build_sorted_car_docs_list(PLATFORMS, footnotes=collected_footnotes)
return sorted_list

# CAUTION: This function is imported by shop.comma.ai and comma.ai/vehicles, test changes carefully
def generate_cars_md(all_car_docs: list[CarDocs], template_fn: str) -> str:
with open(template_fn) as f:
template = jinja2.Template(f.read(), trim_blocks=True, lstrip_blocks=True)
footnotes = [fn.value.text for fn in get_all_footnotes()]
cars_md: str = template.render(all_car_docs=all_car_docs, PartType=PartType,
group_by_make=group_by_make, footnotes=footnotes,
Device=Device, Column=Column, BaseCarHarness=BaseCarHarness)
return cars_md

Copy link
Contributor

github-actions bot commented May 5, 2025

This PR has had no activity for 60 days. It will be automatically closed in 7 days if there is no activity.

@github-actions github-actions bot added the stale label May 5, 2025
Copy link
Contributor

This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes.

@github-actions github-actions bot closed this May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

car related to opendbc/car/ stale toyota

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants