SeattleTestbed / repy_v1

Seattle Testbed's original Repy version 1 sandbox
MIT License
1 stars 4 forks source link

Unit Test - ut_bundle*: "bundle.repy does not exist" #131

Closed choksi81 closed 10 years ago

choksi81 commented 10 years ago

Some of the ut_bundle* tests call the bundler.py script. bundler.py looks for bundle.repy which is not among the files fetched with preparetest.py. But there is a bundle.py file. Potential fix in bundler.py:

- repyhelper.translate_and_import('bundle.repy')
+ repyhelper.translate_and_import('bundle.py')
choksi81 commented 10 years ago

Author: justinc I think this is an issue that Leonard should know the most about...

Leonard: Redirect the ticket if I'm wrong about this.

choksi81 commented 10 years ago

Author: leonwlaw Hm... That's weird. Looking at preparetest reveals that all .mix files are preprocessed into .py files. The problem with just importing the .py file is that these are still repy files, so they shouldn't be treated as normal python source files, as it may bring up confusion when users decide to use the bundler in their experiments.

An alternative would be to manually prepare a .repy file and check that into SVN to where bundle.mix currently is.

choksi81 commented 10 years ago

Author: albert Leon, did these unit tests ever work in your setup? Did you try to run them in a clean preparetested environment other than your main development directory?

choksi81 commented 10 years ago

Author: justinc Replying to leonwlaw:

Hm... That's weird. Looking at preparetest reveals that all .mix files are preprocessed into .py files. The problem with just importing the .py file is that these are still repy files, so they shouldn't be treated as normal python source files, as it may bring up confusion when users decide to use the bundler in their experiments.

An alternative would be to manually prepare a .repy file and check that into SVN to where bundle.mix currently is.

To me, the file looks like repy code. Why did you give it a .mix extension? Why does it need to be preprocessed?

choksi81 commented 10 years ago

Author: leonwlaw @albert: I thought I had, I guess I was wrong.

@justin: I thought that the intention for .mix files were to generate .repy files, since importing cannot be done on vessels. In addition, having .mix files would mean that the latest .repy files would be built on every preparetest, with the latest versions of all dependencies. My logic was, if I had put a .repy file, then any updates to serialize.repy and rsa.repy wouldn't propagate to bundle.repy. The preprocessing step would integrate any updates to those files automatically without developers having to step in and manually update the repy files.

If this is false, we should probably fix the [wiki:SeattleLib/repypp.py] page:

Files needed preprocessing should have a *.mix extension, and processed files should have a *.repy extension. Note "include" must be the first character on the line. (no indentation allowed!).
choksi81 commented 10 years ago

Author: leonwlaw Fixed with r6479.