https://github.com/allixender/ogcapi-dggs-webdev-python
Testing Python code generated servers for ogcapi-discrete-global-grid-systems
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○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 (11.7%) to scientific vocabulary
Keywords
Repository
Testing Python code generated servers for ogcapi-discrete-global-grid-systems
Basic Info
- Host: GitHub
- Owner: allixender
- Language: Jupyter Notebook
- Default Branch: main
- Homepage: https://dggs-api-bozea3cspa-ew.a.run.app/dggs-api
- Size: 38.5 MB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
Swagger generated server for OGC DGGS API testing
Overview
This server was generated by the swagger-codegen project. By using the OpenAPI-Spec from a remote server, you can easily generate a server stub. This is an example of building a swagger-enabled Flask server.
This example uses the Connexion library on top of Flask.
The OpenAPI target definition is of DGGS API 0.0.6 of the DGGS SWG wip-ogcapidggszonequeryprocessstyle
The latest iteration of that spec is actually ogcapidggs, unfortunately also 0.0.6. This repo is not yet implementing this. As part of the October 2021 ogcapi-code-sprint I/we are aiming to support the new API SPEC. Stay tuned or pull request.
Requirements
Python 3.5.2+
Usage
We need an env var named TABLESCONFIG this TABLESCONFIG var should hold the path to a file# based on the tables.template.conf wich holds the access info to the database definition.
The most useful is the demo test.sb SQlite database.
```
for example
export TABLES_CONFIG=$HOME/tables.conf
```
To run the server, please execute the following from the root directory:
``` pip3 install -r requirements.txt
configure clickhouse db access
export TABLES_CONFIG=tables.template.conf
python3 -m dggsapiserver
or for dev and testing
python server.py
```
and open your browser to here:
http://localhost:8080/dggs-api/ui/
Your Swagger definition lives here:
http://localhost:8080/dggs-api/openapi.json
To launch the integration tests, use tox:
sudo pip install tox
tox
Remark: I haven't had time to update the tests, please feel free to do so
Running with Docker
To run the server on a Docker container, please execute the following from the root directory:
```bash
building the image
docker build -t dggsapiserver .
starting up a container
docker run -p 8080:8080 dggsapiserver ```
A recent demo instance with the sqlite3 test.db is running at: https://dggs-api-bozea3cspa-ew.a.run.app/dggs-api/
Owner
- Name: Alex Kmoch
- Login: allixender
- Kind: user
- Location: Estonia
- Company: University of Tartu
- Website: https://kodu.ut.ee/~kmoch/
- Twitter: allixender
- Repositories: 75
- Profile: https://github.com/allixender
Geospatial Web Dev Ops Researcher Tinkerer
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total 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
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
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- python 3.8-slim build
- clickhouse_driver *
- psycopg2-binary *
- rhealpix-sf *
- rhealpixdggs >=0.5.3
- connexion ==2.6.0
- flask-cors *
- h3 >=3.7
- pyhocon *
- python_dateutil ==2.6.0
- setuptools >=21.0.0
- coverage >=4.0.3 test
- flask_testing ==0.8.0 test
- nose >=1.3.7 test
- pluggy >=0.3.1 test
- py >=1.4.31 test
- randomize >=0.13 test
- tox ==3.20.1 test