Skip to content

Commit

Permalink
Merge from main to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
R. S. Doiel committed Jul 9, 2024
2 parents ef19d5f + 40efc05 commit e32b3b8
Show file tree
Hide file tree
Showing 39 changed files with 891 additions and 687 deletions.
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ authors:


repository-code: "https://github.com/caltechlibrary/irdmtools"
version: 0.0.83
version: 0.0.84-dev
license-url: "https://caltechlibrary.github.io/irdmtools/LICENSE"
keywords: [ "institutional repository", "data
management", "Invenio", "Invenio-RDM" ]
78 changes: 68 additions & 10 deletions CaltechAUTHORS_publisher_groups.csv
Original file line number Diff line number Diff line change
Expand Up @@ -189,23 +189,81 @@ American Astronomical Society,Astrophysical Journal,0004-637X,1538-4357,,omit in
American Astronomical Society,Astrophysical Journal Supplement Series,1538-4365,0067-0049,,omit initial The from journal title
American Astronomical Society,Planetary Science Journal,,2632-3338,,omit initial The from journal title
American Astronomical Society,Research Notes of the AAS,,2515-5172,,omit initial The from journal title
American Chemical Society,Journal of Organic Chemistry,,,,omit initial The from journal title
American Chemical Society,Journal of Physical Chemistry,,,,omit initial The from journal title
American Chemical Society,Journal of Physical Chemistry A,,,,omit initial The from journal title
American Chemical Society,Journal of Physical Chemistry B,,,,omit initial The from journal title
American Chemical Society,Journal of Physical Chemistry C,,,,omit initial The from journal title
American Chemical Society,Journal of Physical Chemistry Letters,,,,omit initial The from journal title
American Chemical Society,Journal of Organic Chemistry,0022-3263,1520-6904,,omit initial The from journal title
American Chemical Society,Journal of Physical Chemistry,0022-3654,,,omit initial The from journal title
American Chemical Society,Journal of Physical Chemistry A,1089-5639,1520-5215,,omit initial The from journal title
American Chemical Society,Journal of Physical Chemistry B,1520-6106,1520-5207,,omit initial The from journal title
American Chemical Society,Journal of Physical Chemistry C,1932-7447,1932-7455,,omit initial The from journal title
American Chemical Society,Journal of Physical Chemistry Letters,,1948-7185,,omit initial The from journal title
American Associaition for the Advancement of Science,Science,,,,
American Associaition for the Advancement of Science,Science Advances,,,,
American Associaition for the Advancement of Science,Science Immunology,,,,
American Associaition for the Advancement of Science,Science Robitics,,,,
American Associaition for the Advancement of Science,Science Signaling,,,,
American Associaition for the Advancement of Science,Science Translational Medicine,,,,
National Academy of Sciences,Proceedings of the National Academy of Sciences,,,,
National Academy of Sciences,PNAS Nexus,,,,
National Academy of Sciences,Proceedings of the National Academy of Sciences,0027-8424,1091-6490,,
National Academy of Sciences,PNAS Nexus,,2752-6542,,
Seismological Society of America,Bulletin of the Seismological Society of America,0037-1106,0037-1107,,
Seismological Society of America,Seismological Research Letters,,,,
Seismological Society of America,Seismological Research Letters,0895-0695,1938-2057,,
Royal Astronomical Society,Monthly Notice of the Royal Astronomial Society,0035-2966,1365-2966,,
Royal Astronomical Society,Monthly Notice of the Royal Astronomial Society Letters,1745-3925,1745-3933,,
Royal Astronomical Society,Geophysical Journal International,0956-540X,1365-246X,,
Royal Astronomical Society,RAS Techniques and Instruments,,2752-8200,,
Royal Astronomical Society,RAS Techniques and Instruments,,2752-8200,,
American Geophysical Union,AGU Advances,,2576-604X,,
American Geophysical Union,Community Science,2692-9430,2692-9430,,
American Geophysical Union,Earth's Future,,2328-4277,,
American Geophysical Union,Earth and Space Science,,2333-5084,,
American Geophysical Union,"Geochemistry, Geophysics, Geosystems",,1525-2027,,
American Geophysical Union,GeoHealth,,2471-1403,,
American Geophysical Union,Geophysical Research Letters,0094-8276,1944-8007,,
American Geophysical Union,Global Biogeochemical Cycles,0886-6236,1944-9224,,
American Geophysical Union,Journal of Advances in Modeling Earth System (JAMES),,1942-2466,,
American Geophysical Union,Paleoceanography and Paleoclimatology,,2572-4525,,
American Geophysical Union,Perspectives of Earth and Space Scientists,,2637-6989,,
American Geophysical Union,Radio Science,0048-6604,1944-799X,,
American Geophysical Union,Reviews of Geophysics,8755-1209,1944-9208,,
American Geophysical Union,Space Weather,,1542-7390,,
American Geophysical Union,Space Weather Quarterly,,1539-4964,,
American Geophysical Union,Tectonics,0278-7407,1944-9194,,
American Geophysical Union,Water Resources Research,0043-1397,1944-7973,,
American Geophysical Union,Journal of Geophysical Research: Atmospheres,2169-897X,2169-8996,,
American Geophysical Union,Journal of Geophysical Research: Biogeosciences,2169-8953,2169-8961,,
American Geophysical Union,Journal of Geophysical Research: Earth Surface,2169-9011,2169-9003,,
American Geophysical Union,Journal of Geophysical Research: Machine Learning and Computation,,2993-5210,,
American Geophysical Union,Journal of Geophysical Research: Oceans,2169-9275,2169-9291,,
American Geophysical Union,Journal of Geophysical Research: Planets,2169-9097,2169-9100,,
American Geophysical Union,Journal of Geophysical Research: Solid Earth,2169-9356,2169-9313,,
American Geophysical Union,Journal of Geophysical Research: Space Physics,2169-9380,2169-9402,,
American Geophysical Union,Journal of Geophysical Research,2156-2202,0148-0227,,
International Union of Crystallography,Acta Crystallographica. Section A,0108-7673,2053-2733,,
International Union of Crystallography,Acta Crystallographica. Section A,1600-5724,0108-7673,,
International Union of Crystallography,Acta Crystallographica. Section B,2052-5192,2052-5206,,
International Union of Crystallography,Acta Crystallographica. Section B,0108-7681,,,
International Union of Crystallography,Acta Crystallographica. Section C,1600-5759,2053-2296,,
International Union of Crystallography,Acta Crystallographica. Section D,,2059-7983,,
International Union of Crystallography,Acta Crystallographica. Section E,2056-9890,2056-9890,,
International Union of Crystallography,Acta Crystallographica. Section F,,2053-230X,,
International Union of Crystallography,Acta Crystallographica. Section E,1600-5368,,,
International Union of Crystallography,Journal of Applied Crystallography,,1600-5767,,
International Union of Crystallography,Journal of Synchrotron Radiation,,1600-5775,,
International Union of Crystallography,IUCrJ,,2052-2525,,
International Union of Crystallography,IUCrData,,2414-3146,,
,,,,,
,,,,,
,,,,,
,,,,,
,,,,,
,,,,,
,,,,,
,,,,,
,,,,,
,,,,,
,,,,,
,,,,,
,,,,,
,,,,,
,,,,,
,,,,,
,,,,,
,,,,,
IUCr,,,,,
9 changes: 5 additions & 4 deletions INSTALL.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ <h1 id="install">INSTALL</h1>
<p>To test the latest version you need the required development
environment and follow the steps listed below in “Compiling from
Source”.</p>
<h2 id="quick-install-using-curl">Quick install using curl</h2>
<h2 id="quick-install-using-curl-or-irm">Quick install using curl or
irm</h2>
<p>The following experimental installer should get the latest stable
release for macOS and Linux (e.g. Debian, Ubuntu, Raspberry Pi OS).</p>
<p>Copy and run the following command in your shell (e.g. Terminal)</p>
<pre><code>curl https://caltechlibrary.github.io/irdmtools/installer.sh | sh</code></pre>
<p>NOTE: Windows 11 support is via Window’s Sub-System for Linux (aka
WSL). If you have that available then you can use the installer example
above.</p>
<p>For Windows you can use a Powershell script with the following
command.</p>
<pre><code>irm https://caltechlibrary.github.io/irdmtools/installer.ps1 | iex</code></pre>
<h2 id="requirements">Requirements</h2>
<p>This may change in the future.</p>
<ul>
Expand Down
10 changes: 7 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ irdmtools is an **experimental** Go package and command line tools for working w

To test the latest version you need the required development environment and follow the steps listed below in "Compiling from Source".

Quick install using curl
------------------------
Quick install using curl or irm
-------------------------------

The following experimental installer should get the latest stable release for macOS and Linux (e.g. Debian, Ubuntu, Raspberry Pi OS).

Expand All @@ -17,7 +17,11 @@ Copy and run the following command in your shell (e.g. Terminal)
curl https://caltechlibrary.github.io/irdmtools/installer.sh | sh
~~~

NOTE: Windows 11 support is via Window's Sub-System for Linux (aka WSL). If you have that available then you can use the installer example above.
For Windows you can use a Powershell script with the following command.

~~~
irm https://caltechlibrary.github.io/irdmtools/installer.ps1 | iex
~~~


Requirements
Expand Down
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ifeq ($(OS), Windows)
EXT = .exe
endif

build: version.go $(PROGRAMS) man CITATION.cff about.md installer.sh
build: version.go $(PROGRAMS) man CITATION.cff about.md installer.sh installer.ps1

version.go: .FORCE
@echo '' | pandoc --from t2t --to plain \
Expand Down Expand Up @@ -71,10 +71,19 @@ about.md: codemeta.json $(PROGRAMS)
@if [ -f _codemeta.json ]; then rm _codemeta.json; fi

installer.sh: .FORCE
@echo '' | pandoc --metadata title="Installer" --metadata git_org_or_person="$(GIT_GROUP)" --metadata-file codemeta.json --template codemeta-installer.tmpl >installer.sh
@echo '' | pandoc --metadata title="Installer" --metadata git_org_or_person="$(GIT_GROUP)" --metadata-file codemeta.json --template codemeta-bash-installer.tmpl >installer.sh
@chmod 775 installer.sh
@git add -f installer.sh

<<<<<<< HEAD
=======
installer.ps1: .FORCE
@echo '' | pandoc --metadata title="Installer" --metadata git_org_or_person="$(GIT_GROUP)" --metadata-file codemeta.json --template codemeta-ps1-installer.tmpl >installer.ps1
@chmod 775 installer.ps1
@git add -f installer.ps1


>>>>>>> 40efc058f9e30a71a08de3f33fa78b223c688882
test: $(PACKAGE)
#go test -timeout 120h
go test -test.v -run Test01Config
Expand Down
2 changes: 1 addition & 1 deletion about.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<section>
<h1 id="about-this-software">About this software</h1>
<h2 id="irdmtools-0.0.83">irdmtools 0.0.83</h2>
<h2 id="irdmtools-0.0.84-dev">irdmtools 0.0.84-dev</h2>
<h3 id="authors">Authors</h3>
<ul>
<li>R. S. Doiel</li>
Expand Down
4 changes: 2 additions & 2 deletions about.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ authors:
orcid: "https://orcid.org/0000-0001-9266-5146"

repository-code: "https://github.com/caltechlibrary/irdmtools"
version: 0.0.83
version: 0.0.84-dev
license-url: "https://caltechlibrary.github.io/irdmtools/LICENSE"
keywords: [ "institutional repository", "data
management", "Invenio", "Invenio-RDM" ]
Expand All @@ -24,7 +24,7 @@ management", "Invenio", "Invenio-RDM" ]
About this software
===================

## irdmtools 0.0.83
## irdmtools 0.0.84-dev

### Authors

Expand Down
3 changes: 3 additions & 0 deletions cmd/ep3util/ep3util.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ with one of the options, e.g. `+"`"+`-all`+"`"+`, you can skip providing the KEY
-modified START [END]
: Harvest records modified between start and end dates.
-as-citations
: This harvests the record into a minimal citation form similar to citeproc
# ACTION_PARAMETERS
Action parameters are the specific optional or required parameters need to complete an aciton.
Expand Down
File renamed without changes.
48 changes: 48 additions & 0 deletions codemeta-ps1-installer.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env pwsh
# Generated with codemeta-ps1-installer.tmpl, see https://github.com/caltechlibrary/codemeta-pandoc-examples

#
# Set the package name and version to install
#
$$PACKAGE = "$name$"
$$VERSION = "$version$"
$$GIT_GROUP = "$git_org_or_person$"
$$RELEASE = "https://github.com/$${GIT_GROUP}/$${PACKAGE}/releases/tag/v$${VERSION}"
$$SYSTEM_TYPE = Get-ComputerInfo -Property CsSystemType
if ($$SYSTEM_TYPE.CsSystemType.Contains("ARM64")) {
$$MACHINE = "arm64"
} else {
$$MACHINE = "x86_64"
}

# FIGURE OUT Install directory
$$BIN_DIR = "$${Home}\bin"
Write-Output "$${PACKAGE} will be installed in $${BIN_DIR}"

#
# Figure out what the zip file is named
#
$$ZIPFILE = "$${PACKAGE}-v$${VERSION}-Windows-$${MACHINE}.zip"

#
# Check to see if this zip file has been downloaded.
#
$$DOWNLOAD_URL = "https://github.com/$${GIT_GROUP}/$${PACKAGE}/releases/download/v$${VERSION}/$${ZIPFILE}"

if (!(Test-Path $$BIN_DIR)) {
New-Item $$BIN_DIR -ItemType Directory | Out-Null
}
curl.exe -Lo "$${ZIPFILE}" "$${DOWNLOAD_URL}"

tar.exe xf "$${ZIPFILE}" -C "$${Home}"

Remove-Item $$ZIPFILE

$$User = [System.EnvironmentVariableTarget]::User
$$Path = [System.Environment]::GetEnvironmentVariable('Path', $$User)
if (!(";$${Path};".ToLower() -like "*;$${BIN_DIR};*".ToLower())) {
[System.Environment]::SetEnvironmentVariable('Path', "$${Path};$${BIN_DIR}", $$User)
$$Env:Path += ";$${BIN_DIR}"
}

Write-Output "$${PACKAGE} was installed successfully to $${BIN_DIR}"
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"codeRepository": "https://github.com/caltechlibrary/irdmtools",
"dateCreated": "2022-10-27",
"dateRelease": "2024-01-24",
"dateModified": "2024-04-29",
"dateModified": "2024-06-10",
"issueTracker": "https://github.com/caltechlibrary/irdmtools/issues",
"name": "irdmtools",
"version": "0.0.83",
"version": "0.0.84-dev",
"description": "Tools for working with institutional repositories and data management systems. Current implementation targets Invenio-RDM.",
"applicationCategory": "library science",
"releaseNotes": "Proof of concept and refinements, piloting in production, bug fixes, performance improvements",
Expand Down
54 changes: 32 additions & 22 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,50 +43,54 @@ import (

// Caltech Library packages
"github.com/caltechlibrary/dataset/v2"

// 3rd Party Libraries
"gopkg.in/yaml.v3"
)

// Config holds the common configuration used by all irdmtools
type Config struct {
// Debug is set true then methods with access to the Config obect
// can use this flag to implement addition logging to standard err
Debug bool `json:"-"`
Debug bool `json:"-", yaml:"-"`
// Repository Name, e.g. CaltechAUTHORS, CaltechTHESIS, CaltechDATA
RepoName string `json:"repo_name,omitempty"`
RepoName string `json:"repo_name,omitempty" yaml:"repo_name,omitempty"`
// Repository ID, e.g. caltechauthors, caltechthesis, caltechdata (usually the db name for repository)
// NOTE: It should also match the Postgres DB name used by RDM
RepoID string `json:"repo_id,omitempty"`
RepoID string `json:"repo_id,omitempty" yaml:"repo_id,omitempty"`
// InvenioAPI holds the URL to the InvenioAPI
InvenioAPI string `json:"rdm_url,omitempty"`
InvenioAPI string `json:"rdm_url,omitempty" yaml:"rdm_url,omitempty"`
// InvenioToken is holds the token string to access the API
InvenioToken string `json:"rdmtok,omitempty"`
InvenioToken string `json:"rdmtok,omitempty" yaml:"rdmtok,omitempty"`
// Invenio DSN holds the data source name for the Postgres database storing the invenio records
InvenioDSN string `json:"rdm_dsn,omitempty"`
InvenioDSN string `json:"rdm_dsn,omitempty" yaml:"rdm_dsn,omitempty"`
// InvenioStorage holds the URI to the default storage of Invenio RDM objects, e.g. local file system or S3 bucket
InvenioStorage string `json:"rdm_storage,omitempty"`
InvenioStorage string `json:"rdm_storage,omitempty" yaml:"rdm_storage,omitempty"`
// InvenioCommunityID holds the community id for use with the API.
InvenioCommunityID string `json:"rdm_community_id,omitempty"`
InvenioCommunityID string `json:"rdm_community_id,omitempty" yaml:"rdm_community_id,omitempty"`
// InvenioDbHost holds the name of the machine for the Postgres server
InvenioDbHost string `json:"rdm_db_host,omitempty"`
InvenioDbHost string `json:"rdm_db_host,omitempty" yaml:"rdm_db_host,omitempty"`
// InvenioDbUser holds the database username of the machine for the Postgres server
InvenioDbUser string `json:"rdm_db_user,omitempty"`
InvenioDbUser string `json:"rdm_db_user,omitempty" yaml:"rdm_db_user,omitempty"`
// InvenioDbPassword holds the database password of the machine for the Postgres server
InvenioDbPassword string `json:"rdm_db_password,omitempty"`
InvenioDbPassword string `json:"rdm_db_password,omitempty" yaml:"rdm_db_password,omitempty"`

// CName holds the dataset collection name used when harvesting content
CName string `json:"c_name,omitempty"`
CName string `json:"c_name,omitempty" yaml:"c_name,omitempty"`
// MailTo holds an email address to use when an email (e.g. CrossRef API access) is needed
MailTo string `json:"mailto,omitempty"`
MailTo string `json:"mailto,omitempty" yaml:"mailto,omitempty"`
// ds his a non-public point to an dataset collection structure
ds *dataset.Collection

// EPrint configuration needed for migration related tools
EPrintHost string `json:"eprint_host,omitempty"`
EPrintUser string `json:"eprint_user,omitempty"`
EPrintPassword string `json:"eprint_password,omitempty"`
EPrintArchivesPath string `json:"eprint_archives_path,omitempty"`
EPrintDbHost string `json:"eprint_db_host,omitempty"`
EPrintDbUser string `json:"eprint_db_user,omitempty"`
EPrintDbPassword string `json:"eprint_db_password,omitempty"`
EPrintHost string `json:"eprint_host,omitempty" yaml:"eprint_host,omitempty"`
EPrintUser string `json:"eprint_user,omitempty" yaml:"eprint_user,omitempty"`
EPrintPassword string `json:"eprint_password,omitempty" yaml:"eprint_password,omitempty"`
EPrintArchivesPath string `json:"eprint_archives_path,omitempty" yaml:"eprint_archives_path,omitempty"`
EPrintDbHost string `json:"eprint_db_host,omitempty" yaml:"eprint_db_host,omitempty"`
EPrintDbUser string `json:"eprint_db_user,omitempty" yaml:"eprint_db_user,omitempty"`
EPrintDbPassword string `json:"eprint_db_password,omitempty" yaml:"eprint_db_password,omitempty"`
EPrintBaseURL string`json:"eprint_base_url,omitempty" yaml:"eprint_base_url,omitempty"`


// rl holds rate limiter data for throttling API requests
Expand Down Expand Up @@ -252,8 +256,14 @@ func (cfg *Config) LoadConfig(configFName string) error {
if err != nil {
return err
}
if err := JSONUnmarshal(src, &cfg); err != nil {
return err
if strings.HasSuffix(configFName, ".yaml") {
if err := yaml.Unmarshal(src, &cfg); err != nil {
return err
}
} else {
if err := JSONUnmarshal(src, &cfg); err != nil {
return err
}
}
// Build our DSN if not set.
if cfg.InvenioDSN == "" {
Expand Down
Loading

0 comments on commit e32b3b8

Please sign in to comment.