dev-cafe / parselglossy

Generic input parsing library, speaking in tongues.
https://parselglossy.readthedocs.io
MIT License
7 stars 2 forks source link

Use parselglossy to generate parser and documentation #84

Closed robertodr closed 4 years ago

robertodr commented 4 years ago

As discussed at length since the first few releases, I'd like parselglossy to become a generator for parser and documentation. High-level usage:

parselglossy generate template.yml

output:

parser/
├── __init__.py
├── grammar.py
├── parser.py
├── README.md
├── cli.py
├── documentation.rst
└── pyparsing.py

Main goal is to have zero dependencies for final users. The CLI is generated with Argparse, while pyparsing is shipped with the generated files. This protects template.yml and the grammar from accidental tampering.

codecov[bot] commented 4 years ago

Codecov Report

Merging #84 into master will decrease coverage by 1.08%. The diff coverage is 90.69%.

bast commented 4 years ago

I understand this is a draft pull request?

+1 for the suggestion to make parselglossy a generator.

robertodr commented 4 years ago

Yep. It's a draft. I just forgot to mark it as such.

bast commented 4 years ago

As to CLI I would find this (--target or --output, --from/--input):

$ parselglossy generate --target /my/path --from template.yml

more intuitive than this (we are not generating template.yml):

$ parselglossy generate template.yml
robertodr commented 4 years ago

Agreed on the CLI. Will do that in the next few commits.

robertodr commented 4 years ago

All pieces are in place and tested. It need to be documented, but the code is ready for review.

robertodr commented 4 years ago

It's now documented :confetti_ball: Please squash-merge. The commit messages are really bad :)

bast commented 4 years ago

I thought I could force-merge but this is disabled. Should we take out macOS builds, open an issue on that, continue work, and reintroduce them before we "release"?

robertodr commented 4 years ago

Agreed.

On Mon, Jul 6, 2020 at 9:28 AM Radovan Bast notifications@github.com wrote:

I thought I could force-merge but this is disabled. Should we take out macOS builds, open an issue on that, continue work, and reintroduce them before we "release"?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dev-cafe/parselglossy/pull/84#issuecomment-654064755, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4JOEIXAOJRPHXU5VH57CDR2F4I5ANCNFSM4J66VDNA .

-- Roberto Di Remigio

bast commented 4 years ago

OK I will take care of that.

robertodr commented 4 years ago

They're still reported as "expected" in the checks because the main branch has them in...

robertodr commented 4 years ago

OK, now green :)

robertodr commented 4 years ago

Maybe you can try minting a new tag and seeing whether the deploy action actually works? I even wrote instructions on how to do it! https://parselglossy.readthedocs.io/en/latest/contributing.html#deploying

bast commented 4 years ago

Still stalling on the builds. I will check whether I can give myself temporarily more merging power to get this in. The deploy action can be tested without creating tags, somehow I don't like to create tags just for testing.

bast commented 4 years ago

Now it's green also on my side. Weird, some leftover. Merging.