Skip to content

Commit

Permalink
commiting to main
Browse files Browse the repository at this point in the history
R. S. Doiel committed Oct 30, 2024
1 parent 44588af commit 105775a
Showing 18 changed files with 35 additions and 42 deletions.
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
@@ -26,6 +26,6 @@ maintainers:
orcid: ""

repository-code: "https://github.com/caltechlibrary/cold"
version: 0.0.10
version: 0.0.11
license-url: "https://caltechlibrary.github.io/cold/LICENSE"
keywords: [ "metadata", "objects", "controlled vocabulary" ]
4 changes: 2 additions & 2 deletions about.html
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@

<section>
<h1 id="about-this-software">About this software</h1>
<h2 id="cold-0.0.10">cold 0.0.10</h2>
<h2 id="cold-0.0.11">cold 0.0.11</h2>
<h3 id="authors">Authors</h3>
<ul>
<li>R. S. Doiel</li>
@@ -66,7 +66,7 @@ <h3 id="operating-systems">Operating Systems</h3>
</ul>
<h3 id="software-requiremets">Software Requiremets</h3>
<ul>
<li>Deno &gt;= 2.0</li>
<li>Deno &gt;= 2.0.4</li>
<li>GNU Make</li>
<li>Pandoc &gt;= 3.1</li>
<li>datasetd &gt;= 2.1.23</li>
4 changes: 2 additions & 2 deletions about.md
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ authors:
orcid: "https://orcid.org/0000-0003-0900-6903"

repository-code: "https://github.com/caltechlibrary/cold"
version: 0.0.10
version: 0.0.11
license-url: "https://caltechlibrary.github.io/cold/LICENSE"
keywords: [ "metadata", "objects", "controlled vocabulary" ]

@@ -23,7 +23,7 @@ keywords: [ "metadata", "objects", "controlled vocabulary" ]
About this software
===================

## cold 0.0.10
## cold 0.0.11

### Authors

