Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Last_run in list_resources view is effectively the first run

Aperta
#392 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Inizia in views.py, nella funzione list_resources, e verifica come first_run, last_run e gli altri valori raccolti vengono utilizzati nella risposta. Correggi il confronto dell'ultima esecuzione e determina quali valori inutilizzati possono essere rimossi; il lavoro è completato quando l'elenco delle risorse segnala l'ultima esecuzione corretta senza compromettere la risposta.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

When trying to come up with a fix for issue #326, I noticed some code in which all kinds of info about resources is gathered in a loop. In this code the first and last runs of all (filtered) resources is determined as well. However, I've noticed that the comparison operator is "less than" in both cased.

See the following code in views.py, function list_resources:

    for resource in response['resources']:
        if resource.run_count > 0:
            # View should work even without Runs
            if first_run is None or resource.first_run < first_run:
                first_run = resource.first_run
            if last_run is None or resource.last_run < last_run:
                last_run = resource.last_run
            response['first_run'] = first_run

I've also noticed that, although first_run and last_run are stored in the response object, they don't appear to be used anywhere. This might also be the case for other variables collected in list_resources and other functions. Cleaning this up should also improve the performance, as reported in issue #326.

Lingua principale
Python
Stelle
92
Fork
76
Merge medio
7h 21m
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di geopython/GeoHealthCheck

Tutte le issue di geopython/GeoHealthCheck

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.