eecology-sms-reciever

Webservice to store SMS messages into a database table

https://github.com/nlesc/eecology-sms-reciever

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.5%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Webservice to store SMS messages into a database table

Basic Info
  • Host: GitHub
  • Owner: NLeSC
  • License: apache-2.0
  • Language: Python
  • Default Branch: master
  • Size: 79.1 KB
Statistics
  • Stars: 1
  • Watchers: 3
  • Forks: 0
  • Open Issues: 2
  • Releases: 6
Created over 11 years ago · Last pushed over 3 years ago
Metadata Files
Readme Changelog License Citation Zenodo

README.md

eEcology-SMS-reciever

Build Status Scrutinizer Code Quality Code Coverage DOI

Webservice to store SMS messages into a database table.

Accepts SMS messages from SMSSync Android app see https://play.google.com/store/apps/details?id=org.addhen.smssync, http://smssync.ushahidi.com/ and https://github.com/ushahidi/SMSSync .

Getting Started

cd <directory containing this file>
pipenv --two
pipenv shell
pip install -r requirements.txt
cp development.ini-dist development.ini

Edit development.ini to configure db connection, etc.

Create sms database schema:

psql -h db.e-ecology.sara.nl eecology < sms.sql

Grant <someone> user rights to perform inserts on table, see comments in sms.sql for required grants.

Start service:

pserve development.ini

Service running at http://localhost:6566/sms/

SMSSync configuration

Configure Sync URL with:

  • Secret key = Same as value of 'secret_key' key in *ini file.
  • Keyword = '^ID', all tracker messages start with 'ID'
  • URL = Depends on where you run this server and if it is reversed proxied.
  • HTTP Method = POST
  • Data Format = URLEncoded

Docker build

Construct image

  1. sudo docker build -t sverhoeven/smsreciever:1.0.0 .
  2. Export or push to registry

Run container

  1. Import or pull from registry
  2. sudo docker run -p 6566:6566 --env DB_URL="postgresql://*******:********@db.e-ecology.sara.nl/eecology?sslmode=require" --env SECRET_KEY=supersecretkey -d --name smsreciever sverhoeven/smsreciever:1.0.0

Error log is available with sudo docker logs smsreciever.

Web application will run on http://localhost:6566/sms/

Database upgrades

The latest schema is specified in sms.sql.

Using alembic (http://pythonhosted.org/alembic/) for database migrations.

To create a new migration step run:

alembic revision -m "Timestamp without time zone"
# edit alembic/versions/*py files to specify changes

To upgrade an existing schema run:

alembic upgrade head --sql | psql ...

Tests

Unit tests

The unit tests can be run with nosetests

Functional tests

The functional tests needs

  • Postgresql database with PostGIS extension
  • Postgresql user with schema and user creation permission

The tests can be run with

DB_URL=postgresql://postgres:mysecretpassword@172.17.0.2/postgres nosetests -a functional

Postgis in a docker container can be used to test. docker run --name some-postgis -e POSTGRES_PASSWORD=mysecretpassword -d mdillon/postgis

Owner

  • Name: Netherlands eScience Center
  • Login: NLeSC
  • Kind: organization
  • Location: Amsterdam, The Netherlands

Citation (CITATION.cff)

# YAML 1.2
# Metadata for citation of this software according to the CFF format (https://citation-file-format.github.io/)
cff-version: 1.0.3
message: If you use this software, please cite it as below.
title: eEcology SMS reciever
doi: 10.5281/zenodo.47325
authors:
- given-names: Stefan
  family-names: Verhoeven
  affiliation: Nederlands eScience Center
version: 1.0.9
date-released: 2016-03-10
repository-code: https://github.com/NLeSC/eEcology-SMS-reciever
license: Apache-2.0

GitHub Events

Total
Last Year

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 56
  • Total Committers: 2
  • Avg Commits per committer: 28.0
  • Development Distribution Score (DDS): 0.018
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Stefan Verhoeven s****n@e****l 55
Stefan Verhoeven s****n@e****r 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 1
  • Total pull requests: 3
  • Average time to close issues: N/A
  • Average time to close pull requests: 2 minutes
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • sverhoeven (1)
Pull Request Authors
  • sverhoeven (3)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

Dockerfile docker
  • python 2-onbuild build
requirements.txt pypi
  • WebTest *
  • coverage *
  • mock *
  • nose *