Skip to content

Commit

Permalink
Merge pull request #30 from nfwvogt/main
Browse files Browse the repository at this point in the history
deactivating code generation on docs-rs
  • Loading branch information
kbarkhqs authored Jul 1, 2021
2 parents 4163319 + ab1c0ad commit 4fed09c
Show file tree
Hide file tree
Showing 12 changed files with 2,202 additions and 32 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:
- name: setup cargo
run: |
cargo login ${{ secrets.CRATES_IO_API_TOKEN }}
cargo publish --manifest-path=roqoqo-derive/Cargo.toml --no-verify
cargo publish --manifest-path=roqoqo-derive/Cargo.toml
sleep 30
cargo publish --manifest-path=roqoqo/Cargo.toml --no-verify
sleep 30
cargo publish --manifest-path=qoqo-macros/Cargo.toml --no-verify
cargo publish --manifest-path=qoqo-macros/Cargo.toml
sleep 30
cargo publish --manifest-path=qoqo/Cargo.toml --no-verify
sleep 30
cargo publish --manifest-path=roqoqo-test/Cargo.toml --no-verify
cargo publish --manifest-path=roqoqo-test/Cargo.toml
deploy_pypi_manylinux:
needs: deploy_cratesio
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ target/*
*.json
*.yaml
.vscode/*
roqoqo/src/operations/_auto_generated_operations.rs
qoqo/src/operations/_auto_generated_operation_conversion.rs
*.profraw
*.lcov
10 changes: 5 additions & 5 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion qoqo-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[package]
name = "qoqo-macros"
version = "0.1.0"
version = "0.1.1"
authors = ["HQS Quantum Simulations <[email protected]>"]
license = "Apache-2.0"
readme = "../README.md"
edition = "2018"
categories = ["science", "simulation"]
description = "Macros for the qoqo crate"
Expand Down
3 changes: 2 additions & 1 deletion qoqo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[package]
name = "qoqo"
version = "0.4.0"
version = "0.4.1"
authors = ["HQS Quantum Simulations <[email protected]>"]
license = "Apache-2.0"
readme = "../README.md"
edition = "2018"
categories = ["science", "simulation","ffi"]
description = "Quantum computing circuit toolkit. Python interface of roqoq"
Expand Down
23 changes: 13 additions & 10 deletions qoqo/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,16 +260,19 @@ fn main() {
}
};
let final_str = format!("{}", final_quote);
// Write to file
fs::write(
"src/operations/_auto_generated_operation_conversion.rs",
final_str,
)
.expect("Could not write to file");
// Try to format auto generated operations
let _unused_output = Command::new("rustfmt")
.arg("src/operations/_auto_generated_operation_conversion.rs")
.output();
// Don't write to file when running on docs.rs
if std::env::var("DOCS_RS").is_err() {
// Write to file
fs::write(
"src/operations/_auto_generated_operation_conversion.rs",
final_str,
)
.expect("Could not write to file");
// Try to format auto generated operations
let _unused_output = Command::new("rustfmt")
.arg("src/operations/_auto_generated_operation_conversion.rs")
.output();
}
}

fn extract_fields_with_types(input_fields: Fields) -> Vec<(Ident, Option<String>, Type)> {
Expand Down
Loading

0 comments on commit 4fed09c

Please sign in to comment.