Briefly discussed in passing with @daslu during last weeks session: it may be a good idea to mimick scicloj/tablecloth's namespace organization. The point being that we hide the implementation and expose only the API that we want.
Tablecloth does this by:
Putting the implementation files in a directory called api. Within the directory functions are organized sensibly by areas of operation, e.g. column operations are in a file called api/columns.clj..
Exporting only those functions from the namespaces in the /api directory files using an exporter function taken from tech.v3.datatype in a single file api.clj in the root namespace.
That way when you do (require 'tablecloth.api), you get just the symbols exported by the api.clj.
Implementation/Solution
This PR mimics the practice described above, applying it to the slice function that we've written.
How to test
The tests in test/slice_test.clj should still run without error. Note that they import the slice function in the new way in the require at the top of the file.
Goal/Purpose
Briefly discussed in passing with @daslu during last weeks session: it may be a good idea to mimick scicloj/tablecloth's namespace organization. The point being that we hide the implementation and expose only the API that we want.
Tablecloth does this by:
api
. Within the directory functions are organized sensibly by areas of operation, e.g. column operations are in a file calledapi/columns.clj
../api
directory files using an exporter function taken fromtech.v3.datatype
in a single fileapi.clj
in the root namespace.That way when you do
(require 'tablecloth.api)
, you get just the symbols exported by theapi.clj
.Implementation/Solution
This PR mimics the practice described above, applying it to the slice function that we've written.
How to test
The tests in
test/slice_test.clj
should still run without error. Note that they import theslice
function in the new way in the require at the top of the file.