Skip to content

Commit

Permalink
Merge branch 'release/v0.9.8'
Browse files Browse the repository at this point in the history
  • Loading branch information
ja573 committed Feb 14, 2023
2 parents 89e287f + b91a525 commit 4a97b74
Show file tree
Hide file tree
Showing 20 changed files with 196 additions and 41 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build_test_and_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.16.0'
node-version: '18.13.0'
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: jetli/wasm-pack-action@v0.3.0
with:
version: 'v0.10.3'
- name: Install rollup
run: sudo npm install -g rollup@2.77.2
run: sudo npm install -g rollup@3.12.0
- name: Compile WASM
run: wasm-pack build thoth-app/ --target web --release
- name: Pack APP
Expand All @@ -59,15 +59,15 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.16.0'
node-version: '18.13.0'
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: jetli/wasm-pack-action@v0.3.0
with:
version: 'v0.10.3'
- name: Install rollup
run: sudo npm install -g rollup@2.77.2
run: sudo npm install -g rollup@3.12.0
- name: Compile WASM
run: wasm-pack build thoth-app/ --target web --release
- name: Pack APP
Expand All @@ -88,15 +88,15 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.16.0'
node-version: '18.13.0'
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: jetli/wasm-pack-action@v0.3.0
with:
version: 'v0.10.3'
- name: Install rollup
run: sudo npm install -g rollup@2.77.2
run: sudo npm install -g rollup@3.12.0
- name: Compile WASM
run: wasm-pack build thoth-app/ --target web --release
- name: Pack APP
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/run_migrations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: run-migrations

on:
push:
branches:
- master
- develop
paths:
- '**up.sql'
- '**down.sql'
- '**db.rs'
pull_request:
paths:
- '**up.sql'
- '**down.sql'
- '**db.rs'
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
THOTH_GRAPHQL_API: https://api.thoth.pub
THOTH_EXPORT_API: https://export.thoth.pub
DATABASE_URL: postgres://thoth:thoth@localhost:5432/thoth

jobs:
run_migrations:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12
env:
POSTGRES_PASSWORD: thoth
POSTGRES_DB: thoth
POSTGRES_USER: thoth
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18.13.0'
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: jetli/wasm-pack-action@v0.3.0
with:
version: 'v0.10.3'
- name: Install rollup
run: sudo npm install -g rollup@3.12.0
- name: Compile WASM
run: wasm-pack build thoth-app/ --target web --release
- name: Pack APP
run: rollup thoth-app/main.js --format iife --file thoth-app/pkg/thoth_app.js
- name: Build binary
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose
- name: Run migrations
uses: actions-rs/cargo@v1
with:
command: run
args: migrate
22 changes: 22 additions & 0 deletions .github/workflows/run_migrations_no_action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: run-migrations

on:
push:
branches:
- master
- develop
paths-ignore:
- '**up.sql'
- '**down.sql'
- '**db.rs'
pull_request:
paths-ignore:
- '**up.sql'
- '**down.sql'
- '**db.rs'

