openzim / openzim/python-libzim

[next-major] Remove traces of CamelCase

Aperta
#200 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

enhancement good first issue
Lingua principale
Python
Stelle
108
Fork
29
Merge medio
9g 1h
PR unite (30g)
1

Descrizione

As libzim uses CamelCase, we sometimes followed the convention to stick to the pure-wrapper way.
Given case is not that important and we don't follow it everywhere (it's become minor overtime), we should just remove the remaining traces and use snake case everywhere.

It's a tiny change but obviously breaks the API so should not be merged until approaching next major release

# writer
    def config_nbworkers(self, nbWorkers: int) -> Self: ...  # noqa: N803
    def set_mainpath(self, mainPath: str) -> Self: ...  # noqa: N803
    def add_redirection(
        self,
        path: str,
        title: str,
        targetPath: str,  # noqa: N803
        hints: dict[Hint, int],
    ) -> None: ...
    def add_alias(
        self,
        path: str,
        title: str,
        targetPath: str,  # noqa: N803
        hints: dict[Hint, int],
    ) -> None: ...
# suggestion
    def getEstimatedMatches(self) -> int: ...  # noqa: N802
# search
    def getEstimatedMatches(self) -> int: ...  # noqa: N802
    def getResults(self, start: int, count: int) -> SearchResultSet: ...  # noqa: N802

Guida per i contributori

Apri la guida per i contributori

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.

Direzione di ricerca

Inizia dalle dichiarazioni del wrapper Python mostrate nell’issue e individua i nomi CamelCase rimanenti nelle API writer, suggestion e search. Rinomina questi metodi e parametri esposti in snake_case, rimuovi le eccezioni di denominazione associate e verifica che i riferimenti e i controlli utilizzino la nuova API prima della prossima release principale.

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

Valutazione

Stack tecnologico
python
Ambito
api
Tipo di issue
Refactoring
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.