Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6e9d24e
refactor: improved header
Bogdan2005-19 Apr 30, 2026
7120b40
refactor(css): small improvement at sidebar user profile part
Bogdan2005-19 Apr 30, 2026
6067af4
refactor(home): improved html structure for better readability
Bogdan2005-19 Apr 30, 2026
24d79e4
feat(content): Added platforms aviability in details page
Bogdan2005-19 Apr 30, 2026
816cf7a
Deleted comments
Bogdan2005-19 Apr 30, 2026
64421a7
Deleted comments
Bogdan2005-19 Apr 30, 2026
bd51e5e
fix(home): Search catlog does not show duplicates
Bogdan2005-19 Apr 30, 2026
3ed5014
Merge pull request #108 from Null-Pointers2-0/HTML-Refactor-branch
gery25 Apr 30, 2026
fc19df6
Merge pull request #110 from Null-Pointers2-0/23-featcontent-ui-displ…
gery25 Apr 30, 2026
291eb45
Merge branch 'dev' into 109-bugcatalog-duplicated-contents-when-searc…
gery25 Apr 30, 2026
350d27c
Merge pull request #111 from Null-Pointers2-0/109-bugcatalog-duplicat…
gery25 Apr 30, 2026
783dde5
feat: added plataform filtering, and seeing on catalog witch platafor…
May 1, 2026
e68c9e9
fix: fixed the pagination
May 1, 2026
28ad232
fix: fixed to string on Api
May 1, 2026
0924ed1
Merge pull request #112 from Null-Pointers2-0/21-featcontent-implemen…
gery25 May 2, 2026
dc2b8d0
fixed: port api models problems
May 2, 2026
a9e482b
feat (DDBB): added neon with postgres sql to database settings
May 5, 2026
5af3c69
feat (BBDD): added implementation of bbdd as the uml
May 5, 2026
e995cb3
fix: delete unnecessary files
May 5, 2026
15f6ec6
fix: merge conflicts solved
May 5, 2026
6166bcf
Merge branch 'main' into dev
Bogdan2005-19 May 5, 2026
14d53a5
fix: changed branch push activation on quality-pipeline
Bogdan2005-19 May 5, 2026
7061e0d
added comments for fog metric (Need add more)
Bogdan2005-19 May 5, 2026
e41aaff
fix: changed fog index search path
Bogdan2005-19 May 5, 2026
6601c97
fix(profile-api): resolve AttributeError in profile API and include f…
Karu174 May 5, 2026
e93b24d
Merge pull request #115 from Null-Pointers2-0/fix/profile-api-bug
Bogdan2005-19 May 6, 2026
7a6848f
Update push branch configuration in workflow
Bogdan2005-19 May 6, 2026
9964fd2
refactor(action): small changes on json naming
Bogdan2005-19 May 6, 2026
7c101ff
modified fog metric json to match html names
Bogdan2005-19 May 6, 2026
f3c0a97
refactor: added NO DATA to pass on html report
Bogdan2005-19 May 6, 2026
aca7533
refactored metrig html report
Bogdan2005-19 May 6, 2026
dce80ce
Improved html for metrics
Bogdan2005-19 May 6, 2026
b7c0a83
feat (Data Base): added database tables, and relations as the uml
May 6, 2026
8e8fcdc
feat (Data Base): added database tables, and relations as the uml
May 6, 2026
24c86ca
fix (DataBase): fixed conflicts with models and views
May 6, 2026
d295a0e
feat (test_impl): added first test implementation for a form creation…
May 7, 2026
b9aab73
feat(tests): added tests for update customer
May 7, 2026
2730f5a
feat (test_models): added tests on models, and solved tests from forms
May 8, 2026
6c22e8b
feat (test_views): added tests on views
May 8, 2026
6df84f9
feat (test_views): added tests on views
May 8, 2026
2349920
Merge branch '119-feattests-tests-to-django-project' into dev
May 8, 2026
76ba174
feat(data-base): add the visualitzations table
gery25 May 8, 2026
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
8 changes: 4 additions & 4 deletions .github/scripts/depth_conditional_nesting_GP.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ def visit_If(self, node: ast.If) -> None:

