Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation improvements #88

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft
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
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ Our documentation can be found [here](https://aerovaldb.readthedocs.io/)
9. To be discussed: do we want to allow the programmer to set open-modes, e.g. 'r', 'rw', 'w'?

## Installation
`python -m pip install 'aerovaldb@git+https://github.com/metno/aerovaldb.git'`

The most recent stable version of aerovaldb can be installed from pypi like this:
- `pip install aerovaldb`

Development versions can be installed directly from Github like this:
`pip install 'aerovaldb@git+https://github.com/metno/aerovaldb.git'`

## Usage

Expand Down Expand Up @@ -97,7 +101,7 @@ with aerovaldb.open('json_files:path/to/data/') as db:

## COPYRIGHT

Copyright (C) 2024 Augustin Mortier, Thorbjørn Lunding, Heiko Klein, Norwegian Meteorological Institute
Copyright (C) 2024 Augustin Mortier, Thorbjørn Lundin, Heiko Klein, Norwegian Meteorological Institute

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
Expand Down
9 changes: 9 additions & 0 deletions docs/extending-aerovaldb.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Extending AerovalDB
===================

AerovalDB is designed to allow custom implementations to allow storage in new storage formats. This is done by writing a new class inheriting from :class:`aerovaldb.AerovalDB`.

Unless overridden, getters and setters will be routed to :meth:`aerovaldb.AerovalDB._get` and :meth:`aerovaldb.AerovalDB._put` respectively, so this is were the main read and write behaviour should be implemented. These functions receive a route, as well as arguments based on which to get/put data and are intended to be used based on route-lookup (for example, :class:`aerovaldb.jsondb.jsonfiledb.AerovalJsonFileDB` translates the route into a file path template, while :class:`aerovaldb.sqlitedb.sqlitedb.AerovalSqliteDB` translates the route into a table name).

URI Scheme
----------
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Writing
installation
api
locking
extending-aerovaldb
genindex

Indices and tables
Expand Down
19 changes: 11 additions & 8 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@ Installation

You can install aerovaldb via pip or from source.

Via pip
^^^^^^^
Latest Stable Release:
^^^^^^^^^^^^^^^^^^^^^^

This will install the latest aerovaldb and all its dependencies.
This will install the latest stable aerovaldb version from PyPi:
::
pip install aerovaldb

# install aerovaldb
python -m pip install aerovaldb@git+https://github.com/metno/aerovaldb@main
Development releases:
^^^^^^^^^^^^^^^^^^^^^

This will install the most recent development version from Github:
::
pip install git+https://github.com/metno/aerovaldb.git@main

From source:
^^^^^^^
::
^^^^^^^^^^^^

# install aerovaldb on machines with numpy
::
git clone https://github.com/metno/aerovaldb.git
cd aerovaldb
python -m pip install .
Expand Down
Loading
Loading