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

Backend merge #98

Merged
merged 136 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
e3715bb
Initial backend commit
krugergui Sep 27, 2023
fca4e01
Added README
krugergui Sep 27, 2023
6e7ac7d
Updated encoding
krugergui Sep 28, 2023
146f34a
Included local DB and VSCode variables
krugergui Sep 28, 2023
abcfca7
Built DJANGO models from DB and initialized example API view
krugergui Sep 29, 2023
73d8113
Dockerfile configurations
krugergui Sep 29, 2023
174889a
Updated enviroment variables
krugergui Sep 29, 2023
b9b5e1e
Updated docker image to use alpine distro
krugergui Sep 30, 2023
e39563b
Separated between Docker and .env requirements
krugergui Sep 30, 2023
5ff344c
Optimized layers for faster deployment
krugergui Oct 2, 2023
da915e5
Added login endpoint and removed restrictions for writing to DB
krugergui Oct 2, 2023
a6e0e0f
Added signup endpoint and updates users view
krugergui Oct 3, 2023
5797381
Added test to upload files to GCP
krugergui Oct 4, 2023
3994ca9
Removed migrations folder
krugergui Oct 4, 2023
e4f75c4
Added files test along with images
krugergui Oct 4, 2023
2618dd3
Updated with CORS
krugergui Oct 4, 2023
9839bfd
Implemented Gunicorn
krugergui Oct 5, 2023
39113ac
Merge pull request #1 from WomenPlusPlus/backend
krugergui Oct 5, 2023
c1fc903
GitHub actions (#24)
golubevtanya Oct 5, 2023
df454ef
Reverted back to normal user
krugergui Oct 5, 2023
e2a3cee
Updated encoding, should work with black now
krugergui Oct 5, 2023
8f6058a
Rebuilt models according to new specifications, corrected response codes
krugergui Oct 6, 2023
c480232
Added recover/logout enpoints. Added POST only pages to api root view
krugergui Oct 8, 2023
65914da
Added invite endpoint
krugergui Oct 9, 2023
5846df7
Users can only be signed up with a valid token and email
krugergui Oct 9, 2023
067f58a
Added DRF-Swagger @Endpoint /api/docs/
krugergui Oct 10, 2023
20fe2e6
User refresh_token is used to get a new access_token when the access_…
krugergui Oct 10, 2023
7f66c0d
Backend (#35)
krugergui Oct 11, 2023
e06e7bf
Added many endpoints. Altered models to fit Supabase UUID. Implemente…
krugergui Oct 12, 2023
5022ab6
Added Soft Skills endpoint
krugergui Oct 12, 2023
a8306fd
Modified return token for the respective table id instead of supabase id
krugergui Oct 12, 2023
73eb07b
Added swagger as default page
krugergui Oct 12, 2023
bbd43e1
Added personalities and values endpoints
krugergui Oct 12, 2023
ba3ed03
Merge branch 'dev' into backend
krugergui Oct 12, 2023
6449523
Backend (#37)
krugergui Oct 12, 2023
b61ca12
Added restriction for company domains.
krugergui Oct 12, 2023
61a72c4
Merge branch 'backend' of https://github.com/WomenPlusPlus/deploy-imp…
krugergui Oct 12, 2023
0bf7ae1
Merge branch 'dev' into backend
krugergui Oct 12, 2023
184ec9c
Smaill corrections
krugergui Oct 13, 2023
fa9528b
Merge branch 'backend' of https://github.com/WomenPlusPlus/deploy-imp…
krugergui Oct 13, 2023
9593b1f
Refresh token is now sent to FE
krugergui Oct 16, 2023
ddc6f50
Refresh token is now sent to FE
krugergui Oct 16, 2023
d530599
Updated CORS headers for deployed app
krugergui Oct 18, 2023
c71de01
Merge branch 'backend' of https://github.com/WomenPlusPlus/deploy-imp…
krugergui Oct 18, 2023
a40dd18
Remodeled according to Patricia's sheet.
krugergui Oct 22, 2023
d04ffbe
Backend-gh-actions-deploy#45
krugergui Oct 22, 2023
8694e4f
Deploy-trigger
krugergui Oct 22, 2023
d05474d
Added migrations
krugergui Oct 23, 2023
d222148
Update actions to only run on specific tags
krugergui Oct 23, 2023
78edc9f
GH Actions deploy only on specific tag
krugergui Oct 23, 2023
82c04c0
Test-deploy
krugergui Oct 23, 2023
cab60eb
Test-deploy
krugergui Oct 23, 2023
fb69d80
Changed action name
krugergui Oct 23, 2023
a1e47ec
companies-jobs-endpoints-deploy
krugergui Oct 23, 2023
f5eecb1
matching-algorithm-soft-hard-skills-deploy
krugergui Oct 24, 2023
a939347
Altered return values for token according to SHIFT-290
krugergui Oct 24, 2023
632f933
a939347-deploy
krugergui Oct 24, 2023
a281a31
fixed-swagger-ui-deploy
krugergui Oct 24, 2023
b9b9f2f
fixed-company-return-login-deploy
krugergui Oct 24, 2023
1512b64
resolved-SHIFT-259-deploy
krugergui Oct 24, 2023
3fbef3d
Grouped Docs
krugergui Oct 24, 2023
ca32e2d
Added jobs listings per company endpoint
krugergui Oct 24, 2023
f33608b
2f7d5ee-deploy
krugergui Oct 24, 2023
1dbc442
Added matches to the company jobs view
krugergui Oct 24, 2023
e8f5f3f
1dbc442-deploy
krugergui Oct 24, 2023
f7a80b8
Fixed return array for candidates in matches and return for hard and …
krugergui Oct 24, 2023
1765cb3
f7a80b8-deploy
krugergui Oct 24, 2023
83a70ca
Added list of matched jobs when calling a candidate by ID
krugergui Oct 24, 2023
5c67c5c
83a70ca-deploy
krugergui Oct 24, 2023
609bae9
from_alpine_to_debian_container-deploy
golubevtanya Oct 25, 2023
bce76e3
Debian_docker-deploy
golubevtanya Oct 25, 2023
480213c
Debian_docker-deploy
golubevtanya Oct 25, 2023
52ad683
New fields for embeddeds and update on save
krugergui Oct 25, 2023
eda0e0e
New fields for embeddeds and update on save (#59)
krugergui Oct 25, 2023
1aae6ff
Merge branch 'backend' of https://github.com/WomenPlusPlus/deploy-imp…
krugergui Oct 25, 2023
84a429c
update display of skills in serialiazer when saving candidate with list
krugergui Oct 25, 2023
a4bf7ef
Jobs and Cadidates now accept a Send-Matches header (#60) -deploy
krugergui Oct 25, 2023
b5b9fb7
Changed the return of the matches to be conditional to the Hide-Match…
krugergui Oct 25, 2023
dd4fe47
Changed command to hide Hide-Matches to Show matches
krugergui Oct 25, 2023
993f241
Backend matchs conditional (#63)-deploy
krugergui Oct 25, 2023
9a400b9
Countries now return the name instead of ID in jobs-deploy
krugergui Oct 25, 2023
6433318
Added embedded matching algorithm files and in function
krugergui Oct 25, 2023
dc7c83c
Added tokenization function to models
krugergui Oct 26, 2023
7be3141
Removed Put from the available methods
krugergui Oct 26, 2023
88d18b9
Tockens matching and Skills extractor (#68)
golubevtanya Oct 26, 2023
b52a110
Rectoring
krugergui Oct 26, 2023
dbbdfc8
Merge branch 'backend' of https://github.com/WomenPlusPlus/deploy-imp…
krugergui Oct 26, 2023
7f9266a
skils_extractor (#69)
golubevtanya Oct 26, 2023
74c6154
Merge branch 'backend' of https://github.com/WomenPlusPlus/deploy-imp…
krugergui Oct 26, 2023
ea14dad
Added matching algorithm and concatenated aboutme and experience from…
krugergui Oct 26, 2023
dbe0bac
Update serializers with free text matching score
krugergui Oct 26, 2023
684ad0b
dbe0bac-deploy
krugergui Oct 26, 2023
266f6f4
Added skill extractor and saving to DB, restricted matches return on …
krugergui Oct 26, 2023
68b3e82
Refactored files, removed duplicates and replaced classes on wrong files
krugergui Oct 27, 2023
25f1a33
68b3e825deec06c33ee55b18da44c04cb6c02344-deploy
krugergui Oct 27, 2023
d040764
Added authorization services
krugergui Oct 27, 2023
ee47cfe
Added authorization services (#73)
krugergui Oct 27, 2023
dadfa19
Fixed Jobs viewset
krugergui Oct 27, 2023
f21b859
Backend fix jobs viewset (#74)
krugergui Oct 27, 2023
a1bb6cb
Added autentication files
krugergui Oct 27, 2023
a7aefbc
Backend authentification files (#75)
krugergui Oct 27, 2023
6052400
Updated README and small refactoring
krugergui Oct 27, 2023
ad0f1b8
Backend readme (#76)
krugergui Oct 27, 2023
726dea7
Changed jobs returns
krugergui Oct 27, 2023
b0156c9
726dea7-deploy
krugergui Oct 27, 2023
ebf2be8
Resolved conflicts
krugergui Oct 27, 2023
3a62ea0
ad0f1b8-ebf2be8-deploy
krugergui Oct 27, 2023
2b93ae8
Disabled authentication for Candidates view
krugergui Oct 27, 2023
efcd27f
2b93ae8-deploy
krugergui Oct 27, 2023
72326f3
Notebooks parsing (#80)
golubevtanya Oct 27, 2023
9b330dc
Added tests for the pairwise mathcing algorithm and folders restructu…
golubevtanya Oct 28, 2023
f709db7
temp
krugergui Oct 29, 2023
a5949b8
temp_BSOD
krugergui Oct 29, 2023
6d6f29e
Update all models and serializers as dicussed with Janice and Tanya
krugergui Oct 29, 2023
ec71c14
a5949b8-deploy
krugergui Oct 29, 2023
bbb1832
updated dockerfile -deploy
krugergui Oct 29, 2023
25f0f2d
Update build-and-deploy-backend.yaml
krugergui Oct 29, 2023
8c69f19
Update build-and-deploy-backend.yaml
krugergui Oct 29, 2023
578b096
Update build-and-deploy-backend.yaml
krugergui Oct 29, 2023
eda3d81
Update build-and-deploy-backend.yaml
krugergui Oct 29, 2023
a4fde09
Update build-and-deploy-backend.yaml
krugergui Oct 29, 2023
b812780
Fixed login and other single views
krugergui Oct 29, 2023
b64b7e7
Saving embeddings as array for easier loading
krugergui Oct 29, 2023
90f7be4
Saving embeddings as array for easier loading (#97) -deploy
krugergui Oct 29, 2023
09c5fd6
Removed debug statements
krugergui Oct 29, 2023
08263f5
09c5fd6-deploy
krugergui Oct 29, 2023
34cc4da
backend merge
krugergui Oct 29, 2023
f74e206
ready to merge backend
krugergui Oct 29, 2023
e861542
Added tests
krugergui Oct 30, 2023
fd8e732
Updated backend part of the README
krugergui Oct 30, 2023
9d5ff1d
Merge branch 'main' into backend
krugergui Oct 30, 2023
0b0b899
Removed duplicates from matches return-deploy
krugergui Oct 30, 2023
b318513
Merge branch 'backend' of https://github.com/WomenPlusPlus/deploy-imp…
krugergui Oct 30, 2023
fa37978
Added fields to match return for jobs
krugergui Oct 30, 2023
c16afe4
fa37978-deploy
krugergui Oct 30, 2023
ddc662a
updated settings location
krugergui Oct 30, 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
67 changes: 67 additions & 0 deletions .github/workflows/build-and-deploy-backend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build Image and Deploy to Cloud Run
on:
push:
branches:
- backend
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

env:
REPOSITORY_REGION: europe-west10
PROJECT_ID: dockerruntest
REPO_NAME: quickstart-docker-repo
IMAGE_NAME: django-backend-shift-enter
PROJECT_USER: [email protected]

jobs:
docker-release:
name: Tagged Docker release to Google Artifact Registry
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '-deploy')

steps:
- id: checkout
name: Checkout
uses: actions/checkout@v4

- name: Login to Artifact Registry
uses: docker/login-action@v1
with:
registry: ${{ env.REPOSITORY_REGION }}-docker.pkg.dev
username: _json_key
password: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_GUIL }}

- name: Get tag
id: get-tag
run: echo "{short_ref}={GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT

- name: Create .env
env:
ENV_FILE_BACKEND: ${{ secrets.ENV_FILE_BACKEND }}
run: echo $ENV_FILE_BACKEND | base64 --decode > ./src/backend/.env

- id: docker-push-tagged
name: Tag Docker image and push to Google Artifact Registry
uses: docker/[email protected]
with:
push: true
tags: |
${{ env.REPOSITORY_REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
context: ./src/backend

- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_GUIL }}'

- id: 'deploy'
name: Deploy to GC RUN
uses: 'google-github-actions/deploy-cloudrun@v1'
with:
service: ${{ env.IMAGE_NAME }}
image: ${{ env.REPOSITORY_REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
region: ${{ env.REPOSITORY_REGION }}

- name: 'Use output'
run: 'curl "${{ steps.deploy.outputs.url }}"'
37 changes: 37 additions & 0 deletions .github/workflows/req_lint_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: requirements_lint_test
on:
# Triggers the workflow on push to all the branches and on pull request to the "master" or the "dev" branch
push:
pull_request:
branches: [ "master", "dev", "backend", "pytest"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
test-n-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: Install dependencies
run: |
python -m pip install -r src/backend/requirements.txt
python -m pip install -r requirements_git_actions.txt

- name: apply_black
run:
black --verbose .

- uses: psf/black@stable
with:
options: "--check --verbose"
src: "."
jupyter: true
version: "~= 22.0"

- name: Test with pytest
run: |
pytest

27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
.DS_Store
/.idea
.ngnix_def.conf
api/insert_embededs.py
docker-compose.yml
gunicorn/
notebooks/
skill_db_relax_20.json
static/
token_dist.json
backend/extrac_table.ipynb
backend/logs/
backend/qcls
backend/rest_framework/
backend/secrets/
backend/shift_3_womenpp/__pycache__
backend/api/__pycache__/
backend/api/imported_auth_models.py
backend/api/insert_embededs.py
backend/api/migrations/__pycache__/
*.bak
backend/api/old_models.py
backend/csvs_database/
backend/.venv/
backend/Presenation.zip
backend/admin/
backend/.env
.vscode
backend/django_extensions/
Loading
Loading