Skip to content

Commit c766db7

Browse files
committed
Merge branch 'release/v0.9.0'
2 parents 401e26b + cb06134 commit c766db7

67 files changed

Lines changed: 11113 additions & 7092 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [[0.9.0]](https://github.com/thoth-pub/thoth/releases/tag/v0.9.0) - 2022-10-24
10+
### Added
11+
- [#333](https://github.com/thoth-pub/thoth/issues/333) - Add references to schema
12+
- Output references in Crossref DOI deposit
13+
- [#444](https://github.com/thoth-pub/thoth/issues/444) - Output abstracts in Crossref DOI deposit
14+
- [#443](https://github.com/thoth-pub/thoth/issues/443) - Output affiliations in Crossref DOI deposit
15+
- [#446](https://github.com/thoth-pub/thoth/issues/446) - Output fundings in Crossref DOI deposit
16+
17+
### Changed
18+
- Simplify syntax in CRUD methods
19+
920
## [[0.8.11]](https://github.com/thoth-pub/thoth/releases/tag/v0.8.11) - 2022-10-07
1021
### Changed
1122
- [#298](https://github.com/thoth-pub/thoth/issues/298) - Make database constraint errors more user-friendly in API output and APP notifications

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "thoth"
3-
version = "0.8.11"
3+
version = "0.9.0"
44
authors = ["Javier Arias <javi@openbookpublishers.com>", "Ross Higman <ross@openbookpublishers.com>"]
55
edition = "2018"
66
license = "Apache-2.0"
@@ -16,11 +16,11 @@ maintenance = { status = "actively-developed" }
1616
members = ["thoth-api", "thoth-api-server", "thoth-app", "thoth-app-server", "thoth-client", "thoth-errors", "thoth-export-server"]
1717

1818
[dependencies]
19-
thoth-api = { version = "0.8.11", path = "thoth-api", features = ["backend"] }
20-
thoth-api-server = { version = "0.8.11", path = "thoth-api-server" }
21-
thoth-app-server = { version = "0.8.11", path = "thoth-app-server" }
22-
thoth-errors = { version = "0.8.11", path = "thoth-errors" }
23-
thoth-export-server = { version = "0.8.11", path = "thoth-export-server" }
19+
thoth-api = { version = "0.9.0", path = "thoth-api", features = ["backend"] }
20+
thoth-api-server = { version = "0.9.0", path = "thoth-api-server" }
21+
thoth-app-server = { version = "0.9.0", path = "thoth-app-server" }
22+
thoth-errors = { version = "0.9.0", path = "thoth-errors" }
23+
thoth-export-server = { version = "0.9.0", path = "thoth-export-server" }
2424
clap = "2.33.3"
2525
dialoguer = "0.7.1"
2626
dotenv = "0.15.0"

docker-compose.dev.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ services:
66
container_name: "thoth_db"
77
volumes:
88
- ./db/_data:/var/lib/postgresql/data
9-
- /etc/localtime:/etc/localtime:ro
109
env_file:
1110
- .env
1211

thoth-api-server/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "thoth-api-server"
3-
version = "0.8.11"
3+
version = "0.9.0"
44
authors = ["Javier Arias <javi@openbookpublishers.com>", "Ross Higman <ross@openbookpublishers.com>"]
55
edition = "2018"
66
license = "Apache-2.0"
@@ -9,8 +9,8 @@ repository = "https://github.com/thoth-pub/thoth"
99
readme = "README.md"
1010

1111
[dependencies]
12-
thoth-api = { version = "0.8.11", path = "../thoth-api", features = ["backend"] }
13-
thoth-errors = { version = "0.8.11", path = "../thoth-errors" }
12+
thoth-api = { version = "0.9.0", path = "../thoth-api", features = ["backend"] }
13+
thoth-errors = { version = "0.9.0", path = "../thoth-errors" }
1414
actix-web = "4.0.1"
1515
actix-cors = "0.6.0"
1616
actix-identity = "0.4.0"

thoth-api/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "thoth-api"
3-
version = "0.8.11"
3+
version = "0.9.0"
44
authors = ["Javier Arias <javi@openbookpublishers.com>", "Ross Higman <ross@openbookpublishers.com>"]
55
edition = "2018"
66
license = "Apache-2.0"
@@ -16,7 +16,7 @@ maintenance = { status = "actively-developed" }
1616
backend = ["diesel", "diesel-derive-enum", "diesel_migrations", "futures", "actix-web"]
1717

1818
[dependencies]
19-
thoth-errors = { version = "0.8.11", path = "../thoth-errors" }
19+
thoth-errors = { version = "0.9.0", path = "../thoth-errors" }
2020
actix-web = { version = "4.0.1", optional = true }
2121
argon2rs = "0.2.5"
2222
isbn2 = "0.4.0"

thoth-api/migrations/0.8.11/down.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ ALTER TABLE work ADD CONSTRAINT work_reference_check1 CHECK (octet_length(refere
33

44
ALTER TABLE institution RENAME CONSTRAINT institution_pkey TO funder_pkey;
55
ALTER INDEX institution_doi_uniq_idx RENAME TO funder_doi_uniq_idx;
6-
ALTER TABLE institution RENAME CONSTRAINT institution_funder_doi_check TO funder_funder_doi_check;
7-
ALTER TABLE institution RENAME CONSTRAINT institution_institution_name_check TO funder_funder_name_check;
6+
ALTER TABLE institution RENAME CONSTRAINT institution_institution_doi_check TO funder_funder_doi_check;
7+
ALTER TABLE institution RENAME CONSTRAINT institution_institution_name_check TO funder_funder_name_check;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
DROP TABLE reference_history;
2+
DROP TABLE reference;

thoth-api/migrations/0.9.0/up.sql

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
CREATE TABLE reference (
2+
reference_id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
3+
work_id UUID NOT NULL REFERENCES work(work_id) ON DELETE CASCADE,
4+
reference_ordinal INTEGER NOT NULL CHECK (reference_ordinal > 0),
5+
doi TEXT CHECK (doi ~* '^https:\/\/doi\.org\/10\.\d{4,9}\/[-._\;\(\)\/:a-zA-Z0-9]+$'),
6+
unstructured_citation TEXT CHECK (octet_length(unstructured_citation) >= 1),
7+
issn TEXT CHECK (issn ~* '\d{4}\-\d{3}(\d|X)'),
8+
isbn TEXT CHECK (octet_length(isbn) = 17),
9+
journal_title TEXT CHECK (octet_length(journal_title) >= 1),
10+
article_title TEXT CHECK (octet_length(article_title) >= 1),
11+
series_title TEXT CHECK (octet_length(series_title) >= 1),
12+
volume_title TEXT CHECK (octet_length(volume_title) >= 1),
13+
edition INTEGER CHECK (edition > 0),
14+
author TEXT CHECK (octet_length(author) >= 1),
15+
volume TEXT CHECK (octet_length(volume) >= 1),
16+
issue TEXT CHECK (octet_length(issue) >= 1),
17+
first_page TEXT CHECK (octet_length(first_page) >= 1),
18+
component_number TEXT CHECK (octet_length(component_number) >= 1),
19+
standard_designator TEXT CHECK (octet_length(standard_designator) >= 1),
20+
standards_body_name TEXT CHECK (octet_length(standards_body_name) >= 1),
21+
standards_body_acronym TEXT CHECK (octet_length(standards_body_acronym) >= 1),
22+
url TEXT CHECK (url ~* '^[^:]*:\/\/(?:[^\/:]*:[^\/@]*@)?(?:[^\/:.]*\.)+([^:\/]+)'),
23+
publication_date DATE,
24+
retrieval_date DATE,
25+
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
26+
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
27+
CONSTRAINT reference_reference_ordinal_work_id_uniq UNIQUE (work_id, reference_ordinal),
28+
CONSTRAINT reference_doi_andor_unstructured_citation CHECK
29+
(doi IS NOT NULL OR unstructured_citation IS NOT NULL),
30+
CONSTRAINT reference_standard_citation_required_fields CHECK
31+
((standard_designator IS NOT NULL AND standards_body_name IS NOT NULL AND standards_body_acronym IS NOT NULL)
32+
OR
33+
(standard_designator IS NULL AND standards_body_name IS NULL AND standards_body_acronym IS NULL))
34+
);
35+
SELECT diesel_manage_updated_at('reference');
36+
37+
CREATE TABLE reference_history (
38+
reference_history_id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
39+
reference_id UUID NOT NULL REFERENCES reference(reference_id) ON DELETE CASCADE,
40+
account_id UUID NOT NULL REFERENCES account(account_id),
41+
data JSONB NOT NULL,
42+
timestamp TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
43+
);

0 commit comments

Comments
 (0)