Metrics Analysis for OGC Web Services
GeoUsage is a pure Python package providing OGC Web Services usage analysis.
The easiest way to install GeoUsage is via the Python pip utility:
pip install GeoUsage- Python 3. Works with Python 2.7
- virtualenv
Dependencies are listed in requirements.txt. Dependencies are automatically installed during GeoUsage installation.
# setup virtualenv
virtualenv --system-site-packages -p python3 GeoUsage
cd GeoUsage
source bin/activate
# clone codebase and install
git clone https://github.com/geopython/GeoUsage.git
cd GeoUsage
python setup.py build
python setup.py installcp GeoUsage-config.env local.env
vi local.env # update environment variables accordingly
# help
GeoUsage --help
# get version
GeoUsage --version
# perform WMS analysis on an Apache logfile
GeoUsage log analyze --service=OGC:WMS --logfile </path/to/apache_logfile>
# add verbose mode
GeoUsage log analyze --service=OGC:WMS --logfile </path/to/apache_logfile> --verbosity=INFO
# query a Mailman mailing list member count
GeoUsage mailing_list member_countfrom GeoUsage.mailman import MailmanAdmin
ma = MailmanAdmin('http://example.org/mailman/admin/list', 'secret')
print(ma.member_count)
```k
## Development
### Running Tests
```bash
# install dev requirements
pip install -r requirements-dev.txt
# run tests like this:
python GeoUsage/tests/run_tests.py
# or this:
python setup.py test
# measure code coverage
coverage run --source=GeoUsage -m unittest GeoUsage.tests.run_tests
coverage report -mpython setup.py sdist bdist_wheel --universal
twine upload dist/*All bugs, enhancements and issues are managed on GitHub.
