<commit_before>var fs = require('graceful-fs');
var mkdir = require('mkdirp');
var rmdir = require('rimraf');
var commandLineArgs = require("command-line-args");
 
var cli = commandLineArgs([
    { name: "dataset", alias: "d", type: String },
    { name: "reponame", alias: "r", type: String },
]);

var options = cli.parse();
var repo = options.reponame;
var data = options.dataset;

if (repo.charAt(repo.length - 1) != "/")
	repo += "/";

var zoom = JSON.parse(fs.readFileSync(repo + "dataset.json", "utf8")).zoom;

// TODO import function from geoHelpers, so tile equality is guaranteed
function latlonToTilenumber(lat, lon)
{<commit_msg>Give error message on missing CLI options.<commit_after>var fs = require('graceful-fs');
var mkdir = require('mkdirp');
var rmdir = require('rimraf');
var commandLineArgs = require("command-line-args");
 
var cli = commandLineArgs([
    { name: "dataset", alias: "d", type: String },
    { name: "reponame", alias: "r", type: String },
]);

var options = cli.parse();
var repo = options.reponame;
var data = options.dataset;

if (!repo)
{
	console.log("ERROR: No --reponame provided.");
	process.exit(1);
}

if (!data)
{
	console.log("ERROR: No --dataset provided.");
	process.exit(1);
}

if (repo.charAt(repo.length - 1) != "/")
	repo += "/";

var zoom = JSON.parse(fs.readFileSync(repo + "dataset.json", "utf8")).zoom;

// TODO import function from geoHelpers, so tile equality is guaranteed
function latlonToTilenumber(lat, lon)
{
{'fraction_non_alphanumeric': 0.1784260515603799, 'fraction_numerical': 0.004070556309362279, 'mean_word_length': 4.587121212121212, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5852313', 'n_tokens_mistral': 507, 'n_tokens_neox': 498, 'n_words': 136}