Skip to content

Commit

Permalink
Merge branch 'release/v0.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ja573 committed Nov 29, 2021
2 parents 0ce0cd8 + 42c9467 commit e108fc3
Show file tree
Hide file tree
Showing 71 changed files with 4,141 additions and 1,269 deletions.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for Thoth
title: ''
labels: feature
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ All notable changes to thoth will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [[0.5.0]](https://github.com/thoth-pub/thoth/releases/tag/v0.5.0) - 2021-11-28
### Added
- [#297](https://github.com/thoth-pub/thoth/issues/297) - Implement publication location

### Changed
- Requirement to Number fields preventing user from entering numbers below 0 for Counts/below 1 for Editions and Ordinals, and sets Contribution Ordinal default to 1 instead of 0
- [#299](https://github.com/thoth-pub/thoth/pull/299) - Update Project MUSE ONIX subject output logic
- Updated if and else branches to comply with [`rustc 1.56.0`](https://github.com/rust-lang/rust/releases/tag/1.56.0)

### Fixed
- [#292](https://github.com/thoth-pub/thoth/issues/292) - Cannot unset pubiication date: error when trying to clear a previously set publication date
- [#295](https://github.com/thoth-pub/thoth/issues/295) - various subforms failing to trim strings before saving (including on mandatory fields which are checked for emptiness)
- Duplicated logic for handling optional field values, simplifying the code and reducing the likelihood of further bugs such as
- Minor issue where some required fields were not marked as "required" (so empty values would be sent to the API and raise an error)
- Issue with subforms where clicking save button bypassed field requirements (so instead of displaying a warning message such as "Please enter a number", invalid values would be sent to the API and raise an error)
- [#310](https://github.com/thoth-pub/thoth/issues/310) - Add jstor specification to formats


## [[0.4.7]](https://github.com/thoth-pub/thoth/releases/tag/v0.4.7) - 2021-10-04
### Added
- [#43](https://github.com/thoth-pub/thoth/issues/43), [#49](https://github.com/thoth-pub/thoth/issues/49) - Implement EBSCO Host's ONIX 2.1 specification
Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "thoth"
version = "0.4.7"
version = "0.5.0"
authors = ["Javier Arias <[email protected]>", "Ross Higman <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -16,11 +16,11 @@ maintenance = { status = "actively-developed" }
members = ["thoth-api", "thoth-api-server", "thoth-app", "thoth-app-server", "thoth-client", "thoth-errors", "thoth-export-server"]

[dependencies]
thoth-api = { version = "0.4.7", path = "thoth-api", features = ["backend"] }
thoth-api-server = { version = "0.4.7", path = "thoth-api-server" }
thoth-app-server = { version = "0.4.7", path = "thoth-app-server" }
thoth-errors = { version = "0.4.7", path = "thoth-errors" }
thoth-export-server = { version = "0.4.7", path = "thoth-export-server" }
thoth-api = { version = "0.5.0", path = "thoth-api", features = ["backend"] }
thoth-api-server = { version = "0.5.0", path = "thoth-api-server" }
thoth-app-server = { version = "0.5.0", path = "thoth-app-server" }
thoth-errors = { version = "0.5.0", path = "thoth-errors" }
thoth-export-server = { version = "0.5.0", path = "thoth-export-server" }
clap = "2.33.3"
dialoguer = "0.7.1"
dotenv = "0.9.0"
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG RUST_IMAGE=rust:1.51.0
ARG RUST_IMAGE=rust:1.56.0
ARG MUSL_IMAGE=ekidd/rust-musl-builder:1.51.0

FROM ${RUST_IMAGE} as wasm
Expand All @@ -16,7 +16,7 @@ RUN npm install -g [email protected]
RUN npm install -g [email protected]
RUN n 12.19.0
RUN npm install -g [email protected]
RUN cargo install wasm-pack
RUN cargo install wasm-pack --version 0.9.1

# Get source
COPY . .
Expand Down
6 changes: 3 additions & 3 deletions thoth-api-server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "thoth-api-server"
version = "0.4.7"
version = "0.5.0"
authors = ["Javier Arias <[email protected]>", "Ross Higman <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -9,8 +9,8 @@ repository = "https://github.com/thoth-pub/thoth"
readme = "README.md"

[dependencies]
thoth-api = { version = "0.4.7", path = "../thoth-api", features = ["backend"] }
thoth-errors = { version = "0.4.7", path = "../thoth-errors" }
thoth-api = { version = "0.5.0", path = "../thoth-api", features = ["backend"] }
thoth-errors = { version = "0.5.0", path = "../thoth-errors" }
actix-web = "3.3.2"
actix-cors = "0.5.4"
actix-identity = "0.3.1"
Expand Down
4 changes: 2 additions & 2 deletions thoth-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "thoth-api"
version = "0.4.7"
version = "0.5.0"
authors = ["Javier Arias <[email protected]>", "Ross Higman <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -16,7 +16,7 @@ maintenance = { status = "actively-developed" }
backend = ["diesel", "diesel-derive-enum", "diesel_migrations", "futures", "actix-web"]

[dependencies]
thoth-errors = { version = "0.4.7", path = "../thoth-errors" }
thoth-errors = { version = "0.5.0", path = "../thoth-errors" }
actix-web = { version = "3.3.2", optional = true }
argon2rs = "0.2.5"
isbn2 = "0.4.0"
Expand Down
39 changes: 39 additions & 0 deletions thoth-api/migrations/0.5.0/down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
ALTER TABLE publication
DROP CONSTRAINT publication_publication_type_work_id_uniq,
ADD COLUMN publication_url TEXT CHECK (publication_url ~* '^[^:]*:\/\/(?:[^\/:]*:[^\/@]*@)?(?:[^\/:.]*\.)+([^:\/]+)');

-- Migrate location URLs back into publication table as far as possible before dropping location table:
-- set the landing_page or full_text_url of the canonical location as the main publication_url,
-- then create duplicate publications to store all other location URLs (landing page/full text).
-- Note this will create multiple identical publications if the same URL is re-used across location fields.
UPDATE publication
SET publication_url = location.landing_page
FROM location
WHERE publication.publication_id = location.publication_id
AND location.canonical
AND location.landing_page IS NOT NULL;
UPDATE publication
SET publication_url = location.full_text_url
FROM location
WHERE publication.publication_id = location.publication_id
AND location.canonical
AND location.full_text_url IS NOT NULL
AND location.landing_page IS NULL;
INSERT INTO publication(publication_type, work_id, publication_url)
SELECT publication.publication_type, publication.work_id, location.landing_page FROM publication, location
WHERE publication.publication_id = location.publication_id
AND location.landing_page IS NOT NULL
AND NOT location.canonical;
INSERT INTO publication(publication_type, work_id, publication_url)
SELECT publication.publication_type, publication.work_id, location.full_text_url FROM publication, location
WHERE publication.publication_id = location.publication_id
AND location.full_text_url IS NOT NULL
AND (
NOT location.canonical
OR (location.canonical AND location.landing_page IS NOT NULL)
);

DROP TABLE location_history;
DROP TRIGGER set_updated_at ON location;
DROP TABLE location;
DROP TYPE IF EXISTS location_platform;
Loading

0 comments on commit e108fc3

Please sign in to comment.