def get_status_code(max_depth: int) -> str:
if max_depth > CRITICAL_THRESHOLD:
return "CRITICAL"
return "CRITICAL"
if max_depth >= WARNING_THRESHOLD:
return "🚨 WARNING"
return "OK"
return "WARNING"
return "OK"


def get_metrics(filepath: Path) -> Optional[Dict[str, Any]]:
Expand Down Expand Up @@ -144,7 +144,7 @@ def main() -> None:
all_results.append({
"file": str(filepath),
"avg_depth": metrics["avg"],
"max_depth": metrics["max"],
"max_nesting_depth": metrics["max"],
"status_code": metrics["status_code"]
})
if metrics["max"] > CRITICAL_THRESHOLD:
Expand Down
12 changes: 5 additions & 7 deletions .github/scripts/fog_comments_indexGP.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import re
import os
import sys
import json
import textstat
import re, os, sys, json, textstat
from pathlib import Path

SUPPORTED_EXTENSIONS = {'.py', '.js', '.ts', '.cpp', '.java', '.html'}

EXCLUDE_DIRS = {'.git', 'node_modules', 'venv', 'env', '__pycache__', 'dist'}

def extract_comments(file_path):
extension = os.path.splitext(file_path)[1]

Expand Down Expand Up @@ -75,7 +73,7 @@ def scan(target_path):

files = (
[path] if path.is_file()
else [f for f in path.rglob('*') if f.suffix in SUPPORTED_EXTENSIONS]
else [f for f in path.rglob('*') if f.suffix in SUPPORTED_EXTENSIONS and not any(part in EXCLUDE_DIRS for part in f.parts)]
)

