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

Adding some lines of code #95

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b863d16
Add API documentation for create_new_faceEntry, get_employees, read_e…
Devasy23 Mar 8, 2024
da55cb2
Merge branch 'merge-code-mark-1' into 'main'
Devasy23 Mar 8, 2024
9079430
Update .gitlab-ci.yml file
Devasy23 Mar 8, 2024
9b358a7
Update .gitlab-ci.yml file
Devasy23 Mar 8, 2024
1605bb3
Update .gitlab-ci.yml file
Devasy23 Mar 8, 2024
27a6def
Delete test_register_face.py
Devasy23 Mar 9, 2024
5649379
Merge pull request #27 from Devasy23/merge-update
devansh-shah-11 Mar 14, 2024
65643ef
added vector search test code
Devasy23 Mar 16, 2024
1d415d4
Add Face Recognition System Proposal
Devasy23 Mar 20, 2024
2733c39
Add project plan for Phase-I: Collection of Dataset and Requirement S…
Devasy23 Mar 20, 2024
61e8baf
Merge pull request #31 from Devasy23/Proposal-document
Devasy23 Mar 20, 2024
36a6049
Create sonarcloud.yml
Devasy23 Mar 24, 2024
c5b501b
Update sonarcloud.yml
Devasy23 Mar 25, 2024
3c5170e
Update sonarcloud.yml (#39)
Devasy23 May 8, 2024
b30324a
Updated gitlab-ci to List files to check if coverage.xml is present
Devasy23 May 16, 2024
5c64b86
chore: Added dotenv to requirements
Devasy23 May 16, 2024
ec15181
chore: Add dotenv to requirements
Devasy23 May 16, 2024
4cf1990
chore: optimized ci pipelines
Devasy23 May 16, 2024
76c98b1
chore: Update Python version to 3.10 and optimize CI pipelines
Devasy23 May 16, 2024
1ff929e
chore: Update Python version to 3.10 and optimize CI pipelines
Devasy23 May 16, 2024
bb293b2
chore: added rust dependency resolver
Devasy23 May 16, 2024
2cd7486
chore: added rust dependency resolver
Devasy23 May 16, 2024
f844718
chore: removed flake8
Devasy23 May 16, 2024
b13c9be
chore: removed flake8
Devasy23 May 16, 2024
40748a7
chore: Update dependencies and add code coverage badges
Devasy23 May 22, 2024
c5aa34f
chore: Update dependencies and add code coverage badges
Devasy23 May 22, 2024
a0af3de
Add vector_search function for pipeline aggregation (#30)
Devasy23 Jun 1, 2024
e7001ce
chore: Add sonar.python.coverage.reportPaths to sonar-project.properties
Devasy23 Jun 1, 2024
7acd5af
chore: Update Python version to 3.10 and optimize CI pipelines (#44)
Devasy23 Jun 1, 2024
e222588
Add pre-commit hooks and update requirements.txt (#32)
Devasy23 Jun 4, 2024
b82ae4a
Release: Add Changelog CI workflow (v0.1.6) (#41)
Devasy23 Jun 4, 2024
2f0711f
feat: Add Frontend Support for vector search function and improve fac…
Devasy23 Jul 29, 2024
9f97d1a
Feat: Add functionality to calculate intra-cluster distances and comp…
Devasy23 Aug 2, 2024
8ef11b6
chore: added sphinx documentation
Devasy23 Sep 13, 2024
1041ac9
chore: updated requirements
Devasy23 Sep 13, 2024
e3b7c62
chore: updated requirements
Devasy23 Sep 13, 2024
3a8ae39
chore: updated requirements
Devasy23 Sep 13, 2024
dfcb0f5
chore: updated requirements
Devasy23 Sep 13, 2024
05b0641
chore: updated requirements
Devasy23 Sep 13, 2024
cadb979
chore: updated documentations and formattings
Devasy23 Sep 13, 2024
74b1706
chore: updated documentations
Devasy23 Sep 13, 2024
9e0a157
Update README.md
Devasy23 Sep 15, 2024
ff4ed8c
Restructured code (#51)
Delinkelin Sep 17, 2024
5593c97
Create CODE_OF_CONDUCT.md
Devasy23 Oct 1, 2024
b910af0
Create SECURITY.md
Devasy23 Oct 1, 2024
2466d50
Solved issue for requirements bug (#69)
Devasy23 Oct 10, 2024
c3f4df3
Adding some lines of code for CNN backbone
Shalinis19137 Oct 12, 2024
4602f48
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 12, 2024
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
14 changes: 7 additions & 7 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- [ ] Info
- [ ] Bug
- [ ] Documentation
- [ ] Other (please specify):
- [ ] Other (please specify):

## Description
<!-- Describe the issue in detail. What problem are you experiencing or what feature would you like to see added? -->
Expand All @@ -23,18 +23,18 @@

## Steps to Reproduce
<!-- If applicable, provide a step-by-step guide to reproducing the issue -->
1.
2.
3.
1.
2.
3.

## Screenshots / Code Snippets (if applicable)
<!-- Include any relevant screenshots or code snippets that can help understand the issue better -->

## Environment
<!-- Provide details about your environment -->
- Operating System:
- Browser (if applicable):
- Version/Commit ID (if applicable):
- Operating System:
- Browser (if applicable):
- Version/Commit ID (if applicable):

## Possible Solution (if you have any in mind)
<!-- If you have an idea about how to fix the issue, please share it here -->
Expand Down
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ labels: ''
assignees: ''

---


2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ Please describe the tests that you ran to verify your changes. Provide instructi
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
- [ ] Any dependent changes have been merged and published in downstream modules
38 changes: 38 additions & 0 deletions .github/workflows/changelog-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Changelog CI

# Trigger on pull request event
on:
pull_request:
types: [ opened, synchronize, reopened ]



jobs:
build:
runs-on: ubuntu-latest

steps:
# Check out the repository content
- uses: actions/checkout@v2

# Run Changelog CI action
- name: Run Changelog CI
uses: saadmk11/[email protected]
with:
changelog_filename: CHANGELOG.md
committer_username: github-actions[bot]
committer_email: github-actions[bot]@users.noreply.github.com
config_file: changelog-config.yaml
# GitHub token for authorization
github_token: ${{ secrets.GITHUB_TOKEN }}
# Create a new release
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ github.run_number }}
# release_name: Release ${{ github.run_number }}
# draft: false
# prerelease: false
44 changes: 28 additions & 16 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
Expand All @@ -14,32 +11,47 @@ permissions:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"
# cache: "pip"
# - run: pip install -r requirements.txt

- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
pip install uv
uv pip install flake8 pytest pytest-cov
if [ -f requirements.txt ]; then uv pip install -r requirements.txt; fi

- name: Test with pytest
run: |
pytest --cov .
source venv/bin/activate
pytest --cov --cov-report term --cov-report xml:coverage.xml || true
continue-on-error: true

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: devansh-shah-11/FaceRec
slug: devansh-shah-11/FaceRec
files: coverage.xml
flags: unittests
name: codecov-umbrella
# fail_ci_if_error: true
58 changes: 58 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: SonarCloud analysis

on:
push:
branches: [ "main" ]
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:

permissions:
contents: read
security-events: write
pull-requests: read # allows SonarCloud to decorate PRs with analysis results

jobs:
Analysis:
runs-on: ubuntu-latest

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

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip
pip install uv
uv pip install flake8 pytest pytest-cov
if [ -f requirements.txt ]; then uv pip install -r requirements.txt; fi

- name: Test with pytest
run: |
source venv/bin/activate
pytest --cov --cov-report term --cov-report xml:coverage.xml || true
continue-on-error: true

- name: Upload coverage data to SonarCloud
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Provided by GitHub Actions, no need for custom PAT unless required
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # SonarCloud secret token
with:
args: >
-Dsonar.python.coverage.reportPaths=coverage.xml
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,8 @@ cython_debug/
venv/
*.pyc
.vscode/
__pyc
__pyc
FaceRec/static/Images/uploads/*
Images/dbImages/*
Images/Faces/*
Images/
46 changes: 46 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
stages:
- build
- test

default:
image: python:3.9.18-slim-bullseye

cache:
paths:
- .cache/pip # Cache pip downloads
- venv # Cache virtual environment

before_script:
- python -m venv venv # Create a virtual environment
- source venv/bin/activate # Activate virtual environment
- pip install --upgrade pip # Upgrade pip
- pip install uv
- uv pip install -r requirements.txt # Install requirements

linting-job:
stage: build
script:
- echo "Linting code... This will take about 10 seconds."
- pip install black isort flake8 # Install additional linting tools
- black .
- isort .
- flake8 . || echo "Linting check failed but allowed to continue"

pytest-job:
stage: build # Change stage to 'build' to run in parallel with linting-job
script:
- echo "Running pytest... This will take about 1 minute."
- apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
- uv pip install pytest-cov # Install testing tools
- black .
- pytest --junitxml=pytest.xml || true # Ensure that tests run to completion
- pytest --cov --cov-report term --cov-report xml:coverage.xml || true
- ls -la # Debugging step to check if coverage.xml is present
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
junit: pytest.xml
expire_in: "30 days"
15 changes: 15 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
repos:
- repo: https://github.com/psf/black
rev: 24.8.0 # Use the latest stable version of Black
hooks:
- id: black

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/hhatto/autopep8
rev: v2.3.1 # Use the latest stable version of autopep8
hooks:
- id: autopep8
17 changes: 17 additions & 0 deletions .pre-commit-security.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
repos:
- repo: https://github.com/PyCQA/bandit
rev: 1.7.0
hooks:
- id: bandit
files: \.py$ # Run Bandit only on Python files
additional_dependencies: [toml] # Additional dependencies required by Bandit
args: [--skip, B101] # Skip Bandit test B101 (assert statements)
- repo: https://github.com/safepass-dev/safepass-pre-commit
rev: v0.1.0
hooks:
- id: safepass
files: \.(py|yaml|yml|json)$ # Run Safepass on Python, YAML, and JSON files
- repo: https://github.com/pyupio/safety-hooks
rev: v2.0.3
hooks:
- id: safety
19 changes: 19 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# .readthedocs.yaml

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.10"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: requirements.txt
2 changes: 2 additions & 0 deletions API/_init_.py → API/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import uvicorn
from fastapi import FastAPI

Expand Down
Loading
Loading