Skip to content

Commit

Permalink
conflicts resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
Thombrix committed Dec 18, 2023
2 parents cc7ad93 + 3074ead commit 2879818
Show file tree
Hide file tree
Showing 3 changed files with 710 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy to Container
on:
push:
branches:
- 17_schedule_and_swagger
- 24_correction_coord
- main
- dev

Expand All @@ -26,4 +26,4 @@ jobs:
chmod 600 ~/.ssh/pkey
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/pkey
ssh ${{ secrets.SECRET_USER }}@${{ secrets.SECRET_HOST }} -p ${{ secrets.SECRET_PORT }} "cd ./project/Swissdle && git pull origin main && cd backend-laravel && composer install && php artisan vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider" && cd ../frontend-vue && npm install && npm run build && (crontab -l && crontab -r) || echo '* * * * * cd /home/laravel/project/Swissdle/backend-laravel && /usr/local/bin/php artisan schedule:run >> /home/laravel/project/Swissdle/cron.log' | crontab"
ssh ${{ secrets.SECRET_USER }}@${{ secrets.SECRET_HOST }} -p ${{ secrets.SECRET_PORT }} "cd ./project/Swissdle && git pull origin main && cd backend-laravel && php artisan db:wipe --force && php artisan migrate --force && php artisan db:seed --force && composer install && php artisan vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider" && cd ../frontend-vue && npm install && npm run build && (crontab -l && crontab -r) || echo '* * * * * cd /home/laravel/project/Swissdle/backend-laravel && /usr/local/bin/php artisan schedule:run >> /home/laravel/project/Swissdle/cron.log' | crontab"
22 changes: 22 additions & 0 deletions backend-laravel/database/data/transform_coordinates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import json

from pyproj import Proj, transform

lv95 = Proj(init='epsg:2056') # LV95
wgs84 = Proj(init='epsg:4326') # WGS84

with open('wrong_coord_format_swissdle_data.json', 'r', encoding='utf-8') as file:
data = json.load(file)

for city in data:
e = city['E']
n = city['N']

lon, lat = transform(lv95, wgs84, e, n)

city['E'] = lon
city['N'] = lat

with open('swissdle_data.json', 'w', encoding='utf-8') as file:
json.dump(data, file, ensure_ascii=False, indent=4)

Loading

0 comments on commit 2879818

Please sign in to comment.