2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"dateCreated": "2023-12-12",
"dateModified": "2024-10-30",
"releaseNotes": "cold is a work in progress, subject to change and not recommended for production.",
"version": "0.0.10",
"version": "0.0.11",
"developmentStatus": "wip",
"author": [
{
4 changes: 2 additions & 2 deletions cold_admin.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%cold(1) user manual | 0.0.10 2024-10-30 8cd52ba
%cold(1) user manual | 0.0.11 2024-10-30 44588af
% R. S.Doiel
% 2024-10-30 8cd52ba
% 2024-10-30 44588af

# NAME

4 changes: 2 additions & 2 deletions cold_reports.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%cold_reports(1) user manual | 0.0.10 2024-10-30 8cd52ba
%cold_reports(1) user manual | 0.0.11 2024-10-30 44588af
% R. S.Doiel
% 2024-10-30 8cd52ba
% 2024-10-30 44588af

# NAME

21 changes: 6 additions & 15 deletions cold_reports.ts
Original file line number Diff line number Diff line change
@@ -267,11 +267,6 @@ async function handleReportRequest(
const rpt = new Report();
const ok = await rpt.request_report(obj);
if (ok) {
/*
console.log(
`DEBUG report request object -> ${rpt.toJSON()}`,
);
*/
// We want to create the record and return success. If the record
// has already been created then we should distriguish that error from
// other types of error.
@@ -412,14 +407,14 @@ class Runnable implements RunnableInterface {
ext = "";
break;
}
console.log("DEBUG file extension set to ", ext, this.content_type);
console.log("INFO: file extension set to ", ext, this.content_type);
if (this.append_datestamp) {
let datestamp = (new Date()).toJSON().substring(0, 10);
filename = `${this.basename}_${datestamp}${ext}`;
} else {
filename = `${this.basename}${ext}`;
}
console.log("DEBUG filename should be", filename);
console.log("INFO: filename should be", filename);

// FIXME: output of should be read in by the runner so that the report can be rendering to a URL location, then write out the file.
const basedir: string = "./htdocs/rpt";
@@ -447,7 +442,6 @@ class Runner implements RunnerInterface {
const cfg = yaml.parse(src) as {
[key: string]: { [key: string]: Runnable };
};
//console.log(`DEBUG cfg.reports ${typeof cfg.reports}:\n\t`, cfg.reports);
if (cfg.reports !== undefined) {
for (const [k, v] of Object.entries(cfg.reports)) {
if (v === undefined) {
@@ -474,9 +468,9 @@ async function process_request(
// I want a copy of the object passed in so that response doesn't .
request.status = "processing";
request.updated = (new Date()).toJSON();
console.log("DEBUG updated request object to processing", request);
console.log("INFO: updated request object to processing", request);
if (await ds.update(request.id, request)) {
console.log("DEBUG launching request", request);
console.log("INFO: launching request", request);
} else {
console.log(
`ERROR: updated of request ${request} failed, aborting request runner`,
@@ -502,11 +496,9 @@ async function process_request(

// servicing_requests checks the reports table, gets a list of pending requests, invokes process_request
async function servicing_requests(runner: Runner): Promise<void> {
console.log("DEBUG entered servicing_requests with Runner", runner);
console.log("INFO: entered servicing_requests with Runner", runner);
let requests = await ds.query("next_request", [], {}) as Report[];
console.log("DEBUG requests -> ??", typeof requests, requests);
if (requests.length > 0) {
console.log(`DEBUG we have ${requests.length} requests ...`);
for (let request of requests) {
let report_name = request.report_name;
let cmd = runner.report_map[report_name];
@@ -548,9 +540,8 @@ async function report_runner(config_yaml: string): Promise<number> {
if (runner === undefined) {
return 1;
}
console.log("DEBUG runner to should exist now", runner);
await servicing_requests(runner);
console.log("DEBUG caught up on requests");
console.log("INFO: caught up on requests");
return 0;
}

4 changes: 2 additions & 2 deletions directory_sync.1.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%directory_sync(1) user manual | 0.0.10 2024-10-30 8cd52ba
%directory_sync(1) user manual | 0.0.11 2024-10-30 44588af
% R. S.Doiel
% 2024-10-30 8cd52ba
% 2024-10-30 44588af

# NAME

16 changes: 9 additions & 7 deletions fix_advisor_id.ts
Original file line number Diff line number Diff line change
@@ -6,8 +6,8 @@ import {
apiPort,
csv_parse,
Dataset,
// DatasetApiClient,
// People,
// DatasetApiClient,
// People,
} from "./deps.ts";
import { PeopleInterface } from "./people.ts";

@@ -27,7 +27,7 @@ function normalize_to_boolean(val: boolean | undefined): boolean {

/**
* setAdvisorIds takes a corrected people.csv and adds the advisors_id appropriately.
*
*
* @param {number} port is the port number where datasetd is running, e.g. 8485
* @param {string} c_name is the name of the dataset collection
* @param {string} csv_file is the name of the CSV file to import
@@ -66,15 +66,17 @@ async function setAdvisorIds(
if (obj === undefined) {
error_count++;
} else if (typeof obj === "object") {
let advisors_id: string = "";
let advisors_id: string = "";
if (sheet[i].hasOwnProperty("advisor_id")) {
advisors_id = sheet[i].advisor_id;
advisors_id = sheet[i].advisor_id;
console.log(`DEBUG found advisors_id ${advisors_id} for ${clpid}`);
if (advisors_id !== undefined && advisors_id !== "" ) {
if (advisors_id !== undefined && advisors_id !== "") {
obj.advisors_id = advisors_id;
const ok = await ds.update(clpid, obj);
if (!ok) {
console.log(`failed to update advisor_id ${advisors_id} for ${clpid}`);
console.log(
`failed to update advisor_id ${advisors_id} for ${clpid}`,
);
error_count++;
} else {
success_count++;
2 changes: 1 addition & 1 deletion htdocs/about.html
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
<section>

<h1>About this software</h1>
<h2>cold 0.0.10</h2>
<h2>cold 0.0.11</h2>
<h3>Authors</h3>
<ul>
<li>R. S. Doiel</li>
4 changes: 2 additions & 2 deletions htdocs/about.md
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ authors:
orcid: "https://orcid.org/0000-0003-0900-6903"

repository-code: "https://github.com/caltechlibrary/cold"
version: 0.0.10
version: 0.0.11
license-url: "https://caltechlibrary.github.io/cold/LICENSE"
keywords: [ "metadata", "objects", "controlled vocabulary" ]

@@ -23,7 +23,7 @@ keywords: [ "metadata", "objects", "controlled vocabulary" ]
About this software
===================

## cold 0.0.10
## cold 0.0.11

### Authors

2 changes: 1 addition & 1 deletion installer.ps1
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
# Set the package name and version to install
#
$PACKAGE = "cold"
$VERSION = "0.0.10"
$VERSION = "0.0.11"
$GIT_GROUP = "caltechlibrary"
$RELEASE = "https://github.com/${GIT_GROUP}/${PACKAGE}/releases/tag/v${VERSION}"
$SYSTEM_TYPE = Get-ComputerInfo -Property CsSystemType
2 changes: 1 addition & 1 deletion installer.sh
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
# Set the package name and version to install
#
PACKAGE="cold"
VERSION="0.0.10"
VERSION="0.0.11"
GIT_GROUP="caltechlibrary"
RELEASE="https://github.com/$GIT_GROUP/$PACKAGE/releases/tag/v$VERSION"

Binary file added pagefind/fragment/en-US_e5af393.pf_fragment
Binary file not shown.
Binary file added pagefind/index/en-US_12c6bfa.pf_index
Binary file not shown.
2 changes: 1 addition & 1 deletion pagefind/pagefind-entry.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"1.1.1","languages":{"en-US":{"hash":"en-US_76e012f0e4b37","wasm":"en-US","page_count":13}}}
{"version":"1.1.1","languages":{"en-US":{"hash":"en-US_75ae41c08cb57","wasm":"en-US","page_count":13}}}
Binary file added pagefind/pagefind.en-US_75ae41c08cb57.pf_meta
Binary file not shown.
4 changes: 2 additions & 2 deletions version.ts
Original file line number Diff line number Diff line change
@@ -6,13 +6,13 @@ export const appInfo: {[k: string]: string} = {
appName: "cold",

// Version number of release
version: "0.0.10",
version: "0.0.11",

// ReleaseDate, the date version.ts was generated
releaseDate: "2024-10-30",

// ReleaseHash, the Git hash when version.go was generated
releaseHash: "8cd52ba",
releaseHash: "44588af",

// licenseText holds a copy of the application license text.
licenseText: `

0 comments on commit 105775a

Please sign in to comment.