Skip to content

Commit

Permalink
Restructure (#9)
Browse files Browse the repository at this point in the history
* added url field to departmentApi

* added url field to department and made courseApi

* completed models, serializers, views and made api endpoints for get requests

* added delete api and cors whitelist

* changes in delete request for courses

* made port changes

* added query for department with abbr and course with code

* made fileUpload changes to file model and made dynamic renderring functions from file data

* added file field to serializer

* fixed delete request

* changes in api

* fix:merge cherry-pick commit

* changes in file model

* fix driveid field

* removed unnecessary prints

* fixed post request for files

* feat:added course fetch and get department detail through one request

* refactor: department post requests

* feat:made user and upload models

* lint fixes

* made uploads model

* feat:configured request get and creation post requests

* feat:configured update route on request

* feat:integrateg falcon client and completed user get and post functions

* fix: alter profile_image field to hold image url

* feat:retrieved file from frontend in backend

* feat:integrated file upload route with drive api

* feat:added filetype field to upload

* feat:implemented JWT and added courses array field to user model

* feat:made add course route

* added date field to requests

* refactor:abstaction of JWT decoding sequence and fix:filter bugs in upload POST request

* added date field to uploads and serialized upload title and filetype

* feat:made course request model

* fix:upload route file management conditions and make user course deletion route

* added status field to uploads model

* fix:standardize department get request response

* fix: linting according to PEP8 standards

* chore: add .pylintrc and added packages to requirements.txt

* chore: added new dependencies in requirements.txt

* refactor: separate user related functions into a separate app

* Implemented search using elasticsearch

* implemented search

* removed unnecessary print statements

* Revert "implemented search"

This reverts commit 8f9eae8.

* Revert "Implemented search using elasticsearch"

This reverts commit cbc58f0.

* Fixed styling issues and added HTTP status response

* Fixed styling issues and added HTTP status response

* added import statements

* added setup instructions

* added command to initialize indexes

* refactor: separate user related functions into a separate app

* feat: rebase search and remove unnecessary url registers

* feat: configure elastic search and django server to docker

* chore: added test data and ingestion script

* chore: remove config/postgres.yml from .gitignore

* docs: update setup instructions in README

* chore: add index rebuilding script to ingest.sh

* chore: remove litter from Dockerfile

* chore: simplify data addition through ingest script

* feat: integrated file initial upload to review folders functionality

* fix: remove non finalized files from search index

* fix: added makemigrations command to docker-compose

* restructure: move falcon clients and drive file to appropriate folders and fix .gitignore and add test structure.json

* docs: added alternate setup instructions

* feat add workflow to run lint test

* fix: lint issues

* feat: added api_test

fix: lint issues

test

test

test

test

test

test

* chore: add rextra_hosts to docker-compose

Co-authored-by: Mahak <gmahak1@gmail.com>
  • Loading branch information
ayanchoudhary and mhk19 authored Apr 29, 2020
1 parent e351219 commit dbbde8c
Show file tree
Hide file tree
Showing 91 changed files with 14,051 additions and 45 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
37 changes: 37 additions & 0 deletions .github/workflows/api_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Python CI

on:
push:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install PostgreSQL 10 client
run: |
sudo apt-get -yqq install libpq-dev
- name: Install libexempi3
run: |
sudo apt-get install -y libexempi3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest && pip install requests
- name: Start docker
run: |
docker container prune -f
docker-compose up -d
bash -c 'while [[ "$(curl --insecure -s -o /dev/null -w ''%{http_code}'' http://localhost:8005/api/v1/departments)" != "200" ]]; do sleep 10 && docker logs studyportal-nexus; done'
./ingest.sh
bash -c 'while [[ "$(curl --insecure -s -o /dev/null -w ''%{http_code}'' http://localhost:8005/api/v1/search/?q=test)" != "200" ]]; do sleep 5; done'
- name: Run Tests
run: |
pytest
22 changes: 22 additions & 0 deletions .github/workflows/lint_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint Test
on:
push:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pycodestyle
- name: Run lint test
run: |
pycodestyle
env:
ADMIN_GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }}
126 changes: 122 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,122 @@
.idea
.vscode
studyportal/config/postgresql.yml
**/__pycache__
# Django #
*.log
*.pot
*.pyc
__pycache__
db.sqlite3
media

# Backup files #
*.bak

# If you are using PyCharm #
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/gradle.xml
.idea/**/libraries
*.iws /out/

# Python #
*.py[cod]
*$py.class

# Distribution / packaging
.Python build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
.pytest_cache/
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery
celerybeat-schedule.*

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# mkdocs documentation
/site

# mypy
.mypy_cache/

# Sublime Text #
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
*.sublime-workspace
*.sublime-project

# sftp configuration file
sftp-config.json

# Package control specific files Package
Control.last-run
Control.ca-list
Control.ca-bundle
Control.system-ca-bundle
GitHub.sublime-settings

# Visual Studio Code #
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history

# Files
/files/*
credentials.json
venv/
studyportal/drive/structure.json
Loading

0 comments on commit dbbde8c

Please sign in to comment.