Skip to content

Commit

Permalink
Lark parser (#12)
Browse files Browse the repository at this point in the history
* Adding lark as a parser engine

* Adding updated output file for to GooFit

* Fixing data import

* Moving from_AmpGen to from_text, main script added for particle

* Better testing, expanding items allowed in from_string

* Adding more parts for decfiles

* Fixing a warning

* Adding some tests, breaking out ampgen style and dec style particles.
  • Loading branch information
henryiii committed Jan 17, 2019
1 parent 1aa672f commit 3b0588a
Show file tree
Hide file tree
Showing 37 changed files with 28,903 additions and 351 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ include tox.ini .travis.yml .appveyor.yml
recursive-include decaylanguage *.py
recursive-include decaylanguage *.csv
recursive-include decaylanguage *.txt
recursive-include decaylanguage *.lark

recursive-include images *.pdf
recursive-include images *.png
Expand Down
11 changes: 7 additions & 4 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@ verify_ssl = true
name = "pypi"

[packages]
attrs = ">=17.0"
attrs = ">=17.4"
pandas = ">=0.22"
plumbum = ">=1.6.6"
numpy = ">=1.12"
six = ">=1.11"
pathlib2 = {version = ">=2.3", markers="python_version < '3.5'"}
enum34 = {version = ">=1.1", markers="python_version < '3.4'"}
pathlib2 = {version = ">=2.3",markers = "python_version < '3.5'"}
enum34 = {version = ">=1.1",markers = "python_version < '3.4'"}
lark-parser = ">=0.6.3"

[dev-packages]
graphviz = ">=0.8.2"
pytest = "*"
jupyter = {extras = ["all"]}
sphinx = "*"
sphinx-rtd-theme = "*"
decaylanguage = {path = "."}
jupyterlab = "*"
ipykernel = "*"
decaylanguage = {editable = true,path = "."}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ particle. There are lots of printing choices, `describe()`,
`programmatic_name()`, `html_name()`, html printing outs in notebooks,
and of course `repr` and `str` support.

You can quickly search for particles from the command line with:

```
python -m decaylanguage.particle 311
```

You can put one or more PDG ID numbers here, or string names.

## Decays

The most common way to create a decay chain is to read in an [AmpGen]
Expand Down
2 changes: 1 addition & 1 deletion decaylanguage/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class DecayLanguageDecay(cli.Application):
generator = cli.SwitchAttr(['-G', '--generator'], cli.Set('goofit'))
generator = cli.SwitchAttr(['-G', '--generator'], cli.Set('goofit'), mandatory=True)

def main(self, filename):
if self.generator == 'goofit':
Expand Down
Loading

0 comments on commit 3b0588a

Please sign in to comment.