Skip to content

Commit

Permalink
Merge pull request #490 from DevCom-IITB/map-nav
Browse files Browse the repository at this point in the history
Map navigation
  • Loading branch information
PalMit2002 authored Mar 14, 2023
2 parents 4c8a02a + 0d52b33 commit 22ee130
Show file tree
Hide file tree
Showing 116 changed files with 3,417 additions and 771 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
exclude = .git,__pycache__,backend/settings*,*/migrations/*,venv,.venv
ignore = E302,E731
ignore = E302,E731,W503
max-complexity = 15
max-line-length = 120
194 changes: 96 additions & 98 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,59 @@ name: Github Actions

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv wheel
pipenv sync
- name: Run Tests
run: |
pipenv run python manage.py test -v2
env:
DJANGO_SETTINGS_MODULE: backend.settings_test
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv wheel
pipenv sync
- name: Run Tests
run: |
pipenv run python manage.py test -v2
env:
DJANGO_SETTINGS_MODULE: backend.settings_test

lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv wheel
pipenv sync
- name: Run Lint
run: |
pipenv run flake8
pipenv run pylint_runner
env:
DJANGO_SETTINGS_MODULE: backend.settings_test
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv wheel
pipenv sync
- name: Run Lint
run: |
pipenv run flake8
pipenv run pylint_runner
test-mysql:
services:
Expand Down Expand Up @@ -85,33 +83,33 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv wheel
pipenv sync
pipenv run python -m pip install mysqlclient
- name: Run Celery
run: |
pipenv run celery -A backend worker -l info &
env:
DJANGO_SETTINGS_MODULE: backend.settings_test_full_mysql

- name: Run Tests
run: |
pipenv run python manage.py test -v2
env:
DJANGO_SETTINGS_MODULE: backend.settings_test_full_mysql
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv wheel
pipenv sync
pipenv run python -m pip install mysqlclient
- name: Run Celery
run: |
pipenv run celery -A backend worker -l info &
env:
DJANGO_SETTINGS_MODULE: backend.settings_test_full_mysql

- name: Run Tests
run: |
pipenv run python manage.py test -v2
env:
DJANGO_SETTINGS_MODULE: backend.settings_test_full_mysql

test-full:
services:
Expand All @@ -121,10 +119,10 @@ jobs:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

Expand All @@ -136,39 +134,39 @@ jobs:
sonic:
image: radialapps/sonic:v1.2.1
ports:
- 1491:1491
- 1491:1491

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
python-version: ['3.10']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv wheel
pipenv sync
pipenv run python -m pip install coverage psycopg2-binary
- name: Run Celery
run: |
pipenv run celery -A backend worker -l info &
env:
DJANGO_SETTINGS_MODULE: backend.settings_test_full

- name: Run Tests
run: |
pipenv run python -m coverage run manage.py test -v2
pipenv run python -m coverage xml -i
env:
DJANGO_SETTINGS_MODULE: backend.settings_test_full

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv wheel
pipenv sync
pipenv run python -m pip install coverage psycopg2-binary
- name: Run Celery
run: |
pipenv run celery -A backend worker -l info &
env:
DJANGO_SETTINGS_MODULE: backend.settings_test_full

- name: Run Tests
run: |
pipenv run python -m coverage run manage.py test -v2
pipenv run python -m coverage xml -i
env:
DJANGO_SETTINGS_MODULE: backend.settings_test_full

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
google_client_secret.json
chatbot_logs.json
.vscode
upload/static
htmlcov
Expand Down Expand Up @@ -109,3 +110,4 @@ venv.bak/

# mypy
.mypy_cache/

3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ ignore=.git,__pycache__,backend,migrations,venv,.venv

[MESSAGES CONTROL]
max-line-length=120
disable=C0111,C0103,R0903,R0901,R0801,W0221,E1101,E5142,C0209,R1732,R1729,R0402,R1721,W0613,E5110,W1514,W0622
max-locals=20
disable=C0111,C0103,R0903,R0901,R0801,W0221,E1101,E5142,C0209,R1732,R1729,R0402,R1721,W0613,E5110,W1514,W0622,W0104,W0703,R0911
2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
autopep8 = "*"

[packages]
asonic = "*"
Expand Down Expand Up @@ -40,3 +41,4 @@ django-elasticsearch-dsl = "*"
elasticsearch-dsl = "*"
elasticsearch = "*"
google-api-python-client = "*"
django-cors-headers = "*"
Loading

0 comments on commit 22ee130

Please sign in to comment.