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

Dev Version : Stable #182

Merged
merged 1,091 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1091 commits
Select commit Hold shift + click to select a range
25e2693
Merge pull request #81 from hotosm/enhance/query
kshitijrajsharma Mar 21, 2023
0779cb5
change boundaries and table name
kshitijrajsharma Mar 21, 2023
b76f1b1
Add a storage account to resource group
eternaltyro Mar 21, 2023
cc7b596
Merge pull request #95 from hotosm/enhance/storage-account
eternaltyro Mar 21, 2023
73ebf6b
Add public network access to Key Vault
eternaltyro Mar 21, 2023
a241459
Merge pull request #96 from hotosm/fix/key-vault-public-network-access
eternaltyro Mar 21, 2023
af12810
Add unique Storage Account name
eternaltyro Mar 21, 2023
bebf5e4
Merge pull request #97 from hotosm/enhance/storage-account
eternaltyro Mar 21, 2023
ba3088a
Add systemd unit files for raw-data services
eternaltyro Mar 21, 2023
b2b5540
Add inital ansible config management files
eternaltyro Mar 21, 2023
3fee126
Merge pull request #98 from hotosm/infra/add-systemd-services
eternaltyro Mar 21, 2023
243eb20
Merge pull request #99 from hotosm/infra/ansible-config-management
eternaltyro Mar 21, 2023
1df9fe4
Merge pull request #100 from hotosm/enhance/boundaries
kshitijrajsharma Mar 22, 2023
c443fb6
added missing field on countries dataset
kshitijrajsharma Mar 22, 2023
eee9f6a
Improve ansible scripts to cover more ground
eternaltyro Mar 22, 2023
247aca7
Merge pull request #102 from hotosm/infra/ansible-config-management
eternaltyro Mar 22, 2023
1d4bf54
Merge pull request #101 from hotosm/fix/country_name
kshitijrajsharma Mar 22, 2023
bb8edb4
Fix file copy problems from remote to remote
eternaltyro Mar 22, 2023
2296b9a
Adjust conditions and env files
eternaltyro Mar 22, 2023
74a10a9
Switch to saner env file name
eternaltyro Mar 22, 2023
a358560
Merge pull request #104 from hotosm/infra/ansible-config-management
eternaltyro Mar 22, 2023
8497e54
Merge pull request #103 from hotosm/infra/add-systemd-services
eternaltyro Mar 22, 2023
acd5dec
Remove systemd assertions
eternaltyro Mar 22, 2023
0ab63ef
Merge pull request #105 from hotosm/infra/add-systemd-files
eternaltyro Mar 22, 2023
9deef43
Fix virtualenv path for backend and API
eternaltyro Mar 22, 2023
bf6b998
Merge pull request #107 from hotosm/fix/backend-api-virtualenv
eternaltyro Mar 22, 2023
2513253
added query for st_equals
kshitijrajsharma Mar 22, 2023
787d61e
fix error with parameter change
kshitijrajsharma Mar 23, 2023
1428bc5
Update name of index to make it more meaningful
kshitijrajsharma Mar 23, 2023
6dd98ff
Changed dump sql file to adapt countries boundary
kshitijrajsharma Mar 23, 2023
63ca7c0
Merge pull request #108 from hotosm/enhance/country_exports
kshitijrajsharma Mar 23, 2023
87f5f9d
added centroid feature
kshitijrajsharma Mar 23, 2023
701caa0
Merge pull request #109 from hotosm/feature/centroid
kshitijrajsharma Mar 23, 2023
6af84f3
added login geofabrik and env variable for osm
kshitijrajsharma Apr 2, 2023
284c34b
merging osm files name on console
kshitijrajsharma Apr 2, 2023
4af423b
add option of flat nodes and cache
kshitijrajsharma Apr 3, 2023
95696cf
update parallel for each year
kshitijrajsharma Apr 5, 2023
1128b7f
fix bug
kshitijrajsharma Apr 5, 2023
06bf471
added parallel processing
kshitijrajsharma Apr 5, 2023
4c186b8
added range of 2005
kshitijrajsharma Apr 5, 2023
6485033
Revert "add option of flat nodes and cache"
kshitijrajsharma Apr 10, 2023
0cd1aa5
updated query
kshitijrajsharma Apr 10, 2023
c6da27e
Upgrade raw data API backend VM
eternaltyro Apr 11, 2023
b89eceb
Merge pull request #113 from hotosm/enhance/upgrade-backend-vm
eternaltyro Apr 11, 2023
d517ef5
Mark Redis endpoint output as sensitive
eternaltyro Apr 11, 2023
4512a06
Merge pull request #114 from hotosm/enhance/upgrade-backend-vm
eternaltyro Apr 11, 2023
1b7eee5
Fix invalid backend VM SKU for Gen2 Linux images
eternaltyro Apr 11, 2023
0af6b07
Merge pull request #115 from hotosm/enhance/upgrade-backend-vm
eternaltyro Apr 11, 2023
d537108
Fix secondary volume size
eternaltyro Apr 11, 2023
758cb9f
Merge pull request #116 from hotosm/enhance/upgrade-backend-vm
eternaltyro Apr 11, 2023
1d42ddd
Increase backend VM capacity
eternaltyro Apr 14, 2023
522831d
Merge pull request #118 from hotosm/fix/server-capacity
eternaltyro Apr 14, 2023
f13f2a0
changed name to raw
kshitijrajsharma Apr 15, 2023
f7f01ae
added flat_nodes option
kshitijrajsharma Apr 16, 2023
05a9969
improved primary key index
kshitijrajsharma Apr 25, 2023
767bec0
added vaccum and analyze for the post index
kshitijrajsharma Apr 25, 2023
3a790d5
fix bug on query
kshitijrajsharma Apr 25, 2023
3eb8835
add flat nodes to replication
kshitijrajsharma Apr 29, 2023
171b786
Get rid of concurrently as it reduced the performance
kshitijrajsharma May 12, 2023
b473bdc
force remove temp file after import is done
kshitijrajsharma May 15, 2023
4797f4c
Disable country update for now in replication
kshitijrajsharma May 18, 2023
9c94d9d
Disable grid_timestamp
kshitijrajsharma May 18, 2023
52fb9d9
change raw name to raw_backend
kshitijrajsharma May 25, 2023
689bb59
Fix backend Build
kshitijrajsharma May 25, 2023
10f3b0b
Removed yearly update
kshitijrajsharma May 25, 2023
c04b900
Revised service and added timer file for service
kshitijrajsharma May 25, 2023
451836b
Merge pull request #112 from hotosm/feature/geobarik_internal_download
kshitijrajsharma May 25, 2023
57ef64e
:art: Format Python code with psf/black
kshitijrajsharma May 25, 2023
259dc30
Merge pull request #121 from hotosm/actions/black
kshitijrajsharma May 25, 2023
530fe7b
Fix Tests
kshitijrajsharma May 25, 2023
4341c8e
Merge pull request #122 from hotosm/feature/geobarik_internal_download
kshitijrajsharma May 25, 2023
934849e
Update pre_indexes.sql
kshitijrajsharma Jun 7, 2023
4176385
Improve Dockerfile
eternaltyro Jun 12, 2023
eadde82
Merge pull request #125 from hotosm/enhance/dockerfile-multistage
eternaltyro Jun 13, 2023
3f4138d
Created using Colaboratory
kshitijrajsharma Jun 20, 2023
debba0f
Added new python API call collab Example
kshitijrajsharma Jun 20, 2023
7ed1848
Merge pull request #126 from kshitijrajsharma/develop
kshitijrajsharma Jun 20, 2023
86f0cfe
Added boundary geojson feature to update custom area
kshitijrajsharma Jun 24, 2023
9fd904a
Added validation for input of boundary data
kshitijrajsharma Jun 24, 2023
24f9464
Added documentation about readme
kshitijrajsharma Jun 24, 2023
e517218
Fixed bug on skip cup update and process boundary
kshitijrajsharma Jun 25, 2023
066e297
Merge pull request #127 from hotosm/feature/filter_geojson
kshitijrajsharma Jun 25, 2023
d637e98
Improve Dockerfile
eternaltyro Jul 13, 2023
c380ff5
Merge pull request #128 from hotosm/enhance/dockerfile-multistage
eternaltyro Jul 13, 2023
53afabc
Remove tf lock file from gitignore
eternaltyro Jul 18, 2023
51003ad
Add subnet for container apps
eternaltyro Jul 18, 2023
74194c3
Merge pull request #129 from hotosm/enhance/container-subnet
eternaltyro Jul 18, 2023
4020029
Bump provider versions
eternaltyro Jul 18, 2023
7f8224e
Terraform lock file
eternaltyro Jul 18, 2023
2d35ac0
Output container subnet ID
eternaltyro Jul 18, 2023
d011201
Add container instances for API
eternaltyro Jul 18, 2023
c2ba639
Merge pull request #130 from hotosm/enhance/container-instances
eternaltyro Jul 18, 2023
6a11afa
Add worker container
eternaltyro Jul 18, 2023
f5ef5a0
Merge pull request #131 from hotosm/enhance/container-instances
eternaltyro Jul 18, 2023
02ed547
Fix port conflicts
eternaltyro Jul 18, 2023
e4e8f4e
Merge pull request #132 from hotosm/enhance/container-instances
eternaltyro Jul 18, 2023
a7e6224
Add worker container command
eternaltyro Jul 18, 2023
ebd9ae5
Fix command format
eternaltyro Jul 19, 2023
c5e9bef
Improve envvar handling for container instances
eternaltyro Jul 19, 2023
5a4616b
Merge pull request #133 from hotosm/enhance/container-envvar
eternaltyro Jul 19, 2023
55de0b9
Add empty default value for required var
eternaltyro Jul 19, 2023
bc4d39d
Add envvar for worker container
eternaltyro Jul 19, 2023
2df8fda
Fix command format
eternaltyro Jul 19, 2023
656e804
Bug fix on Readme and selection
kshitijrajsharma Aug 10, 2023
e1ab850
Merge pull request #134 from hotosm/hotfix/readme
kshitijrajsharma Aug 10, 2023
300092c
Added recurring export feature on s3 upload
kshitijrajsharma Aug 16, 2023
ebbb640
Merge pull request #135 from hotosm/feature/recurring_exports
kshitijrajsharma Aug 16, 2023
842293b
Added st_within_feature
kshitijrajsharma Aug 25, 2023
1614cab
Merge pull request #137 from hotosm/feature/st_within
kshitijrajsharma Aug 25, 2023
a356ad4
Refine configuration documentation
eternaltyro Aug 28, 2023
c945266
Merge pull request #138 from hotosm/fix/docs
kshitijrajsharma Aug 28, 2023
1919573
Add more configuration options to documentation
eternaltyro Aug 28, 2023
14edee2
Add more context for sentry entries
eternaltyro Aug 28, 2023
14f21db
Merge pull request #139 from hotosm/fix/docs
eternaltyro Aug 28, 2023
8abff5d
Add better configuration defaults
eternaltyro Aug 28, 2023
0067c90
Merge pull request #140 from hotosm/enhance/configuration-defaults
kshitijrajsharma Aug 29, 2023
656f4e5
:art: Format Python code with psf/black
kshitijrajsharma Aug 29, 2023
d189c50
Refine documentation and sample config
eternaltyro Aug 29, 2023
5dc1ca3
Merge pull request #141 from hotosm/actions/black
kshitijrajsharma Aug 29, 2023
f5daceb
Merge pull request #142 from hotosm/enhance/configuration-defaults
eternaltyro Aug 29, 2023
afdfcb4
Added default 0 to non intersected fields
kshitijrajsharma Sep 1, 2023
a9d7d49
Move external indexes to post indexes
kshitijrajsharma Sep 1, 2023
c2460c0
Fix bug on joins
kshitijrajsharma Sep 2, 2023
28cd0b6
Fix documentation
eternaltyro Sep 5, 2023
d2306e0
Merge pull request #149 from hotosm/hotfix/outside_intersection
kshitijrajsharma Sep 6, 2023
26dc594
Introduces queue name defined from API itself
kshitijrajsharma Sep 6, 2023
062874f
Merge pull request #150 from hotosm/feature/queue_name
kshitijrajsharma Sep 6, 2023
e800440
Fix : Build Fail
kshitijrajsharma Sep 6, 2023
339be14
Fix typo
kshitijrajsharma Sep 6, 2023
794ef6a
Verify API and Worker Config
kshitijrajsharma Sep 7, 2023
25e695f
Drop countries table if exists
kshitijrajsharma Sep 10, 2023
bae7c8b
add default changeset to 0
kshitijrajsharma Sep 10, 2023
9172552
Add default to country and updated country update command
kshitijrajsharma Sep 10, 2023
f457949
Revert all coalesce query logic
kshitijrajsharma Sep 10, 2023
1d40dfd
add 0 if not intersected
kshitijrajsharma Sep 10, 2023
4a215a8
Add coalesce to replication
kshitijrajsharma Sep 10, 2023
0d4bbf2
Add by default 0 integer
kshitijrajsharma Sep 10, 2023
5451d24
Update on the basis of timestamp on replication
kshitijrajsharma Sep 10, 2023
38dc7d6
Update for null values in array
kshitijrajsharma Sep 10, 2023
1afcd30
Added pmtiles support
kshitijrajsharma Sep 14, 2023
c0b4c10
Update README.md
kshitijrajsharma Sep 16, 2023
eac2104
Update README.md
kshitijrajsharma Sep 16, 2023
8a0746f
Make min zoom and max zoom optional for mbtiles
kshitijrajsharma Sep 17, 2023
1738bdc
Add snapshot plain
kshitijrajsharma Sep 17, 2023
e63bf42
Fixed tests using geometry dump
kshitijrajsharma Sep 17, 2023
a1204fa
remove gid cid
kshitijrajsharma Oct 2, 2023
181b359
Update Readme.md
kshitijrajsharma Oct 9, 2023
66107a5
Merge pull request #152 from kshitijrajsharma/patch-1
kshitijrajsharma Oct 9, 2023
e4cd9b3
Mostly this should fix tests that compares intersects query
kshitijrajsharma Oct 9, 2023
02d5503
Add test cases for st_within
kshitijrajsharma Oct 9, 2023
876d891
Fix typo on min zoom
kshitijrajsharma Oct 9, 2023
3dc9ffc
Made pmtiles and mbtiles support optional
kshitijrajsharma Oct 10, 2023
4121330
Added enable tiles support for app
kshitijrajsharma Oct 10, 2023
06962d4
Added TM Support for exports
kshitijrajsharma Oct 12, 2023
34eda5b
Update post_indexes.sql
kshitijrajsharma Oct 13, 2023
19f3c79
Updated dataset with ISO code
kshitijrajsharma Oct 14, 2023
3c09215
Merge pull request #153 from hotosm/enhance/country_dataset
kshitijrajsharma Oct 14, 2023
b7250a1
Immediate fix on country api
kshitijrajsharma Oct 14, 2023
bf216e1
add support for hdx exports
kshitijrajsharma Oct 14, 2023
9a84dbe
Comment addition
kshitijrajsharma Oct 14, 2023
f6ca27f
Critical bug fix on country scanning
kshitijrajsharma Oct 15, 2023
54bf4a5
Corrected dataset problems with country and introduced cid
kshitijrajsharma Oct 15, 2023
85cefde
Merge pull request #154 from hotosm/enhance/cid
kshitijrajsharma Oct 15, 2023
172e1c0
Fixes ci build
kshitijrajsharma Oct 15, 2023
bb9301e
Increase API waiting time
kshitijrajsharma Oct 15, 2023
a152d0a
Merge pull request #156 from hotosm/fix/ci_build
kshitijrajsharma Oct 15, 2023
76ecf6c
Alter new countries
kshitijrajsharma Oct 15, 2023
22b32cc
Merge pull request #157 from hotosm/fix/ci_build
kshitijrajsharma Oct 15, 2023
f17c4b9
Update README.md
kshitijrajsharma Oct 29, 2023
4c5c53e
added null index query
kshitijrajsharma Nov 1, 2023
0e3f579
Merge pull request #155 from hotosm/feature/tm_support
kshitijrajsharma Nov 1, 2023
20e7285
Added feature to terminate task
kshitijrajsharma Nov 13, 2023
c93fde1
Fix Ciritical Countries cid bug
kshitijrajsharma Nov 14, 2023
ba735ac
Inspect , Ping and Purge workers
kshitijrajsharma Nov 14, 2023
50e2107
Fix for plain geojson query
kshitijrajsharma Nov 14, 2023
17802c8
Update limit of plain geojson
kshitijrajsharma Nov 14, 2023
f6baf79
Disable country threshold for now
kshitijrajsharma Nov 14, 2023
2061349
Cleanup models code
kshitijrajsharma Nov 14, 2023
cfed737
Add authentication to endpoint functionalities
kshitijrajsharma Nov 14, 2023
9fe3213
Merge remote-tracking branch 'origin/develop' into feature/terminate_…
kshitijrajsharma Nov 15, 2023
2d9e34d
Merge pull request #167 from hotosm/feature/terminate_tasks
kshitijrajsharma Nov 15, 2023
331bc05
:art: Format Python code with psf/black
kshitijrajsharma Nov 15, 2023
89f4bfc
Remove area check inside app
kshitijrajsharma Nov 15, 2023
e1a4bd3
Fix bug on intersecting countries
kshitijrajsharma Nov 16, 2023
6001838
Export sample variables to build and unit test
kshitijrajsharma Nov 16, 2023
6e73c43
Export variables inside steps
kshitijrajsharma Nov 16, 2023
ca9e4a9
Merge pull request #169 from hotosm/fix/build
kshitijrajsharma Nov 16, 2023
31a298c
Merge branch 'develop' into actions/black
kshitijrajsharma Nov 16, 2023
fd4e766
Merge pull request #168 from hotosm/actions/black
kshitijrajsharma Nov 16, 2023
0176c64
Update docker-image.yml
kshitijrajsharma Nov 17, 2023
1602844
Added User Authentication Model from DB
kshitijrajsharma Nov 17, 2023
e6e26b2
Fix conflicting lib name and connection commit
kshitijrajsharma Nov 17, 2023
04328f9
Merge pull request #170 from hotosm/feature/user_login
kshitijrajsharma Nov 17, 2023
3ee36cd
Critical Bug Fix
kshitijrajsharma Nov 17, 2023
c7247fc
Track started status of task
kshitijrajsharma Nov 17, 2023
113eb2e
Raise error if authentication fails
kshitijrajsharma Nov 17, 2023
9e5855d
Update replication and added sql
kshitijrajsharma Nov 19, 2023
242b105
Adds Tippecanoe to docker build
kshitijrajsharma Nov 19, 2023
35a2057
Added fruitful inspect option
kshitijrajsharma Nov 19, 2023
141f556
Merge pull request #171 from hotosm/feature/tippecanoe_docker
kshitijrajsharma Nov 19, 2023
a1121f9
Added folder structure scanning for hdx and enabled started status tr…
kshitijrajsharma Nov 20, 2023
03b1bcc
Merge pull request #172 from hotosm/hotfix/hdx_folder_structure
kshitijrajsharma Nov 20, 2023
7a4293c
Update README.md
kshitijrajsharma Nov 20, 2023
2b04633
Change Tippecanoe image
kshitijrajsharma Nov 20, 2023
b95139f
reduce tippecanoe version
kshitijrajsharma Nov 20, 2023
64d519a
Revert dockerfile changes
kshitijrajsharma Nov 20, 2023
7065649
Test with run container user as root
kshitijrajsharma Nov 20, 2023
5cb03c1
default user changed to root : temporarily
kshitijrajsharma Nov 20, 2023
6e89ffa
Change default user back to appuser
kshitijrajsharma Nov 20, 2023
3ad40c8
Fixed typo error
kshitijrajsharma Nov 20, 2023
b2932b1
Added geoparquet format
kshitijrajsharma Nov 20, 2023
0dd9a14
Added parquet support
kshitijrajsharma Nov 20, 2023
382c305
Added upgrade docker feature
kshitijrajsharma Nov 20, 2023
ecab439
Reformatted yml for PR
kshitijrajsharma Nov 20, 2023
887c4a4
change build name
kshitijrajsharma Nov 20, 2023
27d6b31
added orjson 3.9.10 in setup
kshitijrajsharma Nov 20, 2023
793483a
Add libsqlite
kshitijrajsharma Nov 20, 2023
aae822d
Merge pull request #173 from hotosm/feature/upgrade_docker
kshitijrajsharma Nov 20, 2023
b01526e
Downgrade python
kshitijrajsharma Nov 20, 2023
8c196b0
Update dockerfile
kshitijrajsharma Nov 21, 2023
91d11dc
fix typo on dockerfile
kshitijrajsharma Nov 21, 2023
be2e432
Added dump meta data info for exports
kshitijrajsharma Nov 21, 2023
e21154e
Merge pull request #174 from hotosm/enhance/metadata_exports
kshitijrajsharma Nov 21, 2023
c33b082
Change user to root
kshitijrajsharma Nov 22, 2023
0e0e044
Remvoe typo in docker image
kshitijrajsharma Nov 22, 2023
94f6daa
Update docker file with disabling user
kshitijrajsharma Nov 22, 2023
2c7daf9
Change app user as workdir
kshitijrajsharma Nov 22, 2023
70c6517
Change back to default dockerfile
kshitijrajsharma Nov 28, 2023
64ccb7b
update sudo update
kshitijrajsharma Nov 28, 2023
7ac9a7f
Adds dynamic folder path from filename for s3 upload
kshitijrajsharma Dec 7, 2023
d843078
only check if file_name is there on role check
kshitijrajsharma Dec 7, 2023
4cd0e34
Merge pull request #176 from hotosm/feature/dynamic_s3_folder
kshitijrajsharma Dec 7, 2023
65b9e53
Fixes leaked db connection issue on auth
kshitijrajsharma Dec 13, 2023
9f5cbcd
Merge pull request #177 from hotosm/fix/leak_db_connection
kshitijrajsharma Dec 13, 2023
1eeb97a
Fix typo and code lint on auth router
kshitijrajsharma Dec 13, 2023
91a06ca
added option to enable bind_zip with 200 Sqkm
kshitijrajsharma Dec 13, 2023
b48c463
Merge pull request #178 from hotosm/enhance/permission_bind_zip
kshitijrajsharma Dec 13, 2023
df58854
Adds feature of using sozip
kshitijrajsharma Dec 13, 2023
1af0cf5
Merge pull request #180 from hotosm/feature/sozip
kshitijrajsharma Dec 13, 2023
3a87a60
Update README.md
kshitijrajsharma Dec 13, 2023
c9847b7
Update README.md
kshitijrajsharma Dec 13, 2023
b2a841f
Add API documentation on doc
kshitijrajsharma Dec 13, 2023
7b5c175
Adds option for stats also adds stats endpoint if it is configured
kshitijrajsharma Dec 14, 2023
a430103
Update formatting on docs
kshitijrajsharma Dec 14, 2023
572af3e
Allow extra fields for now , also fix typo in param checking
kshitijrajsharma Dec 14, 2023
59ade94
Update metrics.md
kshitijrajsharma Dec 14, 2023
83bf4e2
Merge pull request #181 from hotosm/feature/poly_stats
kshitijrajsharma Dec 14, 2023
8204cb0
Update configurations.md
kshitijrajsharma Dec 14, 2023
e7e0609
Fix bug on generating stats endpoint
kshitijrajsharma Dec 14, 2023
21bfafc
Enhance summary stats statement
kshitijrajsharma Dec 14, 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 .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.github
.git
infra
docs
tests
61 changes: 44 additions & 17 deletions .github/workflows/Unit-Test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Unit Test
on:
push:
paths-ignore:
- "infra/**"
branches:
- master
- develop
Expand All @@ -11,37 +13,62 @@ on:

