ropenscilabs / qcoder

Lightweight package to do qualitative coding
https://docs.ropensci.org/qcoder
GNU General Public License v3.0
130 stars 34 forks source link

Allow access to a data other directories on Windows. #206

Open Rory-OG opened 3 years ago

Rory-OG commented 3 years ago

It seems when attempting to select folder, the prompt opens into my user/Documents folder. We need functionality in the Shiny app that will allow us to navigate one's C:/drive more using either the system prompt or doing so within the shiny directory prompt.

elinw commented 3 years ago

So the idea has always been that you should be able to go anywhere including a url and using the functions instead of the app you can. We could attempt to force it not to use the default but I think that's probably a specific WIndows issue. If you feel like modifying it you could probably change the defaults in your own copy. What folder are you launching the app from? What about launching from c:\?

elinw commented 3 years ago

On my mac I'm able to see the whole hard disk when I go to pick a folder and I have the option to select different volvumes (although I don't have any).

elinw commented 3 years ago

Okay from the other issue this is because your HOME variable is set to that. I think what we could potentially try to implement is to get some other base folder.

elinw commented 3 years ago

What do you think about optionally being able to supply a root data directory? so something like qcode(root = "c:\") ... the problem I see is that then we still need to know where to locate the files for the project and I'm assuming that you wouldn't want to do that in the same place.

elinw commented 3 years ago

@Rory-OG Did you have thoughts on this?

Rory-OG commented 3 years ago

Hi Elin, I think the root parameter you suggested in the post from a week ago would do the trick. Sorry it took me so long to get back to you. I was not on top of the email I have tied to github.

Rory-OG commented 3 years ago

I could see a function for getwd() being supplied as a way to get the working directory when starting qcoder through an R project. This would streamline the init process when trying to work with qcoder within an R project.

Rory-OG commented 3 years ago

the problem I see is that then we still need to know where to locate the files for the project and I'm assuming that you wouldn't want to do that in the same place.

I didn't consider the storage issue. In my work, I've kept a local data folder that is ignored in the .gitignore file in my projects. I don't know that this would be a good recommendation to users though. I am quite new to working on packages so I haven't consider this before. I will look into this and see if I can recommend a different way of conveniently storing data locally in an R project when working with qcoder.

elinw commented 3 years ago

Remember too that projects are an RStudio feature and not everyone uses RStudio. It would make sense to add a function that creates an rstudio project when creating a qcoder project. I think the big issue conceptually is why I ended up with a simple shiny app but then know that there needs to be something more complex. Also maybe we need to save a configuration file that lets you pick the locations of things. Right now everything in the app is hard coded although if you use the CLI functions you can be anywhere.

elinw commented 3 years ago

So I'm going to summarize this as related to #212 in that would want a way to read in data (texts to be coded) from an arbitrary folder that you have permission for and that is not the same folder where you will store your qcode project.