Skip to content

Commit 62040e2

Browse files
anlu85olofk
authored andcommitted
Initial commit: add FuseSoC Package Database implementation
0 parents  commit 62040e2

126 files changed

Lines changed: 15505 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coveragerc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[run]
2+
omit =
3+
*/migrations/*
4+
*/tests/*
5+
*/test_*.py
6+
*/__init__.py
7+
*/settings.py
8+
*/wsgi.py
9+
*/asgi.py
10+
*/manage.py
11+
*/venv/*
12+
*/.venv/*
13+
*/site-packages/*
14+
15+
[report]
16+
exclude_lines =
17+
pragma: no cover
18+
def __str__
19+
if self\.debug
20+
if settings\.DEBUG
21+
raise AssertionError
22+
raise NotImplementedError
23+
if __name__ == .__main__.:

.dockerignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Python cache and bytecode files
2+
__pycache__/
3+
*.py[cod]
4+
5+
# Virtual environments
6+
.venv/
7+
8+
# Distribution / packaging
9+
build/
10+
dist/
11+
*.egg
12+
*.whl
13+
14+
# Django specific
15+
*.log
16+
*.pot
17+
*.pyc
18+
*.pyo
19+
*.sqlite3
20+
21+
# Unit test / coverage reports
22+
.coverage
23+
.tox/
24+
.nox/
25+
*.cover
26+
coverage.xml
27+
htmlcov/
28+
29+
# Static and media files (if managed outside Docker)
30+
staticfiles/
31+
media/
32+
33+
# IDE and editor files
34+
.vscode/
35+
36+
# System files
37+
.DS_Store
38+
Thumbs.db
39+
40+
# Git repository
41+
.git/
42+
43+
# Docker-specific files
44+
Dockerfile
45+
docker-compose.yml
46+
.dockerignore

.env.example

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# .env.example
2+
# -----------------------------------------------------------------------------
3+
# FuseSoC-PD environment configuration file
4+
# Copy this file to `.env` and fill in the values as needed.
5+
# Never commit your real secret key or access tokens to version control!
6+
# -----------------------------------------------------------------------------
7+
8+
# Comma-separated list of hosts/domain names that this Django site can serve.
9+
# For development, you can use 'localhost' or '127.0.0.1'.
10+
ALLOWED_HOSTS=localhost
11+
12+
# CSRF_TRUSTED_ORIGINS:
13+
# Comma-separated list of trusted origins (including scheme, e.g., https://) for CSRF protection.
14+
# These should match the domains your site is served from, including any subdomains or alternate domains.
15+
# Example (for production): CSRF_TRUSTED_ORIGINS=https://yourdomain.com,https://www.yourdomain.com
16+
# For local development, you can usually leave this blank.
17+
CSRF_TRUSTED_ORIGINS=
18+
19+
# Django secret key for cryptographic signing.
20+
# Generate a unique, random value for production:
21+
# python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
22+
# Always wrap the value in quotes if it contains special characters (e.g., #, $, ").
23+
DJANGO_SECRET_KEY=""
24+
25+
# The GitHub repository to use, in the format 'username/repo'.
26+
GITHUB_REPO=
27+
28+
# A GitHub personal access token with the required permissions for your app.
29+
# Never share or commit your real token!
30+
GITHUB_ACCESS_TOKEN=
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Description
10+
11+
A clear and concise description of what the bug is.
12+
13+
## Steps to Reproduce
14+
15+
1.
16+
2.
17+
3.
18+
4.
19+
20+
## Expected Behavior
21+
22+
What you expected to happen.
23+
24+
## Actual Behavior
25+
26+
What actually happened.
27+
28+
## Possible Fix
29+
30+
(Optional) Suggest a fix or reason for the bug.
31+
32+
## Screenshots
33+
34+
If applicable, add screenshots to help explain your problem.
35+
36+
## Environment
37+
38+
- Operating System:
39+
- Browser (if applicable):
40+
- Version of software related to the bug:
41+
42+
## Additional Context
43+
44+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/issue.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Issue
3+
about: Create a new issue or feature request
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
## Summary
10+
11+
Brief description of the issue.
12+
13+
## Motivation
14+
15+
Why is this issue important? What is the impact?
16+
17+
## Detailed Description
18+
19+
Provide a detailed description of the issue. Include any specific details that might help in resolving it.
20+
21+
## Possible Implementation
22+
23+
(Optional) Suggest an approach or plan for addressing the issue.
24+
25+
## Tasks
26+
27+
- [ ] Task 1
28+
- [ ] Task 2
29+
- [ ] Task 3
30+
31+
## Acceptance Criteria
32+
33+
List the criteria that must be met for the issue to be considered complete.
34+
35+
## Additional Context
36+
37+
Add any other context or screenshots about the issue here.

.github/workflows/ci.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "**" ]
6+
pull_request:
7+
branches: [ "**" ]
8+
9+
env:
10+
PYTHON_VERSION: "3.13"
11+
DJANGO_SECRET_KEY: dummysecretkeyforci
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Build the Docker image
19+
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
20+
21+
lint:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Set up Python ${{ env.PYTHON_VERSION }}
26+
uses: actions/setup-python@v3
27+
with:
28+
python-version: ${{ env.PYTHON_VERSION }}
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install -r requirements-dev.txt
33+
- name: Analysing the code with pylint
34+
run: pylint --output-format=json . > pylint.json
35+
- name: Upload pylint report
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: pylint-report
39+
path: pylint.json
40+
41+
test:
42+
name: Run pytest with coverage
43+
runs-on: ubuntu-latest
44+
env:
45+
DJANGO_DEBUG: "True"
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Set up Pythonn ${{ env.PYTHON_VERSION }}
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: ${{ env.PYTHON_VERSION }}
52+
- name: Install dependencies
53+
run: pip install -r requirements-dev.txt
54+
- name: Run pytest with coverage
55+
run: |
56+
pytest --cov=. --cov-report=term-missing --cov-report=xml --cov-report=html --cov-fail-under=80 --junitxml=report.xml --html=pytest-report.html
57+
- name: Upload coverage and reports
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: pytest-reports
61+
path: |
62+
pytest-report.html
63+
htmlcov/
64+
.coverage
65+
coverage.xml
66+
report.xml

.github/workflows/docker.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- 'v*.*.*' # For version tags like v1.2.3
9+
10+
env:
11+
IMAGE_NAME: ghcr.io/${{ github.repository }}
12+
13+
jobs:
14+
build-and-push:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
packages: write
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v3
26+
27+
- name: Log in to GitHub Container Registry
28+
uses: docker/login-action@v3
29+
with:
30+
registry: ghcr.io
31+
username: ${{ github.actor }}
32+
password: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- name: Extract metadata (tags, labels)
35+
id: meta
36+
uses: docker/metadata-action@v5
37+
with:
38+
images: ${{ env.IMAGE_NAME }}
39+
40+
- name: Build and push Docker image
41+
id: build-and-push
42+
uses: docker/build-push-action@v5
43+
with:
44+
context: .
45+
push: true
46+
tags: |
47+
${{ env.IMAGE_NAME }}:latest
48+
${{ env.IMAGE_NAME }}:${{ github.sha }}
49+
${{ steps.meta.outputs.tags }}
50+
labels: ${{ steps.meta.outputs.labels }}
51+
52+
- name: Image digest
53+
run: |
54+
echo "Image digest: ${{ steps.build-and-push.outputs.digest }}"

.github/workflows/docs.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build and Deploy Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
pull_request:
9+
10+
permissions:
11+
contents: read
12+
id-token: write
13+
pages: write
14+
15+
env:
16+
DJANGO_SECRET_KEY: dummysecretkeyforci
17+
18+
jobs:
19+
build-docs:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.11'
26+
- name: Install dependencies
27+
run: pip install -r requirements-dev.txt
28+
- name: Build docs (fail on warnings)
29+
run: sphinx-build -b html -W docs/source docs/build
30+
31+
deploy-docs:
32+
needs: build-docs
33+
if: github.ref == 'refs/heads/main'
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
- uses: actions/setup-python@v5
38+
with:
39+
python-version: '3.11'
40+
- name: Install dependencies
41+
run: pip install -r requirements-dev.txt
42+
- name: Build docs
43+
run: sphinx-build -b html docs/source docs/build
44+
- name: Upload Pages artifact
45+
uses: actions/upload-pages-artifact@v3
46+
with:
47+
path: docs/build
48+
- name: Deploy to GitHub Pages
49+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Django-specific files
2+
*.log
3+
*.pot
4+
*.pyc
5+
__pycache__/
6+
local_settings.py
7+
db.sqlite3
8+
9+
# Virtual Environment
10+
.env
11+
venv/
12+
env/
13+
14+
# PyCharm-specific files
15+
.idea/
16+
17+
# Other files
18+
.DS_Store
19+
Thumbs.db
20+
.coverage
21+
.tox/
22+
.eggs/
23+
24+
# pytest and coverage reports
25+
report.html
26+
report.xml
27+
coverage.xml
28+
.coverage
29+
htmlcov/
30+
reports/
31+
test-reports/
32+
33+
#d ocumenation
34+
docs/build

0 commit comments

Comments
 (0)