Skip to content

Latest commit

 

History

History
78 lines (53 loc) · 2.18 KB

developing.md

File metadata and controls

78 lines (53 loc) · 2.18 KB

Developing csv2rdf itself

These notes cover how to use the tooling to build, test and develop the csv2rdf library and command line app.

Experimental GraalVM builds

These are not yet merged to master; see the graal-native-image PR.

tools.deps and tools.build

csv2rdf is now maintained with the tools.deps and tools.build libraries.

The best workflow is always to use a REPL, exactly how this is done largely depends on your editor environment. However a basic REPL can be started with:

$ clj

or via something like a custom :cider alias in your ~/.clojure/deps.edn

$ clj -M:cider

To run the tests:

$ clojure -T:build test

csv2rdf in addition to its own tests, also includes an extensive test suite generated from the official W3C CSV Working Group test suite. Tests generated by this command will be run by the above command.

To rebuild this suite you can run the command:

clojure -X:gen-test-suite

To build the command line application as an uberjar:

$ clojure -T:build build-app

and to run that app:

$ java -jar target/csv2rdf-app.jar
16:43:56.344 [main] ERROR csv2rdf.main - User metadata or tabular data file required
Usage:
  -t, --tabular TABULAR                    Location of the tabular file
  -u, --user-metadata METADATA             Location of the metadata file
  -o, --output-file OUTPUT                 Output file to write to
  -m, --mode MODE               :standard  CSVW mode to run

Circle CI

Circle CI will run the tests on push for each branch.

Currently CI only builds and deploys the library, releases of the command line app need to be made by hand.

Releases are listed on the github releases page.

Deploying new library jars to clojars

You can do this by tagging a commit with vX.Y.Z, which will trigger the tests to be run by CI; if they then pass a build will pushed to clojars with that version number.

A good workflow for this is to use github releases to coin a new release document the changes, and create that tag. Be sure to prefix your tags with v from now on (as some clojure tooling requires it e.g. cljdocs).