From a170bf5600ce274dffb85b4cec6a860bfefbfa66 Mon Sep 17 00:00:00 2001
From: sripwoud
Date: Fri, 12 Jul 2024 10:27:43 +0200
Subject: [PATCH] chore: remove example crate (#6)
* ci: fix docs workflow paths trigger
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index d0badd1..798257a 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -2,7 +2,7 @@ name: docs
on:
push:
branches: [main]
- paths: ['src/**/*.rs', 'Cargo.toml', '.github/workflows/docs.yml']
+ paths: ['crates/**/*.rs', '**/Cargo.toml', '.github/workflows/docs.yml']
workflow_dispatch:
permissions:
@@ -22,8 +22,8 @@ jobs:
run: |
make build.docs
# we need an index.html page (cargo doc doesn't create it)
- # this will just redirect to target/doc/example/index.html
- echo '' > target/doc/index.html
+ # this will just redirect to target/doc/imt/index.html
+ echo '' > target/doc/index.html
- uses: actions/upload-pages-artifact@v3
with:
path: target/doc
* chore: remove example crate
---
.github/workflows/docs.yml | 6 ++---
crates/example/Cargo.toml | 17 --------------
crates/example/LICENSE | 21 ------------------
crates/example/README.md | 45 --------------------------------------
crates/example/src/lib.rs | 15 -------------
5 files changed, 3 insertions(+), 101 deletions(-)
delete mode 100644 crates/example/Cargo.toml
delete mode 100644 crates/example/LICENSE
delete mode 100644 crates/example/README.md
delete mode 100644 crates/example/src/lib.rs
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index d0badd1..798257a 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -2,7 +2,7 @@ name: docs
on:
push:
branches: [main]
- paths: ['src/**/*.rs', 'Cargo.toml', '.github/workflows/docs.yml']
+ paths: ['crates/**/*.rs', '**/Cargo.toml', '.github/workflows/docs.yml']
workflow_dispatch:
permissions:
@@ -22,8 +22,8 @@ jobs:
run: |
make build.docs
# we need an index.html page (cargo doc doesn't create it)
- # this will just redirect to target/doc/example/index.html
- echo '' > target/doc/index.html
+ # this will just redirect to target/doc/imt/index.html
+ echo '' > target/doc/index.html
- uses: actions/upload-pages-artifact@v3
with:
path: target/doc
diff --git a/crates/example/Cargo.toml b/crates/example/Cargo.toml
deleted file mode 100644
index 4674cf7..0000000
--- a/crates/example/Cargo.toml
+++ /dev/null
@@ -1,17 +0,0 @@
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
-
-[package]
-name = "example"
-version = "0.1.0"
-authors = ["Pinco"]
-categories = ["cryptography"]
-documentation = "https://docs.rs/example"
-edition = "2021"
-homepage = "https://arkworks.rs"
-include = ["Cargo.toml", "src", "README.md", "LICENSE"]
-keywords = ["cryptography", "finite-fields", "elliptic-curves"]
-license = "MIT"
-repository = "privacy-scaling-explorations/zk-kit.rust"
-description = "Just an example."
-
-[dependencies]
diff --git a/crates/example/LICENSE b/crates/example/LICENSE
deleted file mode 100644
index 1763b4d..0000000
--- a/crates/example/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2024 Pinco
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/crates/example/README.md b/crates/example/README.md
deleted file mode 100644
index cdc70eb..0000000
--- a/crates/example/README.md
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
- Example
-
- Just an example.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Longer description here.
-
----
-
-## 🛠 Install
-
-Install the `example` crate with Cargo:
-
-```bash
-cargo add example
-```
-
-## 📜 Usage
-
-...
diff --git a/crates/example/src/lib.rs b/crates/example/src/lib.rs
deleted file mode 100644
index adbc56f..0000000
--- a/crates/example/src/lib.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-/// Adds two numbers together
-pub fn add(left: usize, right: usize) -> usize {
- left + right
-}
-
-#[cfg(test)]
-mod tests {
- use super::*;
-
- #[test]
- fn it_works() {
- let result = add(2, 2);
- assert_eq!(result, 4);
- }
-}