Skip to content

Commit

Permalink
Merge branch 'release/v0.12.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
ja573 committed May 7, 2024
2 parents 3a28358 + 3de5939 commit eea2282
Show file tree
Hide file tree
Showing 20 changed files with 79 additions and 69 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_test_and_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build binary
run: cargo build --verbose
run: cargo build -vv
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run tests
run: cargo test --workspace --verbose
run: cargo test --workspace -vv
lint:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Build binary
run: cargo build --verbose
run: cargo build -vv
- name: Run migrations
run: cargo run migrate
- name: Revert migrations
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [[0.12.5]](https://github.com/thoth-pub/thoth/releases/tag/v0.12.5) - 2024-05-07
### Changed
- [601](https://github.com/thoth-pub/thoth/pull/601) - Upgrade rust to `1.78.0` in production and development `Dockerfile`
- [601](https://github.com/thoth-pub/thoth/pull/601) - Upgrade `trunk` to v0.20.0
- [601](https://github.com/thoth-pub/thoth/pull/601) - Added `-vv` option to build command in Makefile and GitHub actions

## [[0.12.4]](https://github.com/thoth-pub/thoth/releases/tag/v0.12.4) - 2024-04-30
### Changed
- [545](https://github.com/thoth-pub/thoth/issues/545) - Add Zenodo as a location platform
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.12.4"
version = "0.12.5"
authors = ["Javier Arias <javi@openbookpublishers.com>", "Ross Higman <ross@openbookpublishers.com>"]
edition = "2021"
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.12.4", path = "thoth-api", features = ["backend"] }
thoth-api-server = { version = "=0.12.4", path = "thoth-api-server" }
thoth-app-server = { version = "=0.12.4", path = "thoth-app-server" }
thoth-errors = { version = "=0.12.4", path = "thoth-errors" }
thoth-export-server = { version = "=0.12.4", path = "thoth-export-server" }
thoth-api = { version = "=0.12.5", path = "thoth-api", features = ["backend"] }
thoth-api-server = { version = "=0.12.5", path = "thoth-api-server" }
thoth-app-server = { version = "=0.12.5", path = "thoth-app-server" }
thoth-errors = { version = "=0.12.5", path = "thoth-errors" }
thoth-export-server = { version = "=0.12.5", path = "thoth-export-server" }
clap = { version = "4.4.7", features = ["cargo", "env"] }
dialoguer = { version = "0.11.0", features = ["password"] }
dotenv = "0.15.0"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG MUSL_IMAGE=clux/muslrust:1.77.2-stable
ARG MUSL_IMAGE=clux/muslrust:1.78.0-stable

FROM ${MUSL_IMAGE} as build

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG RUST_VERSION=1.77.2
ARG RUST_VERSION=1.78.0

FROM rust:${RUST_VERSION}

ENV TRUNK_VERSION=0.18.8
ENV TRUNK_VERSION=0.20.0

ARG THOTH_GRAPHQL_API=http://localhost:8000
ARG THOTH_EXPORT_API=http://localhost:8181
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ docker-dev-db:
docker-compose -f docker-compose.dev.yml up db

build:
cargo build
cargo build -vv

build-graphql-api: build

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.12.4"
version = "0.12.5"
authors = ["Javier Arias <javi@openbookpublishers.com>", "Ross Higman <ross@openbookpublishers.com>"]
edition = "2021"
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.12.4", path = "../thoth-api", features = ["backend"] }
thoth-errors = { version = "=0.12.4", path = "../thoth-errors" }
thoth-api = { version = "=0.12.5", path = "../thoth-api", features = ["backend"] }
thoth-errors = { version = "=0.12.5", path = "../thoth-errors" }
actix-web = "4.5.1"
actix-cors = "0.7.0"
actix-identity = "0.7.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.12.4"
version = "0.12.5"
authors = ["Javier Arias <javi@openbookpublishers.com>", "Ross Higman <ross@openbookpublishers.com>"]
edition = "2021"
license = "Apache-2.0"
Expand All @@ -16,7 +16,7 @@ maintenance = { status = "actively-developed" }
backend = ["diesel", "diesel-derive-enum", "diesel_migrations", "futures", "actix-web", "jsonwebtoken"]

[dependencies]
thoth-errors = { version = "=0.12.4", path = "../thoth-errors" }
thoth-errors = { version = "=0.12.5", path = "../thoth-errors" }
actix-web = { version = "4.5.1", optional = true }
argon2rs = "0.2.5"
isbn2 = "0.4.0"
Expand Down
2 changes: 1 addition & 1 deletion thoth-app-server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "thoth-app-server"
version = "0.12.4"
version = "0.12.5"
authors = ["Javier Arias <javi@openbookpublishers.com>", "Ross Higman <ross@openbookpublishers.com>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion thoth-app-server/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use dotenv::dotenv;
use std::env;
use std::process::{exit, Command};

const TRUNK_VERSION: &str = "0.19.2";
const TRUNK_VERSION: &str = "0.20.0";

fn is_wasm_target_installed() -> bool {
let output = Command::new("rustup")
Expand Down
6 changes: 3 additions & 3 deletions thoth-app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "thoth-app"
version = "0.12.4"
version = "0.12.5"
authors = ["Javier Arias <javi@openbookpublishers.com>", "Ross Higman <ross@openbookpublishers.com>"]
edition = "2021"
license = "Apache-2.0"
Expand Down Expand Up @@ -36,8 +36,8 @@ uuid = { version = "0.8.2", features = ["serde", "v4"] }
# `getrandom` is a dependency of `uuid`, we need to explicitly import and include the `js` feature to enable wasm
# https://docs.rs/getrandom/latest/getrandom/#webassembly-support
getrandom = { version = "0.2", features = ["js"] }
thoth-api = { version = "=0.12.4", path = "../thoth-api" }
thoth-errors = { version = "=0.12.4", path = "../thoth-errors" }
thoth-api = { version = "=0.12.5", path = "../thoth-api" }
thoth-errors = { version = "=0.12.5", path = "../thoth-errors" }

[build-dependencies]
dotenv = "0.15.0"
2 changes: 2 additions & 0 deletions thoth-app/Trunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ dist = "pkg"
public_url = "/admin/"
# Whether to include hash values in the output file names.
filehash = false
# Control minification
minify = "on_release" # can be one of: never, on_release, always

[clean]
# The output dir for all final assets.
Expand Down
12 changes: 9 additions & 3 deletions thoth-app/src/component/work.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,15 @@ impl Component for WorkComponent {
self.doi = self.work.doi.clone().unwrap_or_default().to_string();
self.imprint_id = self.work.imprint.imprint_id;
self.work_type = self.work.work_type.clone();
self.data.imprints = body.data.imprints.to_owned();
self.data.work_types = body.data.work_types.enum_values.to_owned();
self.data.work_statuses = body.data.work_statuses.enum_values.to_owned();
body.data.imprints.clone_into(&mut self.data.imprints);
body.data
.work_types
.enum_values
.clone_into(&mut self.data.work_types);
body.data
.work_statuses
.enum_values
.clone_into(&mut self.data.work_statuses);

// If user doesn't have permission to edit this object, redirect to dashboard
if let Some(publishers) =
Expand Down
4 changes: 0 additions & 4 deletions thoth-app/src/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,6 @@ pub trait ListString {
const BULLET_SEPARATOR: &'static str = " • ";
const COMMA_SEPARATOR: &'static str = ", ";

fn separated_list_item_bullet_small(&self) -> Html {
self.separated_list_item(true, Self::BULLET_SEPARATOR)
}

fn separated_list_item_comma(&self) -> Html {
self.separated_list_item(false, Self::COMMA_SEPARATOR)
}
Expand Down
8 changes: 4 additions & 4 deletions thoth-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "thoth-client"
version = "0.12.4"
version = "0.12.5"
authors = ["Javier Arias <javi@openbookpublishers.com>", "Ross Higman <ross@openbookpublishers.com>"]
edition = "2021"
license = "Apache-2.0"
Expand All @@ -10,8 +10,8 @@ readme = "README.md"
build = "build.rs"

[dependencies]
thoth-api = {version = "=0.12.4", path = "../thoth-api" }
thoth-errors = {version = "=0.12.4", path = "../thoth-errors" }
thoth-api = {version = "=0.12.5", path = "../thoth-api" }
thoth-errors = {version = "=0.12.5", path = "../thoth-errors" }
graphql_client = "0.13.0"
chrono = { version = "0.4.31", features = ["serde"] }
reqwest = { version = "0.11", features = ["json"] }
Expand All @@ -22,4 +22,4 @@ serde_json = "1.0"
uuid = { version = "0.8.2", features = ["serde"] }

[build-dependencies]
thoth-api = { version = "=0.12.4", path = "../thoth-api", features = ["backend"] }
thoth-api = { version = "=0.12.5", path = "../thoth-api", features = ["backend"] }
2 changes: 1 addition & 1 deletion thoth-errors/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "thoth-errors"
version = "0.12.4"
version = "0.12.5"
authors = ["Javier Arias <javi@openbookpublishers.com>", "Ross Higman <ross@openbookpublishers.com>"]
edition = "2021"
license = "Apache-2.0"
Expand Down
8 changes: 4 additions & 4 deletions thoth-export-server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "thoth-export-server"
version = "0.12.4"
version = "0.12.5"
authors = ["Javier Arias <javi@openbookpublishers.com>", "Ross Higman <ross@openbookpublishers.com>"]
edition = "2021"
license = "Apache-2.0"
Expand All @@ -10,9 +10,9 @@ readme = "README.md"
build = "build.rs"

[dependencies]
thoth-api = { version = "=0.12.4", path = "../thoth-api" }
thoth-errors = { version = "=0.12.4", path = "../thoth-errors" }
thoth-client = { version = "=0.12.4", path = "../thoth-client" }
thoth-api = { version = "=0.12.5", path = "../thoth-api" }
thoth-errors = { version = "=0.12.5", path = "../thoth-errors" }
thoth-client = { version = "=0.12.5", path = "../thoth-client" }
actix-web = "4.5.1"
actix-cors = "0.7.0"
cc_license = "0.1.0"
Expand Down
44 changes: 22 additions & 22 deletions thoth-export-server/src/record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use paperclip::actix::web::HttpResponse;
use paperclip::actix::OperationModifier;
use paperclip::v2::models::{DefaultOperationRaw, Either, Response};
use paperclip::v2::schema::Apiv2Schema;
use std::fmt::Display;
use std::str::FromStr;
use thoth_client::Work;
use thoth_errors::{ThothError, ThothResult};
Expand Down Expand Up @@ -285,28 +286,27 @@ impl FromStr for MetadataSpecification {
}
}

impl ToString for MetadataSpecification {
fn to_string(&self) -> String {
match self {
MetadataSpecification::Onix3Thoth(_) => "onix_3.0::thoth".to_string(),
MetadataSpecification::Onix3ProjectMuse(_) => "onix_3.0::project_muse".to_string(),
MetadataSpecification::Onix3Oapen(_) => "onix_3.0::oapen".to_string(),
MetadataSpecification::Onix3Jstor(_) => "onix_3.0::jstor".to_string(),
MetadataSpecification::Onix3GoogleBooks(_) => "onix_3.0::google_books".to_string(),
MetadataSpecification::Onix3Overdrive(_) => "onix_3.0::overdrive".to_string(),
MetadataSpecification::Onix21EbscoHost(_) => "onix_2.1::ebsco_host".to_string(),
MetadataSpecification::Onix21ProquestEbrary(_) => {
"onix_2.1::proquest_ebrary".to_string()
}
MetadataSpecification::CsvThoth(_) => "csv::thoth".to_string(),
MetadataSpecification::JsonThoth(_) => "json::thoth".to_string(),
MetadataSpecification::KbartOclc(_) => "kbart::oclc".to_string(),
MetadataSpecification::BibtexThoth(_) => "bibtex::thoth".to_string(),
MetadataSpecification::DoiDepositCrossref(_) => "doideposit::crossref".to_string(),
MetadataSpecification::Marc21RecordThoth(_) => "marc21record::thoth".to_string(),
MetadataSpecification::Marc21MarkupThoth(_) => "marc21markup::thoth".to_string(),
MetadataSpecification::Marc21XmlThoth(_) => "marc21xml::thoth".to_string(),
}
impl Display for MetadataSpecification {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let str = match self {
MetadataSpecification::Onix3Thoth(_) => "onix_3.0::thoth",
MetadataSpecification::Onix3ProjectMuse(_) => "onix_3.0::project_muse",
MetadataSpecification::Onix3Oapen(_) => "onix_3.0::oapen",
MetadataSpecification::Onix3Jstor(_) => "onix_3.0::jstor",
MetadataSpecification::Onix3GoogleBooks(_) => "onix_3.0::google_books",
MetadataSpecification::Onix3Overdrive(_) => "onix_3.0::overdrive",
MetadataSpecification::Onix21EbscoHost(_) => "onix_2.1::ebsco_host",
MetadataSpecification::Onix21ProquestEbrary(_) => "onix_2.1::proquest_ebrary",
MetadataSpecification::CsvThoth(_) => "csv::thoth",
MetadataSpecification::JsonThoth(_) => "json::thoth",
MetadataSpecification::KbartOclc(_) => "kbart::oclc",
MetadataSpecification::BibtexThoth(_) => "bibtex::thoth",
MetadataSpecification::DoiDepositCrossref(_) => "doideposit::crossref",
MetadataSpecification::Marc21RecordThoth(_) => "marc21record::thoth",
MetadataSpecification::Marc21MarkupThoth(_) => "marc21markup::thoth",
MetadataSpecification::Marc21XmlThoth(_) => "marc21xml::thoth",
};
write!(f, "{}", str)
}
}

Expand Down

0 comments on commit eea2282

Please sign in to comment.