russhyde / code_as_data Goto Github PK
View Code? Open in Web Editor NEWAnalysis of code in R dev packages (for a planned talk)
Analysis of code in R dev packages (for a planned talk)
We currently install cloc
and gitsum
from github and use dupree-v0.2 from conda.
Better to use a commit-stamped version of cloc and gitsum, for reproducibility
Also, I've updated dupree based on some minor bugs identified during writing this project, for example, to check R-package structure within dupree_package
(the dev version of dupree will not be made available on conda)
Therefore,
config.yaml
to include commit-stamps for each repoconfig.yaml::remotes
Since loading the data takes a while, add a notification that closes on completion https://mastering-shiny.org/action-feedback.html#removing-on-completion
Produce shiny app to show commit frequencies, duplication, etc etc.
PLEASE!
Use snakemake at the top level
[Comparison of the workflow management tools should be a separate job]
See #31 for description of problem
Need to copy ./renv and ./.Rprofile into the working directory for every process that uses R scripts.
Have added a bash script to:
But I'd normally use snakemake to control running the scripts and my own tools to check the environment / workspace before running a project
Would like to compare
Modifications required before this is possible:
config.R
conf/config.yaml
)Anticipated pain-points:
Therefore need a different subjob for each workflow manager, with
TODO:
If I have a snakemake workflow that:
Then the next time I run snakemake, the dupree step will run again (despite the files that are analysed by dupree not having been modified)
Reason:
Suggest:
ancient()
All-package analyses:
Single-package analyses:
Niceties:
Download counts can be obtained using https://github.com/r-hub/cranlogs
See the "PREVIOUS 1 2 3 4 NEXT" buttons on the tables in "Analysed Packages" and "Cross-Package Analysis"
Environment reproducibility:
Data reproducibility:
? Ensure URLs are commit-stamped
? Can the CRAN database be versioned
? Before running analyses on the packages, checkout a time-stamped commit (eg, use git rev-list: https://stackoverflow.com/questions/6990484/how-to-checkout-in-git-by-date)
Since we now use 'venv' instead of conda to manage python dependencies
Plan for newcastle satrdays abstract:
Code analysis tools:
How to combine all these things together, similar to the code-maat thing
Probably need to work on the visual representation of projects
Try using r package {targets} for workflow management.
targets is a spin off from drake, which we didn't end up using.
Assume the existence of a coordinator (be it a bash script, makefile or some other workflow-manager; currently this would be run_me.sh
)
Each script should:
--input
<interpreter> <script_name> [options] --input_files <some_file>
where the latter file defines all file-paths that are to be combined together<interpreter> <script_name> [options] input1 input2 input3 ...
They are currently saved as full paths
.. so that we don't end up in unupdatable environment hell (note, I tried to install r-pkgnet with a triumphant failure prior to edinbr talk)
Describe the architeture of the project
./lib/code.as.data
utils.R
to {code.as.data}
{code.as.data}
is built and installed before running the analysis scripts
R CMD build
etc to run_me.sh
, or add asetup.sh
scriptAnalysis of the rscala repo identified a problem (similar to that for r-logging)
rscala repo structure looks like this:
<root>
- R
- rscala [the actual package]
- R
- inst
- tests
- ... <rest of the actual R package>
- benchmarks
- bin
- ...
So the R-package is not at the root of the repo structure.
In r-logging, the R package was similarly nested, but it did not have an R
directory at the top-level, so it was simple to tell that the whole repo did not have a typical R package structure
Suggest either:
config.yaml::drop
)The first alternative seems easiest to explain in a presentation, quickest to implement, and less open to subsequent failures.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.