Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
# mfile
# cmerg
Python parser for CarMaker ERG files with Pandas dataframe export.

##
##

## Use and Examples

Moslty these are notes for myself but hopefully someone else finds them useful.

### Examples
### Installation

This package [is published on PyPI](https://pypi.org/project/cmerg/) under the name _cmerg_.

### Windows
``` shell

Make sure that all the dependencies are installed.
> python -m pip install -U pip
> python -m pip install cmerg

```
### Linux
``` shell

``` pip install asammdf numpy ```
$ python3 -m pip install -U pip
$ python3 -m pip install cmerg

```

### Examples

Import the package folder.

``` import mfile ```
``` import cmerg ```

Create ERG file object. (Using example file from repo)

``` log1 = mfile.ERG('test-data/Test-Dataset-1_175937.erg') ```
``` log1 = cmerg.ERG('test-data/Test-Dataset-1_175937.erg') ```

List of the signals in the file.

Expand All @@ -46,11 +61,11 @@ df = log1.to_pd()

# Simple example of adding ERG data to pandas.
# TODO: Make 'toPd()' call
import mfile
import cmerg
import pandas as pd
import numpy as np

log1 = mfile.ERG('data-file.erg')
log1 = cmerg.ERG('data-file.erg')

speed = log1.get('Vhcl.v')

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion mfile/version.py → cmerg/version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
""" mfile version module """
""" cmerg version module """


__all__ = ['__version__']
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
''' This file allows pip to create a wheel for the mfile package. '''
''' This file allows pip to create a wheel for the cmerg package. '''


from setuptools import setup
from pathlib import Path

from mfile import __version__
from cmerg import __version__


HERE = Path(__file__)
Expand All @@ -17,12 +17,12 @@


setup(
name='mfile',
name='cmerg',
version=__version__,
description='Python parser for CarMaker ERG files.',
long_description=README.read_text(),
long_description_content_type='text/markdown',
url='https://github.com/danielhrisca/mfile',
url='https://github.com/danielhrisca/cmerg',
author='Daniel Hrisca',
author_email='[email protected]',
license='MIT',
Expand All @@ -36,7 +36,7 @@
'Programming Language :: Python :: 3.8',
],
keywords='carmaker erg development',
packages=['mfile'],
packages=['cmerg'],
# Because of pathlib it has to be >=3.4 and ~ is because we are not
# committing to support python4.
# See: https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
Expand Down