Skip to content

Commit

Permalink
Release version 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
oysstu committed Jul 22, 2018
1 parent 6b2c094 commit 79b1153
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
### pyxtf
A library for reading eXtended Triton Format (XTF) files (revision 44)
A python library for reading eXtended Triton Format (XTF) files (revision 44)

Current limitations:
- Only supports python 3
- Limited support for vendor-specific extensions
##### Installation from pypi

##### Installation
```bash
pip3 install pyxtf
```

##### Installation from source
Clone or download the repository and run the following command. This requires setuptools to be installed.

```bash
python setup.py install
python3 setup.py install
```

###### Dependencies
Expand All @@ -36,13 +38,9 @@ sonar_packets = packets[pyxtf.XTFHeaderType.sonar]
print(sonar_packets[0])
```

A more involved example can be found in the [ipython notebook under examples](examples/sonar_example.ipynb).

##### Scope
There already exists a python2 project called [pyxtf](https://github.com/shamrin/pyxtf), but was more limited in scope than my needs. A better name might've been pyxtf3 to differentiate, but seeing as that project seems abandonded this project will most likely supersede that project in time. A reason for creating a completely new project, is that this project is based on ctypes - while the other pyxtf uses the struct parsing module. The motivation was not performance, but personal preference.

Examples can be found in the [examples directory](https://github.com/oysstu/pyxtf/tree/master/examples) on github.

##### Contribution
XTF files are not a golden bullet, there are large differences between file versions and vendors. If you find an XTF-file that does not work, either submit a patch or new packet type, or be prepared to send an example XTF-file when submitting the bug-report.
If you find an XTF-file that does not work, either submit a patch or new packet type, or be prepared to send an example XTF-file when submitting the bug-report.


18 changes: 14 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
from os import path
from setuptools import setup
from tools.generate_pyi import generate_pyi


def main():
# Generate .pyi files
import pyxtf.xtf_ctypes
generate_pyi(pyxtf.xtf_ctypes)
import pyxtf.vendors.kongsberg
generate_pyi(pyxtf.vendors.kongsberg)

# read the contents of README file
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()

# Run setup script
setup(name='pyxtf',
version='0.1',
version='1.0',
description='eXtended Triton Format (XTF) file interface',
long_description=long_description,
long_description_content_type='text/markdown',
author='Oystein Sture',
author_email='[email protected]',
url='https://github.com/oysstu/pyxtf',
license='MIT',
setup_requires=['numpy>=1.11'],
install_requires=['numpy>=1.11', 'matplotlib>=1.5.1'],
packages=['pyxtf', 'pyxtf.vendors'],
package_data={'':['*.pyi']},
package_data={'': ['*.pyi']},
use_2to3=False,
classifiers=[
'License :: OSI Approved :: MIT License',
Expand All @@ -28,8 +37,9 @@ def main():
'Intended Audience :: Science/Research',
'Natural Language :: English',
'Topic :: Scientific/Engineering',
'Programming Language:: Python:: 3:: Only'
'Programming Language :: Python :: 3 :: Only'
])


if __name__ == '__main__':
main()
main()

0 comments on commit 79b1153

Please sign in to comment.