relative paths in production runner

Discussions about tools to complement CSPro data processing
Post Reply
AriSilva
Posts: 601
Joined: July 22nd, 2016, 3:55 pm

relative paths in production runner

Post by AriSilva »

Hi folks,
I know that this might not be one of your priorities, but it would help me a lot if the filenames in pffrunner were using relative paths instead of absolute paths.
My problem is that we have a team of developers using the same file structures, but using diferent main directories, and using the github for storing the versions.
This works fine for all the cspro´s programs/tools, but not for pffrunner.
Best
Ari
Best
Ari
savy
Posts: 163
Joined: December 27th, 2012, 1:36 pm

Re: relative paths in production runner

Post by savy »

We will fix this in CSPro 8.0.
AriSilva
Posts: 601
Joined: July 22nd, 2016, 3:55 pm

Re: relative paths in production runner

Post by AriSilva »

Sorry to insist on that, but I did not see relative positioning in the Production runner, or, better, I tried with use it but it did not work.
Best
Ari
Best
Ari
aaronw
Posts: 566
Joined: June 9th, 2016, 9:38 am
Location: Washington, DC

Re: relative paths in production runner

Post by aaronw »

You can open the pffRunner file in a text editor and make the paths relative.
pffrunner.PNG
pffrunner.PNG (5.56 KiB) Viewed 70 times
Gregory Martin
Posts: 1801
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: relative paths in production runner

Post by Gregory Martin »

I haven't used the Production Runner in many years, but when I created it, it was supposed to work with relative or absolute paths. When it looks for a file, the algorithm:

1) Checks if the file exists as an absolute path. If so, it uses it.

2) If not, it calculates a relative path based on the filename and the absolute path under the [PathReference] node. This path is then adjusted based on the current location of the .pffRunner file and the tool tries to open that adjusted file path.

In my testing (years ago), it seemed to work. If you can share an example that doesn't work, I can try to fix it.
AriSilva
Posts: 601
Joined: July 22nd, 2016, 3:55 pm

Re: relative paths in production runner

Post by AriSilva »

Thanks for reminding me this trick of path conversion.
And, by the way, the Path Adjuster is very helpful, it saves me a lot of time and brains trying to look at the directory files tree to "calculate" the numbers of ..\ I have to use.
Yes, the relative path works, but it is not straighforward, nor documented, nor stated anywhere else that you have to do it by hand using a text editor. All the other tools/application/files in CsPro do that automatically, writing directly the file´s relaltive path.
Best
Ari
Post Reply