Skip to content

--convert should support Python generators #16

@simonw

Description

@simonw

I tried this against https://github.com/simonw/package-stats and it didn't work:

git-history file stats.db stats.json --convert '
data = json.loads(content)
for key, counts in data.items():
    for date, count in counts.items():
        yield {
            "package": key,
            "date": date,
            "count": count
        }
' --id package --id date

It looked like it worked - the progress bar ran to completion - but the resulting database only had a commits table.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions