Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge current state of changes #1

Open
wants to merge 68 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
09ceb37
Use commandline arguments
bpross-52n Aug 31, 2018
718bc04
Merge branch 'feature/wps-modifications-new'
bpross-52n Oct 2, 2018
8b00987
Intendation
bpross-52n Oct 2, 2018
1282b44
Removed import statements that are in comments
nbrinckm Mar 26, 2019
db3fdf8
Sqlite-DB instead of csv files
nbrinckm Mar 26, 2019
488af13
Switched ordering of disaggregation and spatial filtering
nbrinckm Mar 26, 2019
a2e43f1
Switch to sqlalchemy
nbrinckm Mar 28, 2019
7cb006f
version with oop
nbrinckm Mar 28, 2019
fa610e7
Refactoring
nbrinckm Mar 28, 2019
a51b339
Changed name for the event table
nbrinckm Mar 28, 2019
a482f28
Readme
nbrinckm Mar 28, 2019
1511ade
Add requirements section to README.md
ruester Apr 25, 2019
a33da6e
Add .gitignore
ruester Apr 25, 2019
971aaa2
Add QuakeML schema and validate the output against it
ruester May 2, 2019
0f0519c
Fix namespace of output file
ruester May 2, 2019
e83278b
quakeml.py: Add a space after each comma, colon and hash mark for bet…
ruester May 2, 2019
e379ca9
Fix format of ResourceIdentifier to validate against the schema
ruester May 2, 2019
d978de9
Fix formating of double values to validate against schema
ruester May 2, 2019
3c53766
Fix position of originUncertainty element in QuakeML output
ruester May 2, 2019
435ef70
Fix use of author values within creationInfo element
ruester May 2, 2019
f87c43b
Fix use of preferredPlane attribute in QuakeML output
ruester May 2, 2019
7cebeba
Merge pull request #1 from nbrinckm/schema-validation
nbrinckm May 2, 2019
8318fcf
Add script to generate the SLD file for Quakeledger
ruester Jul 12, 2019
9927eef
Add SLD for Quakeledger
ruester Jul 12, 2019
57c9857
Merge branch 'sld'
ruester Aug 15, 2019
c5e42f4
Some adjustments to read quakeml (and some to rewrite it to quakeml a…
nbrinckm Aug 27, 2019
40bfb28
Merge pull request #1 from gfzriesgos/adjust-reading-quakeml
ruester Aug 27, 2019
030c813
Updated the sqlite db and zipped it
nbrinckm Sep 18, 2019
2b9a4f0
Fix for a bug on filtering with stochastic type
nbrinckm Sep 19, 2019
d5d31de
Fixed a bug on mapping of the attributes + recreated the peru extensi…
nbrinckm Sep 19, 2019
ccbaffb
Fixed a validation problem with missing strike, dip and rake
nbrinckm Sep 19, 2019
1f7800e
Added the validation test on unittest level
nbrinckm Sep 26, 2019
a3ed8ed
Added unittests (here full test for cmd application)
nbrinckm Sep 26, 2019
7b3ed8b
Added best practices files mentioned in the GFZ guide
nbrinckm Sep 26, 2019
d509777
Refactored the migration (adding peru data)
nbrinckm Sep 26, 2019
9255ddc
Other unittests and a small fix on the adding event script
nbrinckm Sep 26, 2019
5e2b5a9
Added elements to the changelog
nbrinckm Sep 26, 2019
8f82953
Fixed a pep8 issue
nbrinckm Sep 26, 2019
069ee99
Updated the db (with probability and year for peru stochastic events)
nbrinckm Sep 26, 2019
4f123d8
Merge pull request #2 from gfzriesgos/extension_for_peru
ruester Oct 15, 2019
80ee5da
Move migration scripts to separate directory
ruester Oct 15, 2019
50234b4
Add metadata files
ruester Oct 15, 2019
46ad276
Improve Dockerfile
ruester Oct 15, 2019
1f39cee
Remove tests regarding the peru migration
ruester Oct 15, 2019
49d13aa
Add CI configuration
ruester Oct 14, 2019
a77f052
Add build badges to README.md
ruester Oct 15, 2019
61188bd
Dockerfile: Add step to unzip the database
ruester Oct 15, 2019
b94e7ea
README.md: Fix heading
ruester Oct 16, 2019
99eecf4
substituted sqlite archive updated by AWI
sensum-zz Oct 20, 2019
33b6258
Code to merge the existing peru events and the chile tsunami events
nbrinckm Oct 21, 2019
1320eee
Replaced the existing peru events with those from alirezas file
nbrinckm Oct 24, 2019
a4497f8
Merge pull request #3 from gfzriesgos/tsunami-events-peru
ruester Oct 24, 2019
c7a3c7d
Add three more events for Peru
ruester Nov 7, 2019
41c0293
Fix coordinates for event peru_70000012
ruester Nov 8, 2019
b9b0192
Add 10 new expert events for Peru
ruester Nov 18, 2019
a8e912a
Vacuum database to skip zipping the file
ruester Nov 18, 2019
f8346a6
Update CI script for new database workflow
ruester Nov 18, 2019
721a191
Add citation string
nbrinckm Oct 11, 2021
7931b8f
Merge pull request #4 from gfzriesgos/add-citation
nbrinckm Oct 11, 2021
bd651b4
Use full legal name for GFZ copyright
nbrinckm Nov 18, 2021
8accaeb
Apply changes from black
ruester Jan 14, 2022
ce439bf
Add GitLab CI
ruester Jan 14, 2022
26ef0d3
Merge branch 'add-gitlab-ci' into 'master'
gfzriesgos-bot Jan 18, 2022
37d9e0b
Fix image name in metadata
ruester Jan 19, 2022
fad82c7
CI: Include versions in process description
ruester Jan 24, 2022
93a179b
CI: Add trigger for deployment of latest docker image
ruester Mar 28, 2022
d2b9085
Remove one earthquake from the catalogue
nbrinckm Oct 24, 2023
5f02101
Merge branch '3-remove-eq-80000011' into 'master'
nbrinckm Oct 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
__pycache__
.idea
test.xml
*.swp
env
148 changes: 148 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# Copyright © 2021 Helmholtz Centre Potsdam GFZ German Research Centre for Geosciences, Potsdam, Germany
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.

stages:
- test
- build
- deploy

variables:
LC_ALL: "C.UTF-8"
LANG: "C.UTF-8"

cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- .pip

.install_requirements: &install_requirements
- DEBIAN_FRONTEND=noninteractive apt-get update && apt-get upgrade -y
- DEBIAN_FRONTEND=noninteractive apt-get install python3 python3-pip python3-sqlalchemy -y
- pip3 install --cache-dir=.pip -r requirements.txt

verify_python:
image: python:3.6.9-buster
stage: test
tags:
- group
before_script:
- *install_requirements
script:
- python3 -m compileall .

python_pycodestyle:
image: python:3.6.9-buster
stage: test
# TODO: fix code to fit with PEP8 guidelines
allow_failure: true
tags:
- group
before_script:
- *install_requirements
- pip3 install --cache-dir=.pip pycodestyle
script:
- shopt -s globstar && pycodestyle {,**/}*.py

python_pylint:
image: python:3.6.9-buster
stage: test
# TODO: fix code to get a better pylint rating
allow_failure: true
tags:
- group
before_script:
- *install_requirements
- pip3 install --cache-dir=.pip pylint
script:
- shopt -s globstar && pylint --fail-under=8 {,**/}*.py

python_black:
image: python:3.6.9-buster
stage: test
tags:
- group
before_script:
- *install_requirements
- pip3 install --cache-dir=.pip black==21.4b2
script:
- black -l 79 --check .

run_tests:
image: python:3.6.9-buster
stage: test
tags:
- group
before_script:
- *install_requirements
script:
- python3 test_all.py

verify_json:
stage: test
image: registry.gitlab.com/pipeline-components/jsonlint:0.12.0
cache: {}
script:
- |
find . -not -path './.git/*' -name '*.json' -type f -print0 |
parallel --will-cite -k -0 -n1 jsonlint -q

dockerbuild_latest:
image: docker/compose:1.29.2
stage: build
cache: {}
tags:
- group
script:
- docker build -t quakeledger:latest -f metadata/Dockerfile .

# push latest image to Docker Hub
- docker tag quakeledger:latest gfzriesgos/quakeledger:latest
- docker login -u ${DOCKERHUB_USER} -p ${DOCKERHUB_PASSWORD}
- docker push gfzriesgos/quakeledger:latest

# push latest image to GitLab Container Registry
- docker tag quakeledger:latest git.gfz-potsdam.de:5000/id2/riesgos/quakeledger:latest
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push git.gfz-potsdam.de:5000/id2/riesgos/quakeledger:latest

dockerbuild_tagged:
image: docker/compose:1.29.2
stage: build
cache: {}
tags:
- group
rules:
- if: $CI_COMMIT_TAG
script:
- sed -i -e "s@:latest@:${CI_COMMIT_TAG}@g" metadata/quakeledger.json
- docker build -t quakeledger:${CI_COMMIT_TAG} -f metadata/Dockerfile .

# push image to Docker Hub
- docker tag quakeledger:${CI_COMMIT_TAG} gfzriesgos/quakeledger:${CI_COMMIT_TAG}
- docker login -u ${DOCKERHUB_USER} -p ${DOCKERHUB_PASSWORD}
- docker push gfzriesgos/quakeledger:${CI_COMMIT_TAG}

# push image to GitLab Container Registry
- docker tag quakeledger:${CI_COMMIT_TAG} git.gfz-potsdam.de:5000/id2/riesgos/quakeledger:${CI_COMMIT_TAG}
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push git.gfz-potsdam.de:5000/id2/riesgos/quakeledger:${CI_COMMIT_TAG}

deploy_latest:
stage: deploy
variables:
DEPLOY_LATEST_IMAGES: "true"
trigger:
project: id2/riesgos/gfz-riesgos-wps-repository
branch: master
strategy: depend
Loading