jobs:
deploy:
runs-on:
ubuntu-latest

runs-on: ubuntu-latest
env:
PGPASSWORD: admin
PGDATABASE: raw
PGPORT: 5434
PGHOST: localhost
PGUSER: postgres
services:
postgres:
image: postgis/postgis:14-3.3
env:
POSTGRES_PASSWORD: admin
POSTGRES_DB: raw
ports:
- 5434:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 2
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Check postgresql version
run: |
psql -V
- name: Remove postgresql version 14

- name: Insert sample db data
run: |
sudo apt-get --purge remove postgresql
sudo apt-get purge postgresql*
sudo apt-get --purge remove postgresql postgresql-doc postgresql-common
- name: Set up postgresql 12
uses: harmon758/postgresql-action@v1
with:
postgresql version: '12'
- name: Install Postgis 3 for Psql 12
export PGPASSWORD='admin';
psql -U postgres -h localhost -p 5434 raw < tests/fixtures/pokhara.sql

- name: Install gdal
run: sudo apt-get update && sudo apt-get -y install gdal-bin python3-gdal && sudo apt-get -y autoremove && sudo apt-get clean

- name: Install redis
run: |
sudo apt install lsb-release
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt install postgis postgresql-12-postgis-3

sudo apt-get install redis
redis-cli ping

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .

