Science Score: 44.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
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.0%) to scientific vocabulary
Repository
istsos-miu
Basic Info
- Host: GitHub
- Owner: istSOS
- License: other
- Language: Python
- Default Branch: main
- Size: 1.46 MB
Statistics
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 20
- Releases: 0
Metadata Files
README.md
CREATE FASTAPI
sudo docker compose up -d
For updating the docker image use the command: \
sudo docker compose up -d --build
See the automatic interactive API documentation
http://127.0.0.1:8018/v1.1/docs
Install httpx for test
pip install httpx
Change IP address for test
Inside app/test_main.py file insert yours IP address at line 13:
pgpool = await asyncpg.createpool(dsn='postgresql://admin:admin@<IPADDRESS>:55432/istsos_test')
Run test
cd /app
pytest
TBD
VERSIONING
docker compose up -d
if not exists load DB schema 'sensorthings' & functions from \database\istsos_schema.sql
update schema in postgREST
docker compose kill -s SIGUSR1 postgrest
See the automatic interactive API documentation
http://127.0.0.1:8018/v1.1/docs
USE STA APIs (proof of concept)
http://127.0.0.1:8018/v1.1/Observations?asofsystem_time=2023-04-23T15:56:16.123000%2B02:00 http://127.0.0.1:8018/v1.1/Observations
http://localhost:3000/Thing?select=id,name,Location(*),Datastream(id,name,unitOfMeasurement,ObservedProperty(name),Observation(result,phenomenonTime))&limit=1000&properties-%3E%3Emodel=eq.TS-100&Datastream.Observation.order=phenomenonTime.desc&Datastream.Observation.limit=1
http://localhost:3000/Thing? select= id, name, Location(*), Datastream( id, name, unitOfMeasurement, ObservedProperty( name ), Observation( result,phenomenonTime ) ) &limit=1000 &properties-%3E%3Emodel=eq.TS-100 &Datastream.Observation.order=phenomenonTime.desc &Datastream.Observation.limit=1
/v1.1/Things? $select=id,name,description,properties &$top=1000 &$filter=properties/type eq 'station' &$expand= Locations, Datastreams( $select= id,name,unitOfMeasurement ;$expand= ObservedProperty($select=name), Observations( $select=result,phenomenonTime ;$orderby=phenomenonTime desc ;$top=1 ) )
Fast API connection to data base
Run the following commands:
cd fastapi/app/v1
uvicorn get_datastream:app --reload
In the browser type "IP:port"//datastreams/1
You can also check using : http://127.0.0.1:8000/docs
Change the host IP address in the script as per your docker IP in get_datastream.py file.
Adding dummy data to database
When you build the docker the script will automatically clear the database and add the static and dynamic values as per config.yaml file.
For disabling addtion of the synthetic data to database
inside the .env
change the variable dummy_data to False
HOSTNAME=http://localhost:8018/v1.1/
dummy_data=False #True/False When True database table will be cleared and populated with synthetic data
<!-- You can also run the script once the docker is build
Inside dummy_data folder run the gen_data.py script
For populating data:
python3 gen_data.py
populating data will first clear all the intial data from the database table and then will add data as per config file
For clearing data:
python3 clear_data.py
This will clear all data from the tables
importing hoppscotch files
- open hoppscotch.io
- login
- import json file from
API_testfolder > for CORS error download the browser plugin of hoppscotch for more details refer here.
Owner
- Name: istSOS
- Login: istSOS
- Kind: organization
- Location: Lugano, Switzerland
- Website: http://istsos.org
- Repositories: 13
- Profile: https://github.com/istSOS
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: istSOSTAμ
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Massimiliano
family-names: Cannata
email: massimiliano.cannata@supsi.ch
affiliation: SUPSI
orcid: 'https://orcid.org/0000-0003-2527-1416'
- given-names: Milan P.
family-names: Antonovic
orcid: 'https://orcid.org/0000-0003-2300-9051'
email: milan.antonovic@gmail.com
affiliation: TDM sa
- given-names: Daniele
family-names: Strigaro
email: daniele.strigaro@supsi.ch
affiliation: SUPSI
orcid: 'https://orcid.org/0000-0002-7040-4364'
- given-names: Mirko
family-names: Cardoso
email: mirko.cardoso@ias.ti.ch
affiliation: IAS
identifiers:
- type: doi
value: 10.5281/zenodo.5888498
description: The URL of version 2.4.2 of the software
repository-code: 'https://github.com/istSOS'
url: 'http://www.istsos.org/'
abstract: >-
istSOS is sensor data management tool that allows
collection, maintenance and publishing of monitoring
observations using the Open Geospatial Consortium (OGC)
Sensor Observation Service (SOS) standard.
istSOS strictly implements the SOS 1.0.0 standard, and has
passed the OGC CITE (Compliance + Interopability Testing +
Evaluation) units tests.
keywords:
- OGC
- Sensor Observation Service
- data management
license: GPL-2.0-or-later
version: μ0.0.1
date-released: '2020-05-29'
GitHub Events
Total
- Gollum event: 2
Last Year
- Gollum event: 2
Dependencies
- timescale/timescaledb-ha pg14.6-ts2.9.2-latest build
- timescale/timescaledb-ha pg14.6-ts2.9.2-latest build
- postgrest/postgrest latest
- python 3.10 build
- asyncpg *
- fastapi >=0.68.0,<0.69.0
- pydantic >=1.8.0,<2.0.0
- pypika *
- ujson *
- uvicorn >=0.15.0,<0.16.0
- python 3.10 build
- PyYAML *
- psycopg2 *
- python-dotenv *