style corrections, documentation, duplicate removal, flow improvement #11
@@ -20,7 +20,7 @@ jobs:
 | 
				
			|||||||
      with:
 | 
					      with:
 | 
				
			||||||
        registry: git.kluster.moll.re
 | 
					        registry: git.kluster.moll.re
 | 
				
			||||||
        username: ${{ gitea.repository_owner }}
 | 
					        username: ${{ gitea.repository_owner }}
 | 
				
			||||||
        password: ${{ secrets.DOCKER_PUSH_TOKEN }}
 | 
					        password: ${{ secrets.PACKAGE_REGISTRY_ACCESS }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Set up Docker Buildx
 | 
					    - name: Set up Docker Buildx
 | 
				
			||||||
      uses: docker/setup-buildx-action@v3
 | 
					      uses: docker/setup-buildx-action@v3
 | 
				
			||||||
@@ -29,5 +29,5 @@ jobs:
 | 
				
			|||||||
      uses: docker/build-push-action@v5
 | 
					      uses: docker/build-push-action@v5
 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        context: backend
 | 
					        context: backend
 | 
				
			||||||
        tags: git.kluster.moll.re/remoll/fast_network_navigation/backend:latest
 | 
					        tags: git.kluster.moll.re/anydev/anyway-backend:latest
 | 
				
			||||||
        push: true
 | 
					        push: true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,7 +44,7 @@ jobs:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    - name: Add required secrets
 | 
					    - name: Add required secrets
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        echo ${{ secrets.ANDROID_SECRETS_BASE64 }} | base64 -d > ./android/secrets.properties
 | 
					        echo ${{ secrets.ANDROID_SECRETS_PROPERTIES }} > ./android/secrets.properties
 | 
				
			||||||
      working-directory: ./frontend
 | 
					      working-directory: ./frontend
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Sanity check
 | 
					    - name: Sanity check
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,34 +1,34 @@
 | 
				
			|||||||
on:
 | 
					# on:
 | 
				
			||||||
  pull_request:
 | 
					#   pull_request:
 | 
				
			||||||
    branches:
 | 
					#     branches:
 | 
				
			||||||
      - main
 | 
					#       - main
 | 
				
			||||||
    paths:
 | 
					#     paths:
 | 
				
			||||||
      - frontend/**
 | 
					#       - frontend/**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
name: Build web
 | 
					# name: Build web
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					# jobs:
 | 
				
			||||||
  build:
 | 
					#   build:
 | 
				
			||||||
    name: Build Web
 | 
					#     name: Build Web
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					#     runs-on: ubuntu-latest
 | 
				
			||||||
    steps:
 | 
					#     steps:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Install prerequisites
 | 
					#     - name: Install prerequisites
 | 
				
			||||||
      run: |
 | 
					#       run: |
 | 
				
			||||||
        sudo apt-get update
 | 
					#         sudo apt-get update
 | 
				
			||||||
        sudo apt-get install -y xz-utils
 | 
					#         sudo apt-get install -y xz-utils
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - uses: actions/checkout@v4
 | 
					#     - uses: actions/checkout@v4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - uses: https://github.com/subosito/flutter-action@v2
 | 
					#     - uses: https://github.com/subosito/flutter-action@v2
 | 
				
			||||||
      with:
 | 
					#       with:
 | 
				
			||||||
        channel: stable
 | 
					#         channel: stable
 | 
				
			||||||
        flutter-version: 3.19.6
 | 
					#         flutter-version: 3.19.6
 | 
				
			||||||
        cache: true
 | 
					#         cache: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - run: flutter pub get
 | 
					#     - run: flutter pub get
 | 
				
			||||||
      working-directory: ./frontend
 | 
					#       working-directory: ./frontend
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - run: flutter build web
 | 
					#     - run: flutter build web
 | 
				
			||||||
      working-directory: ./frontend
 | 
					#       working-directory: ./frontend
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,4 +14,4 @@ EXPOSE 8000
 | 
				
			|||||||
ENV NUM_WORKERS=1
 | 
					ENV NUM_WORKERS=1
 | 
				
			||||||
ENV OSM_CACHE_DIR=/cache
 | 
					ENV OSM_CACHE_DIR=/cache
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CMD ["fastapi", "run", "src/main.py", "--port 8000", "--workers $NUM_WORKERS"]
 | 
					CMD fastapi run src/main.py --port 8000 --workers $NUM_WORKERS
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,8 @@ import logging.config
 | 
				
			|||||||
from pathlib import Path
 | 
					from pathlib import Path
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PARAMETERS_DIR = Path('src/parameters')
 | 
					LOCATION_PREFIX = Path('src')
 | 
				
			||||||
 | 
					PARAMETERS_DIR = LOCATION_PREFIX / 'parameters'
 | 
				
			||||||
AMENITY_SELECTORS_PATH = PARAMETERS_DIR / 'amenity_selectors.yaml'
 | 
					AMENITY_SELECTORS_PATH = PARAMETERS_DIR / 'amenity_selectors.yaml'
 | 
				
			||||||
LANDMARK_PARAMETERS_PATH = PARAMETERS_DIR / 'landmark_parameters.yaml'
 | 
					LANDMARK_PARAMETERS_PATH = PARAMETERS_DIR / 'landmark_parameters.yaml'
 | 
				
			||||||
OPTIMIZER_PARAMETERS_PATH = PARAMETERS_DIR / 'optimizer_parameters.yaml'
 | 
					OPTIMIZER_PARAMETERS_PATH = PARAMETERS_DIR / 'optimizer_parameters.yaml'
 | 
				
			||||||
@@ -16,7 +17,7 @@ OSM_CACHE_DIR = Path(cache_dir_string)
 | 
				
			|||||||
import logging
 | 
					import logging
 | 
				
			||||||
import yaml
 | 
					import yaml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
LOGGING_CONFIG = Path('log_config.yaml')
 | 
					LOGGING_CONFIG = LOCATION_PREFIX / 'log_config.yaml'
 | 
				
			||||||
config = yaml.safe_load(LOGGING_CONFIG.read_text())
 | 
					config = yaml.safe_load(LOGGING_CONFIG.read_text())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
logging.config.dictConfig(config)
 | 
					logging.config.dictConfig(config)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user