openzim / openzim/python-libzim
[next-major] Remove traces of CamelCase
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 108
- Forks
- 29
- Avg merge
- 9d 1h
- Merged PRs (30d)
- 1
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start from the Python wrapper declarations shown in the issue and locate the remaining CamelCase names in the writer, suggestion, and search APIs. Rename those exposed methods and parameters to snake_case, remove the associated naming exceptions, and verify that references and checks use the new API before the next major release.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100