Skip to content

Commit

Permalink
Fix some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sterliakov committed Dec 19, 2023
1 parent babefff commit 00ebf4d
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 71 deletions.
37 changes: 13 additions & 24 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,9 @@ cargo tarpaulin --out Html
```

You will find coverage in `tarpaulin-report.html` (gitignored) file at the root
of repository.
of repository. CI does this automatically, so you may not need to execute this locally.


## Examples
Do you want to help show off some ways for how the library works? Feel free to
work on an example and open up a PR!

[install Rust]: http://rust-lang.org/install.html

To run the tests:

```bash
$ cargo test
```

## Types of Contributions

### Report Bugs
Expand Down Expand Up @@ -151,20 +139,21 @@ Before you submit a pull request, check that it meets these guidelines:
## Deploying
A reminder for the maintainers on how to deploy.
Make sure all your changes are committed (including an entry in `CHANGELOG.md`).
*First-time only*: to update `git push` to push both the commits and tags simultaneously, run this command
as mentioned in [this post](https://stackoverflow.com/questions/3745135/push-git-commits-tags-simultaneously):
First, create a release branch from `master` and bump a version there, open a release PR:
```shell
$ git config --global push.followTags true
$ git checkout master
$ git pull origin master
$ git switch -c release/x.y.z
$ cargo bump patch # possible: major / minor / patch
$ git push
$ gh pr create --title 'Release x.y.z' # Or go via github GUI
```
Then run:
When all checks are green, merge it into `master`. Wait for tests to pass and create a tag to trigger automated release:
```shell
$ cargo bump patch --git-tag # possible: major / minor / patch
$ git push
$ git checkout master
$ git pull origin master
$ git tag vx.y.z
$ git push --tags
```
GitHub Actions will then deploy to [crates.io](https://crates.io/) if tests pass,
once code is merged to the `main` branch.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# thor-devkit.rs

![Crates.io](https://img.shields.io/crates/v/thor-devkit?logo=rust)
![docs.rs](https://img.shields.io/docsrs/thor-devkit)
![Build](https://img.shields.io/github/actions/workflow/status/sterliakov/thor-devkit.rs/build.yml?logo=github)
![Test](https://img.shields.io/github/actions/workflow/status/sterliakov/thor-devkit.rs/test.yml?logo=github&label=test)
![Codecov](https://img.shields.io/codecov/c/github/sterliakov/thor-devkit.rs)
[![Crates.io](https://img.shields.io/crates/v/thor-devkit?logo=rust)](https://crates.io/crates/thor-devkit)
[![docs.rs](https://img.shields.io/docsrs/thor-devkit)](https://docs.rs/thor-devkit)
[![Build](https://img.shields.io/github/actions/workflow/status/sterliakov/thor-devkit.rs/build.yml?logo=github)](https://github.com/sterliakov/thor-devkit.rs/actions?query=branch%3Amaster&workflow%3abuild)
[![Test](https://img.shields.io/github/actions/workflow/status/sterliakov/thor-devkit.rs/test.yml?logo=github&label=test)](https://github.com/sterliakov/thor-devkit.rs/actions?query=branch%3Amaster&workflow%3atest)
[![Codecov](https://img.shields.io/codecov/c/github/sterliakov/thor-devkit.rs)](https://app.codecov.io/gh/sterliakov/thor-devkit.rs)

<!-- cargo-rdme start -->

Rust library to aid coding with VeChain, eg. Wallets/Tx/Sign/Verify.
Rust library to aid coding with VeChain: wallets, transactions signing,
encoding and verification, smart contract ABI interfacing, etc.

This library acts primary as a proxy to several underlying libraries,
with the addition of some VeChain-specific toolchain components.
Expand Down Expand Up @@ -58,7 +59,7 @@ println!("{:02x?}", signed.to_broadcastable_bytes());

### Examples

You can check out sample usage of this crate in the [examples/](https://github.com/sterliakov/thor-devkit/tree/main/examples)
You can check out sample usage of this crate in the [examples/](https://github.com/sterliakov/thor-devkit.rs/tree/master/examples)
folder in the project repo on GitHub.

### Readme Docs
Expand All @@ -67,7 +68,7 @@ You can find the crate's readme documentation on the
[crates.io] page, or alternatively in the [`README.md`] file on the GitHub project repo.

[crates.io]: https://crates.io/crates/thor-devkit
[`README.md`]: https://github.com/sterliakov/thor-devkit
[`README.md`]: https://github.com/sterliakov/thor-devkit.rs


### Contributing
Expand All @@ -78,11 +79,11 @@ to discuss a new feature or change.
Check out the [Contributing][] section in the docs for more info.

[Contributing]: CONTRIBUTING.md
[open an issue]: https://github.com/sterliakov/thor-devkit/issues
[open an issue]: https://github.com/sterliakov/thor-devkit.rs/issues

### License

This project is proudly licensed under the GNU General Public License v3 ([LICENSE](LICENSE).
This project is proudly licensed under the GNU General Public License v3 ([LICENSE](LICENSE)).

`thor-devkit` can be distributed according to the GNU General Public License v3. Contributions
will be accepted under the same license.
Expand Down
38 changes: 6 additions & 32 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,27 @@
# Examples

This folder contains example scripts that can be used to interact with
the `thor-devkit.rs` crate.
the `thor-devkit` crate.

## Quickstart

[cargo-rx]: https://github.com/rnag/cargo-rx

Install my crate [cargo-rx], which abstracts away `cargo run --example`.
This provides a single `rx` command.
Start out by cloning the GitHub project:

```shell
❯❯ cargo install cargo-rx
```

Now start out by cloning the GitHub project:

```shell
❯❯ git clone https://github.com/sterliakov/thor-devkit.rs.git
$ git clone https://github.com/sterliakov/thor-devkit.rs.git
```

Then, simply `cd` into the project folder:

```shell
❯❯ cd thor-devkit.rs
$ cd thor-devkit.rs
```

From here, you can use `rx` to build and run
From here, you can use `cargo run` to build and run
any of the examples individually.

In particular, here's a sample usage of running `examples/my_example.rs`:

```shell
❯❯ rx my_example
```

If you run the command without any arguments, you can select
from the list of available examples:

```shell
❯❯ rx
```

To pass arguments to a script, you can include them after the `--`.

For instance, here's an example of passing arguments to the `my_example` script:

```shell
❯❯ rx my_example -- \
-n "My Name" \
--my-arg 123
$ cargo run --example my_example
```
11 changes: 6 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#![warn(rust_2018_idioms, missing_docs)]
#![deny(dead_code, unused_imports, unused_mut)]

//! Rust library to aid coding with VeChain, eg. Wallets/Tx/Sign/Verify.
//! Rust library to aid coding with VeChain: wallets, transactions signing,
//! encoding and verification, smart contract ABI interfacing, etc.
//!
//! This library acts primary as a proxy to several underlying libraries,
//! with the addition of some VeChain-specific toolchain components.
Expand Down Expand Up @@ -52,7 +53,7 @@
//!
//! ## Examples
//!
//! You can check out sample usage of this crate in the [examples/](https://github.com/sterliakov/thor-devkit/tree/main/examples)
//! You can check out sample usage of this crate in the [examples/](https://github.com/sterliakov/thor-devkit.rs/tree/master/examples)
//! folder in the project repo on GitHub.
//!
//! ## Readme Docs
Expand All @@ -61,7 +62,7 @@
//! [crates.io] page, or alternatively in the [`README.md`] file on the GitHub project repo.
//!
//! [crates.io]: https://crates.io/crates/thor-devkit
//! [`README.md`]: https://github.com/sterliakov/thor-devkit
//! [`README.md`]: https://github.com/sterliakov/thor-devkit.rs
//!
//!
//! ## Contributing
Expand All @@ -72,11 +73,11 @@
//! Check out the [Contributing][] section in the docs for more info.
//!
//! [Contributing]: CONTRIBUTING.md
//! [open an issue]: https://github.com/sterliakov/thor-devkit/issues
//! [open an issue]: https://github.com/sterliakov/thor-devkit.rs/issues
//!
//! ## License
//!
//! This project is proudly licensed under the GNU General Public License v3 ([LICENSE](LICENSE).
//! This project is proudly licensed under the GNU General Public License v3 ([LICENSE](LICENSE)).
//!
//! `thor-devkit` can be distributed according to the GNU General Public License v3. Contributions
//! will be accepted under the same license.
Expand Down

0 comments on commit 00ebf4d

Please sign in to comment.