At most two positional arguments in the public API; the rest keyword-only
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- backend-api-design
Direzione di ricerca
Start by reading the public APIs named in the issue: metrics, Comparer and ComparerCollection, SkillTable, Quantity, DummyModelResult, and the plotting entry points. Check their existing signatures and call sites to understand the scope of positional argument changes and whether compatibility warnings are needed. Done means the listed APIs enforce the positional argument policy, with the chosen compatibility approach applied consistently.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Public functions should take at most two positional arguments; everything after is keyword-only. scikit-learn does this for its metrics, e.g. mean_squared_error(y_true, y_pred, *, sample_weight=None, ...). A keyword call says what each value means, and a misplaced positional value then fails at the call instead of being used for the wrong thing.
The constructors, match() and from_matched() already do this. These do not:
| function | positional parameters |
|---|---|
metrics.rmse, mae, urmse, cc, c_rmse, c_mae, c_urmse and their long-name aliases |
obs, model, weights (rmse: also unbiased) |
metrics.hit_ratio, lin_slope, peak_ratio/pr |
obs, model, a / reg_method / inter_event_level, AAP, inter_event_time |
metrics.metric (decorator) |
best, has_units, display_name |
Quantity |
name, unit, is_directional |
DummyModelResult |
name, data, strategy; also the only model result where data is not first |
*.trim |
start_time, end_time, buffer, no_overlap |
Comparer.sel, ComparerCollection.sel |
model, (observation, quantity,) start, end, time, area, z |
Comparer.gridded_skill, ComparerCollection.gridded_skill |
bins, binsize, by, metrics, n_min |
ComparerCollection.skill |
by, metrics, observed |
SkillTable.style |
decimals, metrics, cmap, show_best |
Comparer.from_matched_data |
14 parameters |
cmp.plot.kde, residual_hist; cc.plot.residual_hist, spatial_overview, temporal_coverage; SkillArray.plot.grid |
ax, title, figsize, … |
ms.plotting.spatial_overview, taylor_diagram, TaylorPoint |
5–7 each |
skill() deserves keyword-only from the start, even though it has two parameters: cmp.skill("rmse") passes "rmse" as by and fails with KeyError: 'rmse'. The same goes for sel(), where only model is an obvious first argument.
Positional calls past the second argument will break. Either do it in the next major release, or first emit a FutureWarning for one minor release when a positional argument is passed where the keyword will be required.
- Lingua principale
- Python
- Stelle
- 58
- Fork
- 10
- Merge medio
- 28m
- PR unite (30g)
- 1
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di DHI/modelskill
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DHI/modelskill#732 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DHI/modelskill#731 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
DHI/modelskill#728 ·
I maintainer di solito rispondono entro 1 giorno
-
NSE and R2 return 1.0 when model values are NaNForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DHI/modelskill#720 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
DHI/modelskill#628 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di DHI/modelskill
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Arekkazu/sgpmp-backend#744 ·
I maintainer di solito rispondono entro 1 giorno
-
Review backlog (security): master-branch remote guard trusts unbound provenance package fieldApertaagent/reviewer
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
projectbluefin/utah-packages#634 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue help wanted
Difficoltà 2/5 1-2 giorni Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
home-assistant/core#188613 ·
I maintainer di solito rispondono entro 1 giorno
-
WebsiteApertagood first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 91/100
TanbirRamim/open-source-radar#314 ·
I maintainer di solito rispondono entro 1 giorno