Links
AI / Agents
gdtest-name-mismatch
Project name and module name are different.
Project name is ‘gdtest-name-mismatch’ but the module is ‘gdtest_nm’ (completely different). Config sets module: gdtest_nm. The site title should use the project name. The Reference page should show exports from gdtest_nm: Mapper (class) and transform (function). The key test: config-driven module name override.
Source files
gdtest_nm/
__init__.py
"""A package with a mismatched project/module name."""
__version__ = "0.1.0"
__all__ = ["transform", "Mapper"]
def transform(data: list, func: object = None) -> list:
"""
Transform data using a function.
Parameters
----------
data
The data to transform.
func
Optional transformation function.
Returns
-------
list
Transformed data.
"""
if func is None:
return data
return [func(item) for item in data]
class Mapper:
"""
A data mapper.
Parameters
----------
mapping
A dictionary mapping keys to values.
"""
def __init__(self, mapping: dict):
self.mapping = mapping
def apply(self, key: str) -> object:
"""
Look up a key in the mapping.
Parameters
----------
key
The key to look up.
Returns
-------
object
The mapped value.
"""
return self.mapping.get(key)
def keys(self) -> list:
"""
Get all keys.
Returns
-------
list
All mapping keys.
"""
return list(self.mapping.keys())README.md
# gdtest-name-mismatch Project name and module name are different.
great-docs.yml
module: gdtest_nm