results = []
Expand All @@ -92,7 +90,7 @@ def scan(target_path):
results.append({
"file": str(file),
"avg_fog": round(avg, 1) if avg else None,
"max_fog": round(max_score, 1) if max_score else None,
"fog_score": round(max_score, 1) if max_score else None,
"status_code": status
})

Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/render-integrity-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,15 @@ function buildQualitySection(key, data) {

const results = data.results || []
const totalFiles = (data.summary && data.summary.total_files != null) ? data.summary.total_files : results.length
const violations = results.filter((r) => r.status_code !== 'OK' && r.status_code !== 'OK!')
const violations = results.filter((r) => r.status_code !== 'OK' && r.status_code !== 'OK!' && r.status_code !== 'NO DATA')
const passed = totalFiles - violations.length

const findingsHtml = violations.length === 0
? `<p style="color:#64748b;font-style:italic;margin:0;font-size:14px">All ${totalFiles} file(s) passed — no violations found.</p>`
: violations.map((r) => {
const val = r[qm.metric]
const display = typeof val === 'number' ? val.toFixed(qm.decimals) : (val ?? '?')
const lvl = (r.status_code === 'DANGER' || r.status_code === '⚠️ IMPROVE NAMING') ? 'error' : 'warning'
const lvl = (r.status_code === 'DANGER' || r.status_code === '⚠️ IMPROVE NAMING' || r.status_code === 'COMPLEX') ? 'error' : 'warning'
return `
<div style="display:flex;gap:10px;align-items:flex-start;padding:10px 0;border-bottom:1px solid #f1f5f9">
<div style="flex-shrink:0;padding-top:1px">${chip(lvl)}</div>
Expand Down Expand Up @@ -225,7 +225,7 @@ const qualitySummaryRows = quality
const qm = QUALITY_META[key]
const data = quality[key]
const status = qualityJobStatus(data)
const violations = data ? (data.results || []).filter((r) => r.status_code !== 'OK' && r.status_code !== 'OK!').length : 0
const violations = data ? (data.results || []).filter((r) => r.status_code !== 'OK' && r.status_code !== 'OK!' && r.status_code !== 'NO DATA').length : 0
return `
<tr>
<td style="padding:12px 16px"><strong>${qm.icon} ${esc(qm.name)}</strong></td>
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/quality-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ jobs:
- name: Run fog index analysis
run: |
mkdir -p quality-job4
python .github/scripts/fog_comments_indexGP.py src/ \
python .github/scripts/fog_comments_indexGP.py . \
> quality-job4/fog-results.json
cat quality-job4/fog-results.json

Expand Down
17 changes: 11 additions & 6 deletions Templates/Details/details_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ <h1 class="main-title">{{ content.title }}</h1>
</div>

<div class="side-info-list" style="display: flex; flex-direction: column; gap: 12px;">
{# Los archivos hijos (movie_detail y series_detail) rellenarán esto #}
{% block content_metadata %}{% endblock %}

{% if content.director %}
Expand All @@ -31,8 +30,17 @@ <h1 class="main-title">{{ content.title }}</h1>
<div class="data-card-value">{{ content.director.name }}</div>
</div>
{% endif %}

{% block platforms %}{% endblock %}

<div class="data-card">
<div class="data-card-label">Disponible en:</div>
<div class="data-card-value">
{% for api in available_apis %}
<span>{{ api.name|default:api.port }}</span>
{% empty %}
<span>No hay información de API disponible.</span>
{% endfor %}
</div>
</div>
</div>
</aside>

Expand Down Expand Up @@ -64,14 +72,12 @@ <h2 class="section-title">Acciones</h2>

if (favoriteBtn) {
favoriteBtn.addEventListener('click', function() {
// Lee la URL específica generada por el bloque de Django
const targetUrl = this.getAttribute('data-url');
const btn = this;

fetch(targetUrl, {
method: 'POST',
headers: {
// Al estar incrustado en el template, Django inyecta el token aquí directamente
'X-CSRFToken': '{{ csrf_token }}',
'Content-Type': 'application/json'
}
Expand All @@ -81,7 +87,6 @@ <h2 class="section-title">Acciones</h2>
return response.json();
})
.then(data => {
// Actualización directa de la interfaz gráfica
if (data.status === 'added') {
btn.innerText = 'Quitar de la lista';
btn.style.color = 'var(--cyan)';
Expand Down
4 changes: 1 addition & 3 deletions Templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
{% if user.is_authenticated %}
<span class="welcome-text">{% trans "Welcome" %} {{ user.username }}</span>
{% endif %}
</div>
<div class="header-right">
<form action="{% url 'set_language' %}" method="post" class="nav-item dropdown">
{% csrf_token %}
<input name="next" type="hidden" value="{{ redirect_to }}">
Expand Down Expand Up @@ -111,7 +109,7 @@

{% if user.is_authenticated %}
<div class="menu-user">
<a href="{% url 'profile' %}">
<a href="{% url 'profile' %}" class="hidden-link">
<div class="user-info">
<div class="user-avatar">{{ user.username|first|upper }}</div>
<div class="user-details">
Expand Down
78 changes: 28 additions & 50 deletions Templates/home/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@
</select>
</div>

<div class="platform-filter">
<label for="platform">{% trans "Platform" %}:</label>
<select name="platform" id="platform">
<option value="">{% trans "All" %}</option>
{% for p in platforms %}
<option value="{{ p.port }}" {% if request.GET.platform == p.port|stringformat:"s" %}selected{% endif %}>
{{ p }}
</option>
{% endfor %}
</select>
</div>

<div class="filter-buttons">
<button type="submit">{% trans "Filter / Search" %}</button>
<a href="{% url 'home' %}" class="clear-filters">{% trans "Clear filters" %}</a>
Expand All @@ -64,60 +76,26 @@
</div>
{% endblock %}
{% block content %}
<div class="container">
<div class="container home-container">
<div class="row">
<div class="col-md-12">
<div class="home-container">
<div class="home-container-left">
<div class="filter-container">

</div>

<h2 class="results-title">{% trans "Results" %}: {{ search_query }}</h2>

<div class="movie-grid">
{% for item in items %}
{% include 'part/card.html' with item=item %}
{% empty %}
<p class="no-results">
{% trans "No content found matching those filters." %}
</p>
{% endfor %}
</div>

<div class="pagination-container">
<nav class="pagination-nav">
{% if items.has_previous %}
<a href="?page=1{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}" class="pagination-btn icon-btn" title="{% trans 'primera' %}">
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><polyline points="11 17 6 12 11 7"></polyline><polyline points="18 17 13 12 18 7"></polyline></svg>
</a>
<a href="?page={{ items.previous_page_number }}{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}" class="pagination-btn" title="{% trans 'anterior' %}">
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><polyline points="15 18 9 12 15 6"></polyline></svg>
<span class="btn-text">{% trans "anterior" %}</span>
</a>
{% endif %}

<div class="pagination-info">
<span class="current-label">{% trans "Pàgina" %}</span>
<span class="current-page">{{ items.number }}</span>
<span class="divider">{% trans "de" %}</span>
<span class="total-pages">{{ items.paginator.num_pages }}</span>
</div>
<div class="col-12 home-container-left">
<div class="filter-container">

</div>

{% if items.has_next %}
<a href="?page={{ items.next_page_number }}{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}" class="pagination-btn" title="{% trans 'següent' %}">
<span class="btn-text">{% trans "següent" %}</span>
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><polyline points="9 18 15 12 9 6"></polyline></svg>
</a>
<a href="?page={{ items.paginator.num_pages }}{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}" class="pagination-btn icon-btn" title="{% trans 'última' %}">
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline></svg>
</a>
{% endif %}
</nav>
</div>
<h2 class="results-title">{% trans "Results" %}: {{ search_query }}</h2>

</div>
<div class="movie-grid">
{% for item in items %}
{% include 'part/card.html' with item=item %}
{% empty %}
<p class="no-results">
{% trans "No content found matching those filters." %}
</p>
{% endfor %}
</div>

{% include 'home/home_parts/paginator.html' with items=items %}
</div>
</div>
</div>
Expand Down
32 changes: 32 additions & 0 deletions Templates/home/home_parts/paginator.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{% load i18n %}

<div class="pagination-container">
<nav class="pagination-nav">
{% if items.has_previous %}
<a href="?page=1{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}" class="pagination-btn icon-btn" title="{% trans 'primera' %}">
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><polyline points="11 17 6 12 11 7"></polyline><polyline points="18 17 13 12 18 7"></polyline></svg>
</a>
<a href="?page={{ items.previous_page_number }}{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}" class="pagination-btn" title="{% trans 'anterior' %}">
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><polyline points="15 18 9 12 15 6"></polyline></svg>
<span class="btn-text">{% trans "anterior" %}</span>
</a>
{% endif %}

<div class="pagination-info">
<span class="current-label">{% trans "Pàgina" %}</span>
<span class="current-page">{{ items.number }}</span>
<span class="divider">{% trans "de" %}</span>
<span class="total-pages">{{ items.paginator.num_pages }}</span>
</div>

{% if items.has_next %}
<a href="?page={{ items.next_page_number }}{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}" class="pagination-btn" title="{% trans 'següent' %}">
<span class="btn-text">{% trans "següent" %}</span>
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><polyline points="9 18 15 12 9 6"></polyline></svg>
</a>
<a href="?page={{ items.paginator.num_pages }}{% for key, value in request.GET.items %}{% if key != 'page' %}&{{ key }}={{ value }}{% endif %}{% endfor %}" class="pagination-btn icon-btn" title="{% trans 'última' %}">
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><polyline points="13 17 18 12 13 7"></polyline><polyline points="6 17 11 12 6 7"></polyline></svg>
</a>
{% endif %}
</nav>
</div>
11 changes: 11 additions & 0 deletions Templates/part/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,16 @@ <h3 class="movie-title">{{ item.title }}</h3>
{% if item.synopsis %}
<p class="movie-synopsis">{{ item.synopsis|truncatewords:20 }}</p>
{% endif %}

{% if item.available_platforms %}
<div class="card-platforms">
<span class="platforms-label">{% trans "Available on" %}:</span>
<div class="platforms-list">
{% for platform in item.available_platforms %}
<span class="platform-badge">{{ platform.name|default:platform.port }}</span>
{% endfor %}
</div>
</div>
{% endif %}
</div>
</div>
12 changes: 12 additions & 0 deletions histogram.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import calendar
from decouple import config
import requests
Expand All @@ -18,6 +18,10 @@

# ── Fetch con paginación ───────────────────────────────────────────────────────
def fetch_all_issues(owner: str, repo: str) -> list[dict]:
"""
Fetches all issues from the specified GitHub repository using pagination
to ensure no data is left behind during the request process.
"""
issues, page = [], 1
while True:
resp = requests.get(
Expand All @@ -35,6 +39,10 @@

# ── Parseo de fechas ───────────────────────────────────────────────────────────
def parse_dates(issues: list[dict]) -> list[tuple[datetime, datetime | None]]:
"""
Parses the creation and closure timestamps from the GitHub API payload
into standard Python datetime objects for further analysis.
"""
result = []
for issue in issues:
created = datetime.strptime(issue["created_at"], "%Y-%m-%dT%H:%M:%SZ")
Expand Down Expand Up @@ -76,6 +84,10 @@

# ── Main ───────────────────────────────────────────────────────────────────────
def main():
"""
Generates a bar chart using matplotlib to visually represent the total
number of open issues distributed across the calculated weeks.
"""
print("Obteniendo issues de GitHub…")
issues = fetch_all_issues(OWNER, REPO_NAME)
issue_dates = parse_dates(issues)
Expand Down
Binary file modified locale/ca/LC_MESSAGES/django.mo
Binary file not shown.
13 changes: 12 additions & 1 deletion locale/ca/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ msgstr "Director"
msgid "Age Rating"
msgstr "Classificació"

#: Templates/home/home.html:57
msgid "Platform"
msgstr "Plataforma"

#: Templates/home/home.html:58
msgid "Filter / Search"
msgstr "Filtrar / Cercar"
Expand All @@ -258,7 +262,14 @@ msgstr "Resultats"
msgid "N/A"
msgstr "N/A"

#: Templates/home/home.html:103
#: Templates/home/home.html:82
msgid "No content found matching those filters."
msgstr "No s'ha trobat cap contingut amb aquests filtres."

#: Templates/part/card.html
msgid "Available on"
msgstr "Disponible a"

msgid "No movies found matching those filters."
msgstr "No s'han trobat pel·lícules amb aquests filtres."

Expand Down
Binary file modified locale/en/LC_MESSAGES/django.mo
Binary file not shown.
13 changes: 12 additions & 1 deletion locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ msgstr "Director"
msgid "Age Rating"
msgstr "Age Rating"

#: Templates/home/home.html:57
msgid "Platform"
msgstr "Platform"

#: Templates/home/home.html:58
msgid "Filter / Search"
msgstr "Filter / Search"
Expand All @@ -257,7 +261,14 @@ msgstr "Results"
msgid "N/A"
msgstr "N/A"

#: Templates/home/home.html:103
#: Templates/home/home.html:82
msgid "No content found matching those filters."
msgstr "No content found matching those filters."

#: Templates/part/card.html
msgid "Available on"
msgstr "Available on"

msgid "No movies found matching those filters."
msgstr "No movies found matching those filters."

Expand Down
Binary file modified locale/es/LC_MESSAGES/django.mo
Binary file not shown.
Loading
Loading