Skip to content

Commit

Permalink
Add CI workflow, project files, and update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiran Jojare committed Jul 18, 2024
1 parent 0f9e89b commit fe7b7c5
Show file tree
Hide file tree
Showing 4 changed files with 611,540 additions and 2 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
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/
52 changes: 50 additions & 2 deletions README.md
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.
Loading

0 comments on commit fe7b7c5

Please sign in to comment.