I have an idea of refactoring the reference creator code. There is going to
one create_reference_dbs.py that needs an argument "inpro" or "physor" to
create respective dbs. Is it ok?


On Sat, Dec 14, 2013 at 2:30 PM, Anthony Scopatz
<notifications@github.com>wrote:

> In tests/create_physor_references.py:
>
> > +
> > +        # Create cyclus and cycamore repositories in the current directory
> > +        get_repo("cyclus", cyclus_version, cwd)
> > +        get_repo("cycamore", cycamore_version, cwd)
> > +        cyclus_path = cwd + "/cyclus"
> > +        cycamore_path = cwd + "/cycamore"
> > +        dirs_to_clean.append(cyclus_path)
> > +        dirs_to_clean.append(cycamore_path)
> > +
> > +        # Install cyclus and cycamore
> > +        install_project(cyclus_path, install_path)
> > +        install_project(cycamore_path, install_path)
> > +        cyclus = install_path + "/bin/cyclus" # cyclus executable
> > +
> > +        # Run physor cases
> > +        run_physor(cyclus, cwd)
>
> This is just a style thing, but try blocks should be small. I'd recommend
> moving this block to a function called something like main_body() and
> then the try would looks like.
>
> try:
>     main_body()finally:
>     ...
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/cyclus/cycamore/pull/159/files#r8352900>
> .
>