stencila/dockta

PythonParser: should parse Pipfiles

nokome opened this issue · 5 comments

The PythonParser should be able to parse Pipfiles https://github.com/pypa/pipfile

... or Pipfile.lock if it exists. There's a JS TOML parser (the Pipfile format) and Pipfile.lock is just JSON so, this shouldn't be too difficult.

Just to clarify, what is the purpose of parsing the file? It could be treated as a black box for the purposes of just installing the dependencies, as it can be passed directly to pipenv.

@giorgiosironi : yes, that's a good question. The only reason that we do it is so we can generate a meta-data tree (environ.jsonld) containing information on the project's dependencies. From that you could generate a software citation list for your project or publish a more structured, semantic, and language agnostic representation of your project and it's dependencies.

Also consider supporting pyproject.toml (or poetry.lock), see PEP 518 and Poetry

Thanks @remram44 👋. Yep agreed, that would be good to add.