Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Replace the metadata check in test_boilerplate_removed.py #144

Open
coretl opened this issue Jun 27, 2023 · 1 comment
Open

Replace the metadata check in test_boilerplate_removed.py #144

coretl opened this issue Jun 27, 2023 · 1 comment
Assignees

Comments

@coretl
Copy link
Contributor

coretl commented Jun 27, 2023

This line is problematic:

summary = metadata("python3-pip-skeleton")["summary"]

First of all it needs the name of the module, which created DiamondLightSource/python3-pip-skeleton-cli#85, also it needs you to reinstall after fixing the issue in editable mode, which will trip people up. I suggest we go back to the less robust but simpler approach of:

def test_module_summary():
    assert_not_contains_text(
        "pyproject.toml",
        "One line description of your module",
        "so [project] description is a one line description of your module",
    )

@garryod thoughts?

@garryod
Copy link
Member

garryod commented Jun 27, 2023

I strongly favour the use of setuptools.metadata here as it decouples us from the package metadata source and is the recommended way of accessing such data.

  1. I'm not convinced needing the name of the module is a big deal, this must be substituted in several other places already, though perhaps I am missing some reason which makes it more problematic than the others. If we want to resolve this we should look into more robust templating methods - I willl note that there is now support for template repositories in the developer portal.
  2. This is not ideal, and from the looks of it is an almost unsolvable problem due to implementation of editable installs. A reasonable workaround may be to add "you must re-install the package for this change to be detected" - or likewise - to the error message

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants