summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2014-05-19 23:51:50 +0200
committerSebastian Thiel <byronimo@gmail.com>2014-05-19 23:51:50 +0200
commitf0680101739da3435bbae0139765bb5ce65bcb92 (patch)
treeefedff713e6735dd1082c32c794118a4f620f355
parent8a60e9ed4724aafd9d0e51012599ea5d1672cabc (diff)
downloadsmmap-f0680101739da3435bbae0139765bb5ce65bcb92.tar.gz
Added coverage reporting.
In the process, I removed tox as it made things so much more complex for me.
-rw-r--r--.coveragerc10
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml15
-rw-r--r--README.md (renamed from README.rst)70
-rw-r--r--tox.ini11
5 files changed, 57 insertions, 50 deletions
diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 0000000..e61d27b
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,10 @@
+[run]
+source = smmap
+
+; to make nosetests happy
+[report]
+omit =
+ */yaml*
+ */tests/*
+ */python?.?/*
+ */site-packages/nose/* \ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 11852be..2081aaf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
build/
.coverage
coverage
+cover/
dist/
MANIFEST
.tox
diff --git a/.travis.yml b/.travis.yml
index 91f4328..c63e5e3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,10 +1,11 @@
language: python
-env:
- - TOXENV=py26
- - TOXENV=py27
- - TOXENV=py33
- - TOXENV=py34
+python:
+ - "2.6"
+ - "2.7"
+ - "3.3"
install:
- - pip install tox
+ - pip install coveralls
script:
- - tox
+ - nosetests --with-coverage
+after_success:
+ - coveralls
diff --git a/README.rst b/README.md
index 84feb37..c056ed1 100644
--- a/README.rst
+++ b/README.md
@@ -1,15 +1,15 @@
-###########
-Motivation
-###########
+## Motivation
+
When reading from many possibly large files in a fashion similar to random access, it is usually the fastest and most efficient to use memory maps.
Although memory maps have many advantages, they represent a very limited system resource as every map uses one file descriptor, whose amount is limited per process. On 32 bit systems, the amount of memory you can have mapped at a time is naturally limited to theoretical 4GB of memory, which may not be enough for some applications.
-########
-Overview
-########
-.. image:: https://travis-ci.org/Byron/smmap.svg?branch=master :target: https://travis-ci.org/Byron/smmap
+
+## Overview
+
+[![Build Status](https://travis-ci.org/Byron/smmap.svg?branch=master)](https://travis-ci.org/Byron/smmap)
+[![Coverage Status](https://coveralls.io/repos/Byron/smmap/badge.png)](https://coveralls.io/r/Byron/smmap)
Smmap wraps an interface around mmap and tracks the mapped files as well as the amount of clients who use it. If the system runs out of resources, or if a memory limit is reached, it will automatically unload unused maps to allow continued operation.
@@ -21,42 +21,49 @@ Although the library can be used most efficiently with its native interface, a B
For performance critical 64 bit applications, a simplified version of memory mapping is provided which always maps the whole file, but still provides the benefit of unloading unused mappings on demand.
-#############
-Prerequisites
-#############
+
+
+## Prerequisites
+
* Python 2.4, 2.5 or 2.6
* OSX, Windows or Linux
The package was tested on all of the previously mentioned configurations.
-###########
-Limitations
-###########
+
+
+## Limitations
+
* The memory access is read-only by design.
* In python below 2.6, memory maps will be created in compatibility mode which works, but creates inefficient memory mappings as they always start at offset 0.
* It wasn't tested on python 2.7 and 3.x.
-################
-Installing smmap
-################
-Its easiest to install smmap using the *easy_install* or *pip* program, which is part of the `setuptools`_ or `pip`_ respectively::
+
+## Installing smmap
+
+Its easiest to install smmap using the *easy_install* or *pip* program, which is part of the [setuptools](http://peak.telecommunity.com/DevCenter/setuptools) or [pip](http://www.pip-installer.org/en/latest) respectively:
- $ easy_install smmap
- # or
- $ pip install smmap
+```bash
+$ easy_install smmap
+# or
+$ pip install smmap
+```
As the command will install smmap in your respective python distribution, you will most likely need root permissions to authorize the required changes.
-If you have downloaded the source archive, the package can be installed by running the ``setup.py`` script::
+If you have downloaded the source archive, the package can be installed by running the `setup.py` script:
- $ python setup.py install
+```bash
+$ python setup.py install
+```
+
+It is advised to have a look at the **Usage Guide** for a brief introduction on the different database implementations.
+
-It is advised to have a look at the :ref:`Usage Guide <tutorial-label>` for a brief introduction on the different database implementations.
-##################
-Homepage and Links
-##################
-The project is home on github at `https://github.com/Byron/smmap <https://github.com/Byron/smmap>`_.
+## Homepage and Links
+
+The project is home on github at https://github.com/Byron/smmap .
The latest source can be cloned from github as well:
@@ -72,10 +79,9 @@ Issues can be filed on github:
* https://github.com/Byron/smmap/issues
-###################
-License Information
-###################
+
+
+## License Information
+
*smmap* is licensed under the New BSD License.
-.. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools
-.. _pip: http://www.pip-installer.org/en/latest/
diff --git a/tox.ini b/tox.ini
deleted file mode 100644
index 80190d0..0000000
--- a/tox.ini
+++ /dev/null
@@ -1,11 +0,0 @@
-# Tox (http://tox.testrun.org/) is a tool for running tests
-# in multiple virtualenvs. This configuration file will run the
-# test suite on all supported python versions. To use it, "pip install tox"
-# and then run "tox" from this directory.
-
-[tox]
-envlist = py26, py27, py33, py34
-
-[testenv]
-commands = nosetests
-deps = nose