jobs:
run_migrations:
runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [[0.9.8]](https://github.com/thoth-pub/thoth/releases/tag/v0.9.8) - 2023-02-14
### Changed
- Replace generic error with actual message when migrations fail
- Upgrade node and rollup in github actions

### Added
- Github action to check that all migrations run successfully
- About page with organisation information

## [[0.9.7]](https://github.com/thoth-pub/thoth/releases/tag/v0.9.7) - 2023-02-02
### Fixed
- Correct wrong fields used in `0.9.6` migration
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.9.7"
version = "0.9.8"
authors = ["Javier Arias <javi@openbookpublishers.com>", "Ross Higman <ross@openbookpublishers.com>"]
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.9.7", path = "thoth-api", features = ["backend"] }
thoth-api-server = { version = "0.9.7", path = "thoth-api-server" }
thoth-app-server = { version = "0.9.7", path = "thoth-app-server" }
thoth-errors = { version = "0.9.7", path = "thoth-errors" }
thoth-export-server = { version = "0.9.7", path = "thoth-export-server" }
thoth-api = { version = "0.9.8", path = "thoth-api", features = ["backend"] }
thoth-api-server = { version = "0.9.8", path = "thoth-api-server" }
thoth-app-server = { version = "0.9.8", path = "thoth-app-server" }
thoth-errors = { version = "0.9.8", path = "thoth-errors" }
thoth-export-server = { version = "0.9.8", path = "thoth-export-server" }
clap = "2.33.3"
dialoguer = "0.7.1"
dotenv = "0.15.0"
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.9.7"
version = "0.9.8"
authors = ["Javier Arias <javi@openbookpublishers.com>", "Ross Higman <ross@openbookpublishers.com>"]
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.9.7", path = "../thoth-api", features = ["backend"] }
thoth-errors = { version = "0.9.7", path = "../thoth-errors" }
thoth-api = { version = "0.9.8", path = "../thoth-api", features = ["backend"] }
thoth-errors = { version = "0.9.8", path = "../thoth-errors" }
actix-web = "4.0.1"
actix-cors = "0.6.0"
actix-identity = "0.4.0"
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.9.7"
version = "0.9.8"
authors = ["Javier Arias <javi@openbookpublishers.com>", "Ross Higman <ross@openbookpublishers.com>"]
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.9.7", path = "../thoth-errors" }
thoth-errors = { version = "0.9.8", path = "../thoth-errors" }
actix-web = { version = "4.0.1", optional = true }
argon2rs = "0.2.5"
isbn2 = "0.4.0"
Expand Down
4 changes: 1 addition & 3 deletions thoth-api/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ pub fn run_migrations() -> ThothResult<()> {
let mut connection = establish_connection().get().unwrap();
match connection.run_pending_migrations(MIGRATIONS) {
Ok(_) => Ok(()),
Err(_) => Err(ThothError::DatabaseError(
"Could not run migrations".to_string(),
)),
Err(error) => Err(ThothError::DatabaseError(error.to_string())),
}
}
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.9.7"
version = "0.9.8"
authors = ["Javier Arias <javi@openbookpublishers.com>", "Ross Higman <ross@openbookpublishers.com>"]
edition = "2018"
license = "Apache-2.0"
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.9.7"
version = "0.9.8"
authors = ["Javier Arias <javi@openbookpublishers.com>", "Ross Higman <ross@openbookpublishers.com>"]
edition = "2018"
license = "Apache-2.0"
Expand Down Expand Up @@ -41,5 +41,5 @@ 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.9.7", path = "../thoth-api" }
thoth-errors = { version = "0.9.7", path = "../thoth-errors" }
thoth-api = { version = "0.9.8", path = "../thoth-api" }
thoth-errors = { version = "0.9.8", path = "../thoth-errors" }
2 changes: 1 addition & 1 deletion thoth-app/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"start_url": "/?homescreen=1",
"background_color": "#ffffff",
"theme_color": "#ffdd57",
"version": "0.9.7",
"version": "0.9.8",
"icons": [
{
"src": "\/android-icon-36x36.png",
Expand Down
42 changes: 42 additions & 0 deletions thoth-app/src/component/about.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
use yew::html;
use yew::prelude::*;

pub struct AboutComponent {}

impl Component for AboutComponent {
type Message = ();
type Properties = ();

fn create(_ctx: &Context<Self>) -> Self {
AboutComponent {}
}

fn view(&self, _ctx: &Context<Self>) -> Html {
html! {
<div class="container">
<h1 class="title">{ "About Us" }</h1>
<div class="content">
<p>{ "Thoth is an open metadata management and dissemination platform. As an organisation, we are focused on:" }</p>
<ul>
<li>{ "creation, curation, and dissemination of high-quality metadata records which are essential for the advancement of public knowledge;" }</li>
<li>{ "promoting openness in scholarly communications such as open access, open licensing, FLOSS, open data, open metadata, and open standards and protocols;" }</li>
<li>{ "embracing infrastructural and platform diversity as an inherent component of a flourishing scholarly communications landscape;" }</li>
<li>{ "providing high-quality solutions and services for metadata creation, management, dissemination, archiving and preservation." }</li>
</ul>
<p>{ "Thoth has been developed by Javier Arias in the context of the Community-led Open Publication Infrastructures for Monographs (COPIM) project funded by UKRI and the Arcadia Fund." }</p>
<p>{ "Thoth is incorporated as a Community Interest Company in the UK, no. 14549556." }</p>
<p>{ "Address: 40 Devonshire Road, Cambridge, United Kingdom, CB1 2BL" }</p>
<p class="title is-5">{ "Organisation" }</p>
<ul>
<li>{ "Joe Deville (Director)" }</li>
<li>{ "Rupert Gatti (Director)" }</li>
<li>{ "Vincent W.J. van Gerven Oei (Director)" }</li>
<li>{ "Javier Arias (CTO)" }</li>
<li>{ "Ross Higman (Software Engineer)" }</li>
</ul>
<p>{ "Support us through the " }<a href={ "https://www.openbookcollective.org/packages/20/info/" }>{ "Open Book Collective" }</a>{ "." }</p>
</div>
</div>
}
}
}
1 change: 1 addition & 0 deletions thoth-app/src/component/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ impl ToElementValue for Option<chrono::NaiveDate> {
}
}

pub mod about;
pub mod admin;
pub mod affiliations_form;
pub mod books;
Expand Down
Loading

0 comments on commit 4a97b74

Please sign in to comment.