From fff9b95ec22e92ef93bea2e7e8a93a3ab9a39231 Mon Sep 17 00:00:00 2001 From: "Christoph.Knote" Date: Fri, 4 Aug 2017 14:55:55 +0200 Subject: [PATCH] Lot's a changes in documentation. Almost there now! --- CHANGES.rst | 7 +++++++ INSTALL.rst | 3 +++ README.rst | 21 +++++++++------------ docs/index.rst | 34 +++++++++++++++++++++++++++++++++- setup.py | 8 +++++++- 5 files changed, 59 insertions(+), 14 deletions(-) create mode 100644 CHANGES.rst create mode 100644 INSTALL.rst diff --git a/CHANGES.rst b/CHANGES.rst new file mode 100644 index 0000000..3d426b7 --- /dev/null +++ b/CHANGES.rst @@ -0,0 +1,7 @@ +Changelog +========= + +0.9.0 (2017-08-04) +------------------ + +- Initial release diff --git a/INSTALL.rst b/INSTALL.rst new file mode 100644 index 0000000..1835242 --- /dev/null +++ b/INSTALL.rst @@ -0,0 +1,3 @@ +:: + + pip install icartt diff --git a/README.rst b/README.rst index 31bf4d9..3eea0c1 100644 --- a/README.rst +++ b/README.rst @@ -1,16 +1,13 @@ -ICARTT file format reader and writer -==================================== +======= +icartt +======= -Testing things out! +``icartt`` is an ICARTT format reader and writer -Check it out:: +Documentation +============= - import icartt - ds = icartt.Dataset() +maintained at https://boxmodeling.meteo.physik.uni-muenchen.de/documentation -Version history ---------------- - -1 - 27.07.2017 - -Initial release \ No newline at end of file +Installation +============ \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 17552a2..55510a6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,12 +12,44 @@ icartt is an ICARTT file format reader and writer .. contents:: :local: + :depth: 2 -.. module:: icartt +Installation +------------ + +.. include:: ../../icartt/INSTALL.rst + +Example +------------ + +:: + + import icartt + + # load a new dataset from an existing file + ict = icartt.Dataset('path/to/example.ict') + + # list variable names + ict.varnames + # e.g. ['Fractional_Day', 'UTC', 'JDAY', 'INDEX', 'FLIGHT', 'LOCAL_SUN_TIME', ... + + # get data for variable 'UTC': + ict['UTC'] + + # some metadata + ict.organization + ict.dataSource + ict.mission + + # write to (other) file: + with open('path/to/output.ict', 'wb') as f: + ict.write(f) API ---- +.. module:: icartt + Variable ^^^^^^^^^^ diff --git a/setup.py b/setup.py index 2353885..1ea08ab 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,14 @@ +import os from setuptools import setup +def read(filename): + with open(os.path.join(os.path.dirname(__file__), filename)) as f: + return f.read() + setup(name='icartt', description='ICARTT format reader and writer', - version='1.0.0', + long_description=read('README.rst') + '\n\n' + read('INSTALL.rst') + '\n\n' + read('CHANGES.rst'), + version='0.9.0', url='https://boxmodeling.meteo.physik.uni-muenchen.de', author='Christoph Knote', author_email='christoph.knote@physik.uni-muenchen.de', -- GitLab