Skip to content

Instantly share code, notes, and snippets.

@sckott
Last active March 18, 2016 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sckott/168146a8e5b1da9af03a to your computer and use it in GitHub Desktop.
Save sckott/168146a8e5b1da9af03a to your computer and use it in GitHub Desktop.

CKAN versions

I mostly keep ckanr up to date with current CKAN development. However, each CKAN instance can be on a different veresion of CKAN software. Working on making ckanr more backwards compatible in this issue. To know what I'm up against, I wanted to check what versions are running out there, and how many of each to know where to focus effort.

Added a new function ckan_version to get just version info. Reinstall from github:

install

devtools::install_github("ropensci/ckanr")
library("ckanr")

check versions, and clean

then get versions, with tryCatch for those that are down

out <- lapply(servers(), function(z) tryCatch(ckan_version(z), error = function(e) e))
vers <- vapply(Filter(function(z) !inherits(z, "error"), out), "[[", 1, "version_num")
vers <- Filter(Negate(is.na), vers)
vers <- vapply(vers, function(z) if (nchar(z) == 2) z*10 else z, 1)

plot

library("ggplot2")
df <- data.frame(table(vers))
ggplot(df, aes(vers, Freq)) + 
  geom_bar(stat = "identity") + 
  annotate("text", x = 22, y = 23, 
           label = paste0("N (instances) = ", length(out)), size = 5) + 
  labs(x = "CKAN version") + 
  theme_grey(base_size = 16) + 
  theme(axis.text.x = element_text(angle = 90, hjust = 1))

plot of chunk unnamed-chunk-6

the x-axis labels: a version of 210 is 2.1.0

Yikes, that's a lot of different versions.

@amercader
Copy link

@sckott Really useful stuff! What dataset of instances did you use? It's http://ckan.org/instances? That might be a bit outdated.
It's a bit depressing from a maintainer perpsective as we always encourage to run the latest version or at the very least the last patch release, so I'm really curious to learn why the spike on 2.2.0.

One thing to note when planning different versions support is that there are no API changes between patch versions, eg between 2.3.1 and 2.3.3.

@sckott
Copy link
Author

sckott commented Mar 18, 2016

Yes, used instances from http://ckan.org/instances - I imagine it might be outdated, but I didn't know another way to get a comprehensive list of instances. Do you?

One thing to note when planning different versions support is that there are no API changes between patch versions, eg between 2.3.1 and 2.3.3.

great, thanks, good to know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment