Skip to content

Commit

Permalink
Merge branch 'release/v0.6.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
ja573 committed Dec 13, 2021
2 parents 26286e2 + acd4c07 commit 2e5fa76
Show file tree
Hide file tree
Showing 17 changed files with 2,726 additions and 1,960 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [[0.6.1]](https://github.com/thoth-pub/thoth/releases/tag/v0.6.1) - 2021-12-13
### Changed
- Removed redundant closures and `impl`s to comply with [`rustc 1.57.0`](https://github.com/rust-lang/rust/releases/tag/1.57.0)

### Fixed
- [#309](https://github.com/thoth-pub/thoth/issues/309) - Update Thema codes to v1.4

## [[0.6.0]](https://github.com/thoth-pub/thoth/releases/tag/v0.6.0) - 2021-11-29
### Added
- [#92](https://github.com/thoth-pub/thoth/issues/92) - Implement institution table, replacing funder and standardising contributor affiliations
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.6.0"
version = "0.6.1"
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.6.0", path = "thoth-api", features = ["backend"] }
thoth-api-server = { version = "0.6.0", path = "thoth-api-server" }
thoth-app-server = { version = "0.6.0", path = "thoth-app-server" }
thoth-errors = { version = "0.6.0", path = "thoth-errors" }
thoth-export-server = { version = "0.6.0", path = "thoth-export-server" }
thoth-api = { version = "0.6.1", path = "thoth-api", features = ["backend"] }
thoth-api-server = { version = "0.6.1", path = "thoth-api-server" }
thoth-app-server = { version = "0.6.1", path = "thoth-app-server" }
thoth-errors = { version = "0.6.1", path = "thoth-errors" }
thoth-export-server = { version = "0.6.1", path = "thoth-export-server" }
clap = "2.33.3"
dialoguer = "0.7.1"
dotenv = "0.9.0"
Expand Down
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,50 @@ cd thoth
cp .env.example .env # Edit the credentials in .env
```

#### Creating Postgres DB and User

```
psql
psql -U postgres
CREATE ROLE thoth SUPERUSER LOGIN PASSWORD 'thoth';
CREATE DATABASE thoth WITH OWNER thoth;
```

Exit the psql command line with:

```\q```

An example of a .env file:

```
THOTH_GRAPHQL_API=http://localhost:8000
# THOTH_EXPORT_API is used at compile time, must be a public facing URL
THOTH_EXPORT_API=http://localhost:8181
# Authentication cookie domain
THOTH_DOMAIN=localhost
# Full postgres URL (With the role and db we created in the orevious step, it will look like this)
DATABASE_URL=postgres://thoth:thoth@localhost/thoth
# Authentication cookie secret key (can be any string really)
SECRET_KEY=we_like_s%_books_255
# Logging level
RUST_LOG=info
```
Proceed to install **Wasm**
```
cargo install wasm-pack
```
Install **rollup**:

```
sudo npm install --global rollup
```

Export the ENV variables, **THOTH_GRAPHQL_API** and **THOTH_EXPORT_API**:
```
export THOTH_GRAPHQL_API=http://localhost:8000
export THOTH_EXPORT_API=http://localhost:8181
```

#### API

```sh
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.6.0"
version = "0.6.1"
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.6.0", path = "../thoth-api", features = ["backend"] }
thoth-errors = { version = "0.6.0", path = "../thoth-errors" }
thoth-api = { version = "0.6.1", path = "../thoth-api", features = ["backend"] }
thoth-errors = { version = "0.6.1", 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.6.0"
version = "0.6.1"
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.6.0", path = "../thoth-errors" }
thoth-errors = { version = "0.6.1", path = "../thoth-errors" }
actix-web = { version = "3.3.2", optional = true }
argon2rs = "0.2.5"
isbn2 = "0.4.0"
Expand Down
32 changes: 4 additions & 28 deletions thoth-api/src/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub enum LengthUnit {
description = r#"Digital Object Identifier. Expressed as `^https:\/\/doi\.org\/10\.\d{4,9}\/[-._\;\(\)\/:a-zA-Z0-9]+$`"#
)
)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)]
pub struct Doi(String);

#[cfg_attr(
Expand All @@ -44,7 +44,7 @@ pub struct Doi(String);
description = "13-digit International Standard Book Number, with its parts separated by hyphens"
)
)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)]
pub struct Isbn(String);

#[cfg_attr(
Expand All @@ -54,7 +54,7 @@ pub struct Isbn(String);
description = r#"ORCID (Open Researcher and Contributor ID) identifier. Expressed as `^https:\/\/orcid\.org\/0000-000(1-[5-9]|2-[0-9]|3-[0-4])\d{3}-\d{3}[\dX]$`"#
)
)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)]
pub struct Orcid(String);

#[cfg_attr(
Expand All @@ -64,7 +64,7 @@ pub struct Orcid(String);
description = r#"ROR (Research Organization Registry) identifier. Expressed as `^https:\/\/ror\.org\/0[a-hjkmnp-z0-9]{6}\d{2}$`"#
)
)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)]
pub struct Ror(String);

#[cfg_attr(
Expand All @@ -81,30 +81,6 @@ impl Default for LengthUnit {
}
}

impl Default for Doi {
fn default() -> Doi {
Doi(Default::default())
}
}

impl Default for Isbn {
fn default() -> Isbn {
Isbn(Default::default())
}
}

impl Default for Orcid {
fn default() -> Orcid {
Orcid(Default::default())
}
}

impl Default for Ror {
fn default() -> Ror {
Ror(Default::default())
}
}

impl Default for Timestamp {
fn default() -> Timestamp {
Timestamp(TimeZone::timestamp(&Utc, 0, 0))
Expand Down
Loading

0 comments on commit 2e5fa76

Please sign in to comment.