Skip to content

Commit

Permalink
Breaking: Rename the crate to quil-rs for crates.io publishing (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanty authored Oct 19, 2021
1 parent 9368426 commit 3cbbd02
Show file tree
Hide file tree
Showing 24 changed files with 128 additions and 25 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/msrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,11 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
args: -- -D warnings

deny:
name: Deny
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: EmbarkStudios/cargo-deny-action@v1
22 changes: 15 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,22 @@ jobs:
node-version: 12
- name: Install Semantic Release Dependencies
run: npm install

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Install semantic-release-rust
uses: actions-rs/cargo@v1
with:
command: install
args: semantic-release-rust --version 1.0.0-alpha.8

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
run: npx semantic-release
# - uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# - uses: actions-rs/cargo@v1
# with:
# command: build
# args: --release --all-features
7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[package]
name = "quil"
name = "quil-rs"
description = "Rust tooling for Quil (Quantum Instruction Language)"
version = "0.7.0"
authors = ["kalzoo <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
repository = "https://github.com/rigetti/quil-rust"
keywords = ["Quil", "Quantum", "Rigetti"]
categories = ["parser-implementations", "science", "compilers", "emulators"]

[dependencies]
indexmap = "1.6.1"
Expand Down
95 changes: 95 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# This template contains all of the possible sections and their default values

# Note that all fields that take a lint level have these possible values:
# * deny - An error will be produced and the check will fail
# * warn - A warning will be produced, but the check will not fail
# * allow - No warning or error will be produced, though in some cases a note
# will be

# This section is considered when running `cargo deny check advisories`
# More documentation for the advisories section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html
[advisories]
# The path where the advisory database is cloned/fetched into
db-path = "~/.cargo/advisory-db"
# The url(s) of the advisory databases to use
db-urls = ["https://github.com/rustsec/advisory-db"]
# The lint level for security vulnerabilities
vulnerability = "deny"
# The lint level for unmaintained crates
unmaintained = "deny"
# The lint level for crates that have been yanked from their source registry
yanked = "deny"
# The lint level for crates with security notices.
notice = "deny"
# A list of advisory IDs to ignore. Note that ignored advisories will still
# output a note when they are encountered.
ignore = [
#"RUSTSEC-0000-0000",
]

# This section is considered when running `cargo deny check licenses`
# More documentation for the licenses section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/licenses/cfg.html
[licenses]
unlicensed = "deny"
allow = [
"Apache-2.0",
"MIT",
]
# List of explictly disallowed licenses
# See https://spdx.org/licenses/ for list of possible licenses
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
deny = [
#"Nokia",
]
# Lint level for licenses considered copyleft
copyleft = "deny"
# Blanket approval or denial for OSI-approved or FSF Free/Libre licenses
# * both - The license will be approved if it is both OSI-approved *AND* FSF
# * either - The license will be approved if it is either OSI-approved *OR* FSF
# * osi-only - The license will be approved if is OSI-approved *AND NOT* FSF
# * fsf-only - The license will be approved if is FSF *AND NOT* OSI-approved
# * neither - This predicate is ignored and the default lint level is used
allow-osi-fsf-free = "neither"
# Lint level used when no other predicates are matched
# 1. License isn't in the allow or deny lists
# 2. License isn't copyleft
# 3. License isn't OSI/FSF, or allow-osi-fsf-free = "neither"
default = "deny"
# The confidence threshold for detecting a license from license text.
# The higher the value, the more closely the license text must be to the
# canonical license text of a valid SPDX license file.
# [possible values: any between 0.0 and 1.0].
confidence-threshold = 0.8

[licenses.private]
# If true, ignores workspace crates that aren't published, or are only
# published to private registries
ignore = true

# This section is considered when running `cargo deny check bans`.
# More documentation about the 'bans' section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html
[bans]
multiple-versions = "deny"
wildcards = "deny"
highlight = "all"
skip-tree = [
{ name = "syn", version = "*", depth = 5 }, # Used in both serde_derive and proptest-derive
{ name = "quick-error", version = "*" }, # proptest relies on two versions of this
]

# This section is considered when running `cargo deny check sources`.
# More documentation about the 'sources' section can be found here:
# https://embarkstudios.github.io/cargo-deny/checks/sources/cfg.html
[sources]
# Lint level for what to happen when a crate from a crate registry that is not
# in the allow list is encountered
unknown-registry = "deny"
# Lint level for what to happen when a crate from a git repository that is not
# in the allow list is encountered
unknown-git = "deny"
# List of URLs for allowed crate registries. Defaults to the crates.io index
# if not specified. If it is specified but empty, no registries are allowed.
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"preset": "eslint"
}],
["@semantic-release/exec",{
"prepareCmd": "sh prepare_release.sh ${nextRelease.version}"
"verifyConditionsCmd": "semantic-release-rust verify-conditions",
"prepareCmd": "semantic-release-rust prepare ${nextRelease.version}",
"publishCmd": "semantic-release-rust publish"
}],
"@semantic-release/github",
["@semantic-release/git", {
Expand Down
12 changes: 0 additions & 12 deletions prepare_release.sh

This file was deleted.

4 changes: 2 additions & 2 deletions src/expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ impl Expression {
/// # Example
///
/// ```rust
/// use quil::expression::Expression;
/// use quil_rs::expression::Expression;
/// use std::str::FromStr;
/// use num_complex::Complex64;
///
Expand Down Expand Up @@ -244,7 +244,7 @@ impl Expression {
/// # Example
///
/// ```rust
/// use quil::expression::Expression;
/// use quil_rs::expression::Expression;
/// use std::str::FromStr;
/// use std::collections::HashMap;
/// use num_complex::Complex64;
Expand Down

0 comments on commit 3cbbd02

Please sign in to comment.