-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI workflow, project files, and update README
- Loading branch information
Kiran Jojare
committed
Jul 18, 2024
1 parent
0f9e89b
commit fe7b7c5
Showing
4 changed files
with
611,540 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Run linting | ||
run: | | ||
pip install flake8 | ||
flake8 src/ | ||
- name: Run tests | ||
run: | | ||
# Add your test command here if you have tests | ||
echo "Tests would run here" | ||
- name: Check Python files | ||
run: | | ||
python -m compileall src/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,50 @@ | ||
# CAN-Log-Parser | ||
This repository contains a Python-based tool to parse DBC formatted CAN log files and plot the signals. It leverages cantools for parsing DBC files and matplotlib for plotting signals, providing an easy way to visualize CAN signal data. | ||
|
||
# CAN Log Parser | ||
|
||
![Build Status](https://github.com/your-username/CAN-Log-Parser/actions/workflows/ci.yml/badge.svg) | ||
![Code Quality](https://img.shields.io/badge/code%20quality-A-green) | ||
|
||
This project is a tool to parse DBC formatted CAN log files and plot the signals. | ||
|
||
## Features | ||
- Parse DBC files to extract signal definitions | ||
- Read and parse CAN log files | ||
- Decode signals from CAN messages | ||
- Plot the decoded signals | ||
|
||
## Requirements | ||
- Python 3.8+ | ||
- cantools | ||
- matplotlib | ||
|
||
## Installation | ||
Clone the repository and install the required packages: | ||
|
||
```bash | ||
git clone https://github.com/your-username/CAN-Log-Parser.git | ||
cd CAN-Log-Parser | ||
pip install -r requirements.txt | ||
``` | ||
|
||
## Usage | ||
Place your DBC file and log file in the `data/` directory. | ||
|
||
Run the main script: | ||
|
||
```bash | ||
python src/main.py | ||
``` | ||
|
||
## Repository Structure | ||
- `src/`: Contains the main scripts | ||
- `main.py`: Main script to run the tool | ||
- `can_parser.py`: Contains functions to parse CAN messages | ||
- `plot_signals.py`: Contains functions to plot signals | ||
- `data/`: Directory to place your DBC and log files | ||
|
||
## Example | ||
An example DBC file and log file are provided in the `data/` directory. | ||
|
||
## Dependencies | ||
- `cantools`: A library for parsing DBC files and decoding CAN messages. It simplifies working with CAN databases and allows you to decode and encode CAN messages. | ||
- `matplotlib`: A plotting library for Python and its numerical mathematics extension NumPy. It provides an object-oriented API for embedding plots into applications. |
Oops, something went wrong.