From 4fed1f8de51841e182194d3b230c5a340fe508a9 Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Mon, 22 Apr 2024 17:32:35 +0200 Subject: [PATCH] rename package --- README.md | 15 ++++++++------- cff/cff.go | 2 +- cmd/convert.go | 8 ++++---- cmd/list.go | 8 ++++---- cmd/sample.go | 8 ++++---- codemeta/codemeta.go | 2 +- commonmeta/commonmeta.go | 4 ++-- crossref/crossref.go | 12 ++++++------ crossref/crossref_test.go | 6 +++--- crossrefxml/crossrefxml.go | 2 +- csl/csl.go | 2 +- datacite/datacite.go | 8 ++++---- datacite/datacite_test.go | 6 +++--- dateutils/dateutils_test.go | 2 +- doiutils/doiutils_test.go | 2 +- inveniordm/inveniordm.go | 2 +- inveniordm/inveniordm_test.go | 2 +- jsonfeed/jsonfeed.go | 2 +- jsonfeed/jsonfeed_test.go | 2 +- schemaorg/schemaorg.go | 2 +- schemautils/schemautils_test.go | 4 ++-- types/types_test.go | 2 +- utils/utils_test.go | 2 +- 23 files changed, 53 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index d23acd5..6a46747 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,16 @@ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![Go Reference](https://pkg.go.dev/badge/github.com/front-matter/commonmeta.svg)](https://pkg.go.dev/github.com/front-matter/commonmeta) +[![Go Report Card](https://goreportcard.com/badge/github.com/front-matter/commonmeta)](https://goreportcard.com/report/github.com/front-matter/commonmeta) -# commonmeta-go +# commonmeta +commonmeta is a Go library to implement Commonmeta, the common Metadata Model for Scholarly Metadata. Use commonmeta to convert scholarly metadata, in a variety of formats, listed below. Commonmeta is work in progress, the first release was on April 19, 2024. Implementations in other languages are also available ([Ruby](https://github.com/front-matter/commonmeta-ruby), [Python](https://github.com/front-matter/commonmeta-py)). -commonmeta-go is a Go library to implement Commonmeta, the common Metadata Model for Scholarly Metadata. Use commonmeta-go to convert scholarly metadata, in a variety of formats, listed below. Commonmeta-go is work in progress, the first release was on April 19, 2024. Implementations in other languages are also available ([Ruby](https://github.com/front-matter/commonmeta-ruby), [Python](https://github.com/front-matter/commonmeta-py)). - -commonmeta-go uses semantic versioning. Currently, its major version number is still at 0, meaning the API is not yet stable, and breaking changes are expected in the internal API and commonmeta JSON format. +commonmeta uses semantic versioning. Currently, its major version number is still at 0, meaning the API is not yet stable, and breaking changes are expected in the internal API and commonmeta JSON format. ## Supported Metadata Formats -Commonmeta-go reads and/or writes these metadata formats: +Commonmeta reads and/or writes these metadata formats: | Format | Name | Content Type | Read | Write | | ------------------------------------------------------------------------------------------------ | ------------- | -------------------------------------- | ------- | ------- | @@ -37,6 +38,6 @@ _Later_: we plan to implement this format in a later release. ## Meta -Please note that this project is released with a [Contributor Code of Conduct](https://github.com/front-matter/commonmeta-go/blob/main/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. +Please note that this project is released with a [Contributor Code of Conduct](https://github.com/front-matter/commonmeta/blob/main/CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. -License: [MIT](https://github.com/front-matter/commonmeta-go/blob/main/LICENSE) +License: [MIT](https://github.com/front-matter/commonmeta/blob/main/LICENSE) diff --git a/cff/cff.go b/cff/cff.go index b2f4976..7e92d22 100644 --- a/cff/cff.go +++ b/cff/cff.go @@ -1,6 +1,6 @@ package cff -import "commonmeta-go/types" +import "commonmeta/types" type Content struct { ID string `json:"id"` diff --git a/cmd/convert.go b/cmd/convert.go index decd881..f4f5298 100644 --- a/cmd/convert.go +++ b/cmd/convert.go @@ -8,11 +8,11 @@ import ( "fmt" "strings" - "commonmeta-go/datacite" - "commonmeta-go/doiutils" - "commonmeta-go/types" + "commonmeta/datacite" + "commonmeta/doiutils" + "commonmeta/types" - "commonmeta-go/crossref" + "commonmeta/crossref" "github.com/spf13/cobra" ) diff --git a/cmd/list.go b/cmd/list.go index b2a5d99..3f12068 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -8,13 +8,13 @@ import ( "encoding/json" "fmt" - "commonmeta-go/commonmeta" + "commonmeta/commonmeta" - "commonmeta-go/crossref" + "commonmeta/crossref" - "commonmeta-go/datacite" + "commonmeta/datacite" - "commonmeta-go/types" + "commonmeta/types" "github.com/spf13/cobra" ) diff --git a/cmd/sample.go b/cmd/sample.go index c45fb0c..d1489a2 100644 --- a/cmd/sample.go +++ b/cmd/sample.go @@ -8,13 +8,13 @@ import ( "encoding/json" "fmt" - "commonmeta-go/commonmeta" + "commonmeta/commonmeta" - "commonmeta-go/crossref" + "commonmeta/crossref" - "commonmeta-go/datacite" + "commonmeta/datacite" - "commonmeta-go/types" + "commonmeta/types" "github.com/spf13/cobra" ) diff --git a/codemeta/codemeta.go b/codemeta/codemeta.go index 7fdbde6..9835f88 100644 --- a/codemeta/codemeta.go +++ b/codemeta/codemeta.go @@ -1,6 +1,6 @@ package codemeta -import "commonmeta-go/types" +import "commonmeta/types" type Content struct { ID string `json:"id"` diff --git a/commonmeta/commonmeta.go b/commonmeta/commonmeta.go index 2f3e8da..f9b9de6 100644 --- a/commonmeta/commonmeta.go +++ b/commonmeta/commonmeta.go @@ -5,8 +5,8 @@ import ( "encoding/json" "fmt" - "commonmeta-go/schemautils" - "commonmeta-go/types" + "commonmeta/schemautils" + "commonmeta/types" "github.com/xeipuuv/gojsonschema" ) diff --git a/crossref/crossref.go b/crossref/crossref.go index 3687df7..6483a13 100644 --- a/crossref/crossref.go +++ b/crossref/crossref.go @@ -15,10 +15,10 @@ import ( "strings" "time" - "commonmeta-go/dateutils" - "commonmeta-go/doiutils" - "commonmeta-go/types" - "commonmeta-go/utils" + "commonmeta/dateutils" + "commonmeta/doiutils" + "commonmeta/types" + "commonmeta/utils" ) type Content struct { @@ -282,7 +282,7 @@ func GetCrossref(pid string) (Content, error) { req, err := http.NewRequest("GET", url, nil) v := "0.1" u := "info@front-matter.io" - userAgent := fmt.Sprintf("commonmeta-go/%s (https://commonmeta.org/commonmeta-go/; mailto: %s)", v, u) + userAgent := fmt.Sprintf("commonmeta/%s (https://commonmeta.org/; mailto: %s)", v, u) req.Header.Set("User-Agent", userAgent) if err != nil { log.Fatalln(err) @@ -585,7 +585,7 @@ func GetCrossrefList(number int, member string, _type string, sample bool, hasOR req, err := http.NewRequest("GET", url, nil) v := "0.1" u := "info@front-matter.io" - userAgent := fmt.Sprintf("commonmeta-go/%s (https://commonmeta.org; mailto: %s)", v, u) + userAgent := fmt.Sprintf("commonmeta/%s (https://commonmeta.org; mailto: %s)", v, u) req.Header.Set("User-Agent", userAgent) req.Header.Set("Cache-Control", "private") if err != nil { diff --git a/crossref/crossref_test.go b/crossref/crossref_test.go index ac7ca33..b502967 100644 --- a/crossref/crossref_test.go +++ b/crossref/crossref_test.go @@ -7,9 +7,9 @@ import ( "strings" "testing" - "commonmeta-go/crossref" - "commonmeta-go/doiutils" - "commonmeta-go/types" + "commonmeta/crossref" + "commonmeta/doiutils" + "commonmeta/types" "github.com/google/go-cmp/cmp" ) diff --git a/crossrefxml/crossrefxml.go b/crossrefxml/crossrefxml.go index 6244664..7401a1a 100644 --- a/crossrefxml/crossrefxml.go +++ b/crossrefxml/crossrefxml.go @@ -1,7 +1,7 @@ package crossrefxml import ( - "commonmeta-go/types" + "commonmeta/types" ) type Content struct { diff --git a/csl/csl.go b/csl/csl.go index 42599bd..0796b15 100644 --- a/csl/csl.go +++ b/csl/csl.go @@ -1,6 +1,6 @@ package csl -import "commonmeta-go/types" +import "commonmeta/types" type Content struct { ID string `json:"id"` diff --git a/datacite/datacite.go b/datacite/datacite.go index 79717ba..12dd06c 100644 --- a/datacite/datacite.go +++ b/datacite/datacite.go @@ -12,11 +12,11 @@ import ( "strings" "time" - "commonmeta-go/constants" - "commonmeta-go/doiutils" - "commonmeta-go/types" + "commonmeta/constants" + "commonmeta/doiutils" + "commonmeta/types" - "commonmeta-go/utils" + "commonmeta/utils" ) type Content struct { diff --git a/datacite/datacite_test.go b/datacite/datacite_test.go index 98eaf84..a04565f 100644 --- a/datacite/datacite_test.go +++ b/datacite/datacite_test.go @@ -8,10 +8,10 @@ import ( "strings" "testing" - "commonmeta-go/datacite" + "commonmeta/datacite" - "commonmeta-go/doiutils" - "commonmeta-go/types" + "commonmeta/doiutils" + "commonmeta/types" "github.com/google/go-cmp/cmp" ) diff --git a/dateutils/dateutils_test.go b/dateutils/dateutils_test.go index 84221ef..4bec861 100644 --- a/dateutils/dateutils_test.go +++ b/dateutils/dateutils_test.go @@ -3,7 +3,7 @@ package dateutils_test import ( "testing" - "commonmeta-go/dateutils" + "commonmeta/dateutils" ) // func TestGetDateParts(t *testing.T) { diff --git a/doiutils/doiutils_test.go b/doiutils/doiutils_test.go index e3a3646..432e9e7 100644 --- a/doiutils/doiutils_test.go +++ b/doiutils/doiutils_test.go @@ -3,7 +3,7 @@ package doiutils_test import ( "testing" - "commonmeta-go/doiutils" + "commonmeta/doiutils" ) func TestValidateDOI(t *testing.T) { diff --git a/inveniordm/inveniordm.go b/inveniordm/inveniordm.go index c8e8244..873d2a6 100644 --- a/inveniordm/inveniordm.go +++ b/inveniordm/inveniordm.go @@ -7,7 +7,7 @@ import ( "net/http" "time" - "commonmeta-go/types" + "commonmeta/types" ) type Content struct { diff --git a/inveniordm/inveniordm_test.go b/inveniordm/inveniordm_test.go index fa3cfdb..76c49f8 100644 --- a/inveniordm/inveniordm_test.go +++ b/inveniordm/inveniordm_test.go @@ -3,7 +3,7 @@ package inveniordm_test import ( "testing" - "commonmeta-go/inveniordm" + "commonmeta/inveniordm" ) func TestGetInvenioRDM(t *testing.T) { diff --git a/jsonfeed/jsonfeed.go b/jsonfeed/jsonfeed.go index 49e40ab..bb23f1c 100644 --- a/jsonfeed/jsonfeed.go +++ b/jsonfeed/jsonfeed.go @@ -1,7 +1,7 @@ package jsonfeed import ( - "commonmeta-go/types" + "commonmeta/types" "encoding/json" "fmt" "io" diff --git a/jsonfeed/jsonfeed_test.go b/jsonfeed/jsonfeed_test.go index a03021c..96a603f 100644 --- a/jsonfeed/jsonfeed_test.go +++ b/jsonfeed/jsonfeed_test.go @@ -3,7 +3,7 @@ package jsonfeed_test import ( "testing" - "commonmeta-go/jsonfeed" + "commonmeta/jsonfeed" ) func TestGetJsonFeedItem(t *testing.T) { diff --git a/schemaorg/schemaorg.go b/schemaorg/schemaorg.go index b20d607..75ee133 100644 --- a/schemaorg/schemaorg.go +++ b/schemaorg/schemaorg.go @@ -1,6 +1,6 @@ package schemaorg -import "commonmeta-go/types" +import "commonmeta/types" type Content struct { ID string `json:"id"` diff --git a/schemautils/schemautils_test.go b/schemautils/schemautils_test.go index ab6af68..e8fe6c3 100644 --- a/schemautils/schemautils_test.go +++ b/schemautils/schemautils_test.go @@ -4,8 +4,8 @@ import ( "encoding/json" "path/filepath" - "commonmeta-go/schemautils" - "commonmeta-go/types" + "commonmeta/schemautils" + "commonmeta/types" "fmt" "log" diff --git a/types/types_test.go b/types/types_test.go index 5054a4d..1fd0310 100644 --- a/types/types_test.go +++ b/types/types_test.go @@ -3,7 +3,7 @@ package types_test import ( "testing" - "commonmeta-go/types" + "commonmeta/types" ) func TestMetadata(t *testing.T) { diff --git a/utils/utils_test.go b/utils/utils_test.go index bb48ec0..c7c376a 100644 --- a/utils/utils_test.go +++ b/utils/utils_test.go @@ -3,7 +3,7 @@ package utils_test import ( "testing" - "commonmeta-go/utils" + "commonmeta/utils" ) func TestNormalizeUrl(t *testing.T) {