Includes PyStan 2.16?

Operating System: OS X 10.12.5
Python Version: 2.7
Interface Version: 2.16.0

Has anyone had any success in getting the include mechanism to work with PyStan 2.16.0? There’s no doc about how to configure the search paths and it doesn’t seem to look at the present working directory be default.

Not sure about the directory thing. But it only works in R if the #include statement is flush left and has nothing to the right of the filename, not even whitespace.

I added issue to PyStan, but this is probably problem with Stan.

I did try the following

  • #include baz.stan
  • ... "baz.stan"
  • fullpath to include file.

These did not work. Maybe error could print also the directories it’s looking and the filename.

If #include ... is really this fragile this should be addressed in Stan, not the interfaces.

That said, whitespace in filenames is a horrible problem. Not sure what to do there. Maybe require the filename to be quoted? Allowing leading spaces before the # seems like less of a problem. We should allow that.

Currently, the filename is not allowed to be quoted. I am pretty sure if the filename has internal spaces, it would not work. But I was surprised that having whitespace (or a comment) after a filename without internal spaces, it also does not work.

If there are problems there, please create issues.

Adding any of the following would be straightforward:

  • a quote mechanism
  • more error messages would be straightforward
  • default to searching from the root of the file system if there’s no paths argument

As is, the compiler is expecting a collection of paths and I believe it defaults to the empty collection (disallowing includes altogether).