- name: Launch Worker
run: |
export OSM_CLIENT_ID=thisisfakeosmcliendid
export OSM_CLIENT_SECRET=thisisclientosm
export APP_SECRET_KEY=thisissecretkey
celery --app API.api_worker worker --loglevel=INFO --queues='raw_default' &

- name: Run Tests
run: |
export OSM_CLIENT_ID=thisisfakeosmcliendid
export OSM_CLIENT_SECRET=thisisclientosm
export APP_SECRET_KEY=thisissecretkey
py.test -v -s
19 changes: 19 additions & 0 deletions .github/workflows/black-for-PR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: black-action
on:
pull_request:
paths-ignore:
- 'infra/**'
branches:
- master
- develop
jobs:
linter_name:
name: runner / black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check files using the black formatter
uses: rickstaa/action-black@v1
id: action_black
with:
black_args: ". --check"
31 changes: 31 additions & 0 deletions .github/workflows/black-formatter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: black-action
on:
push:
paths-ignore:
- 'infra/**'
branches:
- master
- develop
jobs:
linter_name:
name: runner / black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check files using the black formatter
uses: rickstaa/action-black@v1
id: action_black
with:
black_args: "."
- name: Create Pull Request
if: steps.action_black.outputs.is_formatted == 'true'
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "Format Python code with psf/black push"
commit-message: ":art: Format Python code with psf/black"
body: |
There appear to be some python formatting errors in ${{ github.sha }}. This pull request
uses the [psf/black](https://github.com/psf/black) formatter to fix these issues.
base: ${{ github.head_ref }} # Creates pull request onto pull request or commit branch
branch: actions/black
95 changes: 95 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Check Build
on:
push:
paths-ignore:
- "infra/**"
branches:
- master
- develop
pull_request:
branches:
- master
- develop

jobs:
build:
timeout-minutes: 10
runs-on: ubuntu-latest
env:
PGPASSWORD: admin
PGDATABASE: raw
PGPORT: 5434
PGHOST: localhost
PGUSER: postgres

services:
postgres:
image: postgis/postgis:14-3.3
env:
POSTGRES_PASSWORD: admin
POSTGRES_DB: raw
ports:
- 5434:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 2
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install necessary dependecies for rawdata loading
run: sudo apt-get update && sudo apt-get install osm2pgsql
- name: check version
run: osm2pgsql --version

- name: Install python requirements for load
run: pip install -r backend/requirements.txt

- name: Start Loading
run: python backend/raw_backend --insert --fq m

- name: Install gdal
run: |
sudo apt-get -y install gdal-bin python3-gdal && sudo apt-get -y autoremove && sudo apt-get clean

- name: Install redis
run: |
sudo apt install lsb-release
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install redis
redis-cli ping

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .

- name: Run uvicorn server
run: |
export OSM_CLIENT_ID=thisisfakeosmcliendid
export OSM_CLIENT_SECRET=thisisclientosm
export APP_SECRET_KEY=thisissecretkey
uvicorn API.main:app &> uvicorn.log &
env:
PORT: 8000
- name: Run celery server
run: |
export OSM_CLIENT_ID=thisisfakeosmcliendid
export OSM_CLIENT_SECRET=thisisclientosm
export APP_SECRET_KEY=thisissecretkey
celery --app API.api_worker worker --loglevel=DEBUG &> worker.log &
- name: Run flower dashboard
run: |
celery --app API.api_worker flower --port=5555 --broker=redis://localhost:6379/ &
- name: Run rawdata current snapshot
run: |
result=$(curl -s -d '{"geometry":{"type":"Polygon","coordinates":[[[83.96919250488281,28.194446860487773],[83.99751663208006,28.194446860487773],[83.99751663208006,28.214869548073377],[83.96919250488281,28.214869548073377],[83.96919250488281,28.194446860487773]]]}}' -H 'Content-Type: application/json' http://127.0.0.1:8000/v1/snapshot/)
echo $result
tail uvicorn.log
tail worker.log
task_link=$(echo "$result" | jq -r .track_link)
echo curl "http://127.0.0.1:8000/v1${task_link}"
curl "http://127.0.0.1:8000/v1${task_link}"
33 changes: 33 additions & 0 deletions .github/workflows/code-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Code Check - Linting using flake8
on:
push:
paths-ignore:
- 'infra/**'
branches:
- master
- develop
pull_request:
branches:
- master
- develop
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install flake8-docstrings
- name: Lint with flake8 for src
run: |
flake8 src --count --select=E9,F63,F7,F82,D102 --docstring-convention numpy --show-source --statistics --ignore=E501,C901
- name: Lint with flake8 for API
run: |
flake8 API/ --select=E9,F63,F7,F82,D102 --count --statistics --ignore=E501,C901
20 changes: 20 additions & 0 deletions .github/workflows/docker-image-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Docker Image CI

on:
push:
branches:
- master
- develop

pull_request:
branches:
- master
- develop
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build . --tag raw-data-api:$(date +%s)
49 changes: 49 additions & 0 deletions .github/workflows/docker-image-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#
name: Create and publish a Docker image

# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
push:
branches:
- master
- develop
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
#
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
18 changes: 0 additions & 18 deletions .github/workflows/docker-image.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/issue_checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Close inactive issues
on:
schedule:
- cron: "0 0 * * *" # Runs every Every day at 0 UTC

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
days-before-issue-stale: 60 # give warning to issues which are inactive more than 2 month
days-before-issue-close: 15 # Close the issue if remains inactive further more 15 days after the notice
stale-issue-label: "stale"
stale-issue-message: "Warning : This issue is stale because it has been open for 30 days with no activity. It will be closed if no activity found within 15 days."
close-issue-message: "This issue was closed because it has been inactive for 15 days since being marked as stale. Issue can be reopen if valid"
days-before-pr-stale: -1 # can be configurable for PR too -1 will disable the feature
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}
Loading
Loading