Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

classpath issue with zipfile in resources folder #371

Open
robinkraft opened this issue Apr 28, 2013 · 0 comments
Open

classpath issue with zipfile in resources folder #371

robinkraft opened this issue Apr 28, 2013 · 0 comments
Labels

Comments

@robinkraft
Copy link
Contributor

Recent changes to the forma.source.gadmiso namespace give us access to all of the GADM v.2 administrative codes in a single zipfile. When the namespace is compiled, the zipfile is decompressed to a temp folder in /tmp/gadm2/<uuid>, and the codes are extracted from the resulting csv file and converted into a map for use with the gadm2->iso function.

Unfortunately, when that namespace is accessed from another project (e.g. empirical-paper), the zipfile cannot be accessed for decompression:

ZipException zip file does not exist  net.lingala.zip4j.core.ZipFile.readZipInfo (ZipFile.java:407)

The reason we use a zipfile is because the textfile of gadm2 codes is 6.4mb - kind of annoying to have floating around the repo. But a regular textfile sitting in the repo seems to be ok - the admin-map.csv file used to convert gadm v.1 codes into iso codes doesn't have this problem.

So, while the FORMA project works fine as is, it's definitely lame that referencing the forma.source.gadmiso namespace from another project causes this error.

I see three possible solutions:

  1. Pull the gadmiso namespace out of the project into a new library. Store the gadm files as text, and don't worry about the filesize issue that motivated using the zipfile in the first place. The gadm codes could conceivably be useful to someone else, and they shouldn't need forma-clj as a dependency.
  2. Switch to a textfile in the forma-clj repo. The repo is already huge, but what's another 6.4mb?
  3. Figure out why the zipfile can't be found and fix that.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant