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
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.5%) to scientific vocabulary
Repository
MSC OGC API pygeoapi deployment
Basic Info
- Host: GitHub
- Owner: ECCC-MSC
- License: mit
- Language: Python
- Default Branch: master
- Size: 1.77 MB
Statistics
- Stars: 19
- Watchers: 10
- Forks: 28
- Open Issues: 4
- Releases: 0
Metadata Files
README.md
msc_pygeoapi
Overview
MSC GeoMet pygeoapi server configuration and utilities
Installation
Requirements
- Python 3
- virtualenv
Dependencies
Dependencies are listed in requirements.txt. Dependencies are automatically installed during msc-pygeoapi installation.
Dependencies of note:
- Elasticsearch (5 or above)
- i.e. sudo echodeb https://artifacts.elastic.co/packages/5.x/apt stable main> /etc/apt/sources.list.d/elastic.list
- pygeoapi
Installing msc-pygeoapi
```bash
setup virtualenv
python3 -m venv --system-site-packages msc-pygeoapi cd msc-pygeoapi source bin/activate
clone codebase
git clone https://github.com/ECCC-MSC/msc-pygeoapi.git cd msc-pygeoapi
add GCWeb theme files
curl -L https://github.com/wet-boew/GCWeb/releases/download/v14.6.0/themes-dist-14.6.0-gcweb.1.zip -o ./themes-gcweb.zip unzip -o ./themes-gcweb.zip "/GCWeb/" -d theme/static unzip -o ./themes-gcweb.zip "/wet-boew/" -d theme/static mv ./theme/static/themes-dist-14.6.0-gcweb ./theme/static/themes-gcweb rm -f ./themes-gcweb.zip
install codebase
python setup.py build python setup.py install
configure environment
cp msc-pygeoapi.env dev.env vi dev.env # edit paths accordingly . dev.env
serve API
pygeoapi serve ```
Running
bash
msc-pygeoapi --version
Server will be located at http://localhost/features
Sample Queries
Hydrometric features (Water Level and Flow)
```bash
all collections
http://localhost/features/collections
hydrometric daily mean
http://localhost/features/collections/hydrometric-daily-mean
filter by time
http://localhost/features/collections/hydrometric-daily-mean/items?time=2011-11-11/2012-11-11
filter by bbox
http://localhost/features/collections/hydrometric-daily-mean/items?bbox=-80,45,-50,55
filter by station number
http://localhost/features/collections/hydrometric-daily-mean/items?STATION_NUMBER=02RH066
filter by bbox
http://localhost/features/collections/hydrometric-daily-mean/items?bbox=-80,40,-50,54
filter by station number and time
http://localhost/features/collections/hydrometric-daily-mean/items?STATION_NUMBER=02RH066&time=2011-01-01/2012-12-31
filter by station number and time, limit results
http://localhost/features/collections/hydrometric-daily-mean/items?STATION_NUMBER=02RH066&time=2011-01-01/2012-12-31&limit=100
filter by station number and time, limit and page results
http://localhost/features/collections/hydrometric-daily-mean/items?STATION_NUMBER=02RH066&time=2011-01-01/2012-12-31&limit=100&offset=100
HTML respsonses
filter by active stations in Nunavut
http://localhost/features/collections/hydrometric-stations/items?STATUSEN=Active&limit=5000&f=html&PROVTERRSTATELOC=NU ```
Running the loaders
```bash pip install -r requirements-oracle.txt
view all data loaders available
msc-pygeoapi data
examples for some loaders
msc-pygeoapi data hydat
bulletins - delete index
msc-pygeoapi data bulletins_realtime delete-index # use --yes flag to bypass prompt
realtime - standard workflow
msc-pygeoapi data hydrometric-realtime cache-stations # download stations list to $MSCPYGEOAPICACHEDIR location
srsubscribe start deploy/default/sarracenia/hydrometricrealtime.conf # begin realtime update process
msc-pygeoapi data hydrometric-realtime clean-indexes --days 30 # use --yes flag to bypass prompt (usually in crontab) ```
Running processes
```bash
run the CCCS Raster drill process (returns GeoJSON by default)
msc-pygeoapi process cccs execute raster-drill --y=45 --x=-75 --layer=CMIP5.SFCWIND.HISTO.WINTER.ABS_PCTL95
run the CCCS Raster drill process returning CSV
msc-pygeoapi process cccs execute raster-drill --y=45 --x=-75 --layer=CMIP5.SFCWIND.HISTO.WINTER.ABS_PCTL95 --format=CSV ```
Development
Running Tests
```bash
install dev requirements
pip install -r requirements-dev.txt
API tests run against http://localhost:5000
use --url to override
run all tests
pytest
run one test file
pytest test/test_hydat.py
override endpoint
pytest test/test_hydat.py --url https://example.org/dev
skip API tests (run only unit tests)
pytest -k 'not api' ```
Multilingual Updates
```bash
Extract from latest code the keys to be translated
pybabel extract -F babel-mapping.ini -o locale/messages.pot ./
Update the existing .po language file with new/updated keys:
pybabel update -d locale -l fr -i locale/messages.pot
Open the relevant .po file and contribute your translations
vi locale/fr/LC_MESSAGES/messages.po
Then compile a .mo file to be used by the application
pybabel compile -d locale -l fr ```
Releasing
bash
python setup.py sdist bdist_wheel --universal
twine upload dist/*
Code Conventions
Bugs and Issues
All bugs, enhancements and issues are managed on GitHub.
Contact
Owner
- Name: Meteorological Service of Canada
- Login: ECCC-MSC
- Kind: organization
- Location: Canada
- Website: https://www.ec.gc.ca/meteo-weather
- Repositories: 12
- Profile: https://github.com/ECCC-MSC
GitHub Events
Total
- Issues event: 1
- Watch event: 4
- Delete event: 14
- Issue comment event: 17
- Push event: 108
- Pull request event: 130
- Pull request review event: 32
- Pull request review comment event: 41
- Fork event: 2
- Create event: 27
Last Year
- Issues event: 1
- Watch event: 4
- Delete event: 14
- Issue comment event: 17
- Push event: 108
- Pull request event: 130
- Pull request review event: 32
- Pull request review comment event: 41
- Fork event: 2
- Create event: 27
Committers
Last synced: 12 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Tom Kralidis | t****s@g****m | 315 |
| Louis-Philippe Rousseau Lambert | 1****P | 113 |
| Etienne Pelletier | e****r@c****a | 79 |
| Kevin Ngai | k****i | 49 |
| Louis-Philippe Rousseau Lambert | l****t@c****a | 23 |
| adanb13 | 8****3 | 14 |
| Alex Hurka | a****a@c****a | 12 |
| Bob Du | d****b@g****a | 10 |
| felixlaframboise | f****e@c****a | 5 |
| kngai | a****n@g****a | 5 |
| Geomet user for nightly docker builds | g****y@g****a | 4 |
| westhav3 | 3****t | 4 |
| PhilippeTh | 9****h | 4 |
| JustAProjectacc | 1****c | 4 |
| Ines Bosch-Alfonso | 6****h | 4 |
| Pelletier | E****r@e****a | 4 |
| Adam Capparelli | c****a@g****a | 3 |
| BrunoFang | b****g@e****a | 3 |
| cpomer10 | 4****0 | 3 |
| Mzafar2 | m****r@e****a | 2 |
| Alexandre Leroux | a****x@c****a | 2 |
| tom-cooney | 3****y | 2 |
| Samanta-A. Emes-Lapointe | s****e@e****a | 1 |
| Bob Du | b****u@c****a | 1 |
| Kevin Ngai | k****i@u****b | 1 |
| Kevin Ngai | n****k@g****a | 1 |
| Munim Adil | a****m@i****a | 1 |
| Alexandre Leroux | a****x@e****a | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 7
- Total pull requests: 307
- Average time to close issues: about 1 year
- Average time to close pull requests: 11 days
- Total issue authors: 6
- Total pull request authors: 13
- Average comments per issue: 1.71
- Average comments per pull request: 0.17
- Merged pull requests: 271
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 154
- Average time to close issues: about 1 month
- Average time to close pull requests: 8 days
- Issue authors: 1
- Pull request authors: 8
- Average comments per issue: 2.0
- Average comments per pull request: 0.2
- Merged pull requests: 125
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- BrunoFang (2)
- julemai (1)
- tristan-morris (1)
- RousseauLambertLP (1)
- tomkralidis (1)
- bo-lu (1)
Pull Request Authors
- RousseauLambertLP (105)
- Dukestep (87)
- tomkralidis (39)
- kngai (35)
- adanb13 (13)
- JustAProjectacc (9)
- BrunoFang (7)
- Mzafar2 (4)
- gdecourval (2)
- saemeslapointe (2)
- moonscape09 (2)
- ndiondegodez (1)
- PhilippeTh (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- flake8 *
- pytest *
- cx_Oracle *
- click <8
- elasticsearch <8
- gdal *
- lxml *
- parse *
- pyproj *
- python-slugify *
- pyyaml *
- rasterio *
- requests *
- sqlalchemy *
- unicodecsv *
- xarray ==0.10.2
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- ubuntu focal build
- eccc-msc/msc-pygeoapi nightly