-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R dependencies #1
Comments
Would the R packages, https://lobstr.r-lib.org, https://github.com/TobCap/walkast or https://cran.r-project.org/web/packages/codetools/index.html be a useful way of inspecting ASTs? |
Many thanks, Adam. I haven't looked at R dependencies yet. I would like to focus on Python for the first working version of the script, and then R is next. Let's keep this issue open as a reminder. |
I am very happy to help at any stage as this would help me enormously with writing conda packages for software |
Hi, As of version 0.0.5 the script should now be able to translate Python and R dependencies. At the moment, it scans:
I am skipping I would be grateful if you could give it a go and provide feedback. This is still in the early stages, and the development is slow because I am doing it in my spare time. Another important point to bear in mind is that the translations for both Python and R are not comprehensive and are mainly based in the dependencies used in the CGAT code. It will be a matter of time to keep adding more dependencies to the two Best regards, |
Hi Sebastian, Im currently testing it and its looking really good. I have a few suggestions and will add these to a separate pull request. Currently im writing a lot of rmarkdown for publication into packages and I think that it will definitely help if we have BW, |
Hi Adam (and other interested people), On branch Provided that I only use a regex to look for the patern In the case of .ipynb files it is different. Python has:
The most accurate way IMHO to find both is using Python Abstract Syntax Trees. I could not find a regex that would do the same job properly. That having said, Python Abstract Syntax Trees only work with Python code and therefore the .ipynb files need to be translated to .py before the scan. So far A while ago, I had a look at jupytext as a way of version controlling Jupyter notebooks. Are you aware of it? I am wondering whether we need to move to that so:
Please let me know your thoughts. Best regards, |
My take on this is that supporting ipynb is a really good feature and it would be extremely useful for myself (and im sure others) to support this. While I like jupytext (I haven't yet used it, but I will check it out) and it seems to have features that I will use, Jupiter notebook is the standard and most commonly output. If I generate a pipeline at the moment its still most likely going to be with the Also, if we want other users to use this then I would have thought that supporting .ipynb files is necessary. Please disagree with me though, at the moment I dont have many .ipynb files because im an Rmarkdown fan, so we could leave this feature out at the moment and add it back in if it becomes important? |
Hi, I am working on this on the I have tested it with notebooks in the
Do you know why? Do you have other interesting notebooks to test it with? I found an additional problem with code like the following:
Any suggestions? Best regards, |
I have been testing it one other notebooks and it seems to work well for those. I will have a look into why it isn't working for bamstats today. Just to be clear, with the additional code, is this embedded within the notebook? BW, |
hi @sebastian-luna-valero, I have looked into the issue with the bamstats notebooks and it seems like there is a problem with the encoding of the notebooks. I haven't pinned the issue fully down yet but it seems like there are a few corrupted lines in the notebooks. No idea how they got there and its a pain to debug. Although I think the notebooks may need to be re-written anyway and im going to give it to a student as a coding exercise to fix. I have tested the branch and it all works fine. In relation to the issue you mentioned previously, are you referring to the |
Actually regarding the |
Hi Adam, It looks like you should be using
According to that, I think it is preferable to support On the other hand, regarding my question about Jupyter magics, I have had a look at this: and I think we only need to support I am going to release a new version with these changes. Best regards, |
I agree, library() is preferred. Notebook merge looks really good What was your ultimate aim or goal for this work? Were you thinking on writing a manuscript to release this? What about a manuscript on best practices for developing python software for computational biology or even a conda specific software? |
Thanks, Adam. The only goal is to make dependency management easier. I was doing something along these lines previously with bash scripts but wanted to get it out as an stand-alone tool that could be of broader interest. Hopefully now more people can benefit from it. |
Hi @sebastian-luna-valero this is really useful and a great idea for a repository. I would like to follow a similar strategy for R. Do you have any suggestions or links on best way to implement this?
The bio conductor packages are probably going to be a bit of a nightmare but I think the yaml conversion dict is a good idea.
The text was updated successfully, but these errors were encountered: