diff --git a/README.md b/README.md index 54a7e17..2739c6d 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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') diff --git a/mfile/__init__.py b/cmerg/__init__.py similarity index 100% rename from mfile/__init__.py rename to cmerg/__init__.py diff --git a/mfile/erg.py b/cmerg/erg.py similarity index 100% rename from mfile/erg.py rename to cmerg/erg.py diff --git a/mfile/version.py b/cmerg/version.py similarity index 71% rename from mfile/version.py rename to cmerg/version.py index de5324a..844a6f1 100644 --- a/mfile/version.py +++ b/cmerg/version.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -""" mfile version module """ +""" cmerg version module """ __all__ = ['__version__'] diff --git a/setup.py b/setup.py index 00e1b52..960b6af 100644 --- a/setup.py +++ b/setup.py @@ -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__) @@ -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='daniel.hrisca@gmail.com', license='MIT', @@ -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