A CMIXF-12 library
Project description
cmixf
A library to parse CMIXF-12.
This will install a CLI cmixf
when installed.
At present this assumes that a number is provided before any unit.
For users:
$ pip install cmixf # requires a python 3 environment
$ cmixf
cmixf > 1mV
type='REAL', value='1'
type='SUBMULTIB', value='mV'
1mV
cmixf > 1oC
type='REAL', value='1'
type='UNITC', value='oC'
1oC
cmixf > <Ctrl+D to exit>
If it fails it will raise an error and exit.
$ cmixf
cmixf > 1mM
type='REAL', value='1'
type='UNITC', value='m'
Traceback (most recent call last):
File "/Users/satra/software/miniconda3/envs/mixf/bin/cmixf", line 11, in <module>
load_entry_point('cmixf', 'console_scripts', 'cmixf')()
File "/Users/satra/software/sensein/cmixf/cmixf/parser.py", line 217, in main
for tok in lexer.tokenize(text):
File "/Users/satra/software/miniconda3/envs/mixf/lib/python3.8/site-packages/sly/lex.py", line 443, in tokenize
tok = self.error(tok)
File "/Users/satra/software/sensein/cmixf/cmixf/parser.py", line 54, in error
raise ValueError("Line %d: Bad character %r" % (self.lineno, t.value[0]))
ValueError: Line 1: Bad character 'M'
For developers:
After cloning the repo do:
- pip install -e .[dev]
- pre-commit install
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cmixf-0.1.2.tar.gz
(5.1 kB
view details)
Built Distribution
cmixf-0.1.2-py3-none-any.whl
(5.4 kB
view details)
File details
Details for the file cmixf-0.1.2.tar.gz
.
File metadata
- Download URL: cmixf-0.1.2.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba6175d5abc6f6d4757a8a0c4804f53c08a31106bc4343e0f81e67146906f682 |
|
MD5 | 42d646ed126efc3eab7f1ad0eeb5d041 |
|
BLAKE2b-256 | 4dba5ce9b3d2d2fe20c09185ca2bdefd793d2a427eec9752e8695f4d125906d4 |
File details
Details for the file cmixf-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: cmixf-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0afceb7f7a896deaccd45c95dddf9450aacb44037d927f2bfa7dfbd3faab0c35 |
|
MD5 | d594e6c1b01cf706b74b673b81e02e94 |
|
BLAKE2b-256 | 767c6fa2315d05795f9295771c03ba526326a30416e1fbe5526ca36cd398a774 |