Coder Social home page Coder Social logo

pygeoapi-cdms-plugin's Introduction

pygeoapi-cdms-plugin

CDMSProvider() plugin to allow supported CDMSs to be used with pygeoapi

pip install -r requirements.txt
pip install -r requirements-dev.txt

# Currently we need to also install the pygeoapi dev requirements file
# (possibly just for `flask_cors`). The requirements file doesn't exist
# in the installed package so we're piping it to pip using curl.
pip install -r <(curl https://raw.githubusercontent.com/geopython/pygeoapi/master/requirements-dev.txt)

# Create an opencdmsdb database container
opencdms-test-data startdb --containers opencdmsdb
sleep 20

# Override current opencdms.config setting for db port
export CDM_DB_PORT=35432

export PYGEOAPI_CONFIG=$(pwd)/pygeoapi-config.yml
export PYGEOAPI_OPENAPI=$(pwd)/pygeoapi-openapi.yml

opencdms seed-db

# If you won't be running pygeoapi on localhost then change the config appropriately,
# e.g. for GitHub codespaces, change server `url` in pygeoapi-config.yml to $CODESPACE_NAME
# However, you wouldn't want to commit this change back to the repository
sed -i "s|url: http://localhost:5000|url: https://${CODESPACE_NAME}-5000.preview.app.github.dev|g" pygeoapi-config.yml

# Run the server
pygeoapi serve

# To stop the server, press CTRL+C
opencdms clear-db
opencdms-test-data stopdb

pygeoapi-cdms-plugin's People

Contributors

isedwards avatar

Watchers

 avatar  avatar  avatar  avatar

pygeoapi-cdms-plugin's Issues

Move pygeoapi CDMSProvider plugin to this separate repo

  • Move pygeoapi provider to this separate pygeoapi-cdms-plugin repo and remove associated code, including dependencies, from pyopencdms
  • If possible, replace DTOs by upgrading our existing data classes to pydantic data classes
  • Current plugin is using SQLAlchemy db.session to query our models.Observation domain model. It's probably okay for now but we should raise an issue to ensure future querying is via the domain model methods - which in turn may choose to use SQLAlchemy depending on the data store being used
  • Use Black for code formatting

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.