SACGF / SACGF/variantgrid

Check/remove dead urls

Open
#1,475 2 comments 0 reactions 2 assignees Claimed by @davmlaw View on GitHub
Security
Dominant language
Python
Stars
30
Forks
3
Avg merge
9h 28m
Merged PRs (30d)
42

Description

**These need to be audited for use by external APIs**, or whether they are used in indirect ways not detected from the scan (collectstatic_js_reverse or concatenating urls etc). Will allocate work and maybe break out into individual issues in triage meeting

Then probably remove them and run a full web testing suite before merging branches

# Dead URLs Report

URLs defined in `urls.py` files but not referenced in any:
- Django templates (`{% url 'name' %}`)
- JavaScript (`Urls.name` via collectstatic_js_reverse)
- Python (`reverse('name')` or `redirect('name')`)
- Python model `get_absolute_url()` methods

Note: Third-party app URLs (registration, tc_, messages_, password_*, oidc_*, django-admindocs-*) are excluded.

---

## Explicitly Deprecated

These are named `_deprecated` but still exist as URL patterns — can be removed.

| URL name | Module | File |
|---|---|---|
| `discordance_report_deprecated` | classification | `classification/urls.py` |
| `discordance_export_deprecated` | classification | `classification/urls.py` |

---

## Deprecated API Versions

Old versioned API endpoints with no known callers.

| URL name | Module | Notes |
|---|---|---|
| `classification_api_2` | classification | superseded by v3 |
| `classification_with_record_api_2` | classification | superseded by v3 |
| `classification_api_3` | classification | no references found |
| `classification_with_record_api_3` | classification | no references found |

---

## Referenced via Hardcoded URL Path (Not via `Urls.` or `{% url %}`)

These URLs ARE used in JavaScript but via hardcoded string paths rather than the `Urls.` mechanism. This means URL name changes would not break JS, but path changes would.

| URL name | Used in | Hardcoded path |
|---|---|---|
| `flags_api` | `variantgrid/static_files/default_static/js/flags.js:1115` | `/flags/api/flags/` |
| `flag_api` | `variantgrid/static_files/default_static/js/flags.js:1116` | `/flags/api/flag/` |

---

## Unreferenced Page / View URLs

These are regular page views or utility endpoints with no links from templates, JS, or Python.

### classification
| URL name | Notes |
|---|---|
| `classification_groupings` | List page at `/classification/groupings`; menu uses `allele_groupings` instead |
| `classification_dashboard_all` | Dashboard view variant; main dashboard is `classification_dashboard` |
| `evidence_keys_max_share_level` | API endpoint returning max share level |

### genes
| URL name | Notes |
|---|---|
| `view_gene_symbol_classifications` | Gene symbol classifications page — `view_gene_symbol_classifications_download` IS referenced but not the page itself |

### ontology
| URL name | Notes |
|---|---|
| `ontology_term_autocomplete` | Autocomplete; `hpo_autocomplete`, `omim_autocomplete` etc. are used instead |

### seqauto
| URL name | Notes |
|---|---|
| `software_pipeline` | Software pipeline view |
| `seqauto_apis` | Applied to `include(router.urls)` — unusual `name=` on an include() |

### variantopedia
| URL name | Notes |
|---|---|
| `allele_classifications_download` | Download endpoint for allele classifications |

---

## Summary

| Category | Count |
|---|---|
| Explicitly deprecated | 2 |
| Deprecated API versions | 4 |
| External REST (verify before removing) | 3 |
| Hardcoded URL path in JS | 2 |
| Unreferenced page/utility views | 15 |
| **Total** | **26** |

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.