Skip to content

Commit 4363928

Browse files
authored
Enhance README documentation and add CI jobs (#10)
* Add more additional info and status badges to the README. * Add CI jobs covering `ubuntu`, `windows`, `macos` with `stable`, `beta`, `nightly` toolchains, and some other misc CI jobs.
1 parent ab433a5 commit 4363928

15 files changed

+422
-137
lines changed

.github/workflows/build.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: 🔨 Build
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ["main", "develop"]
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-latest]
16+
toolchain: [stable, beta, nightly]
17+
name: 🔨 Build release
18+
runs-on: ${{ matrix.os }}
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Install latest ${{ matrix.toolchain }}
22+
uses: actions-rs/toolchain@v1
23+
with:
24+
toolchain: ${{ matrix.toolchain }}
25+
- uses: actions/cache@v3
26+
with:
27+
path: |
28+
~/.cargo/bin/
29+
~/.cargo/registry/index/
30+
~/.cargo/registry/cache/
31+
~/.cargo/git/db/
32+
target/
33+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
34+
- name: Build release
35+
run: cargo build --release
36+

.github/workflows/checks.yml

-106
This file was deleted.

.github/workflows/docs.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: 📄 Build docs
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ["main", "develop"]
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
docs:
13+
name: 📄 Build docs
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Build docs
18+
run: cargo doc --verbose

.github/workflows/format.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 👔 Check formatting
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ["main", "develop"]
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
check_format:
13+
name: 👔 Check formatting
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Check Formatting
18+
run: cargo fmt -- --verbose --check --color auto
19+

.github/workflows/lint.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: 🖋 Check linting
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ["main", "develop"]
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
check_lint_rust:
13+
name: 🖋 Check linting
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Check linting
18+
run: |
19+
rustup component add clippy
20+
set env RUSTFLAGS="-Dwarnings"
21+
cargo clippy --workspace -- -D warnings
22+
check_lint_markdown:
23+
name: 🖋 Check markdown files
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Check out code
27+
uses: actions/checkout@v2
28+
- name: Markdown Linting Action
29+
uses: avto-dev/markdown-lint@v1.5.0
30+
with:
31+
args: "*.md"

.github/workflows/md_checks.yml

-16
This file was deleted.

.github/workflows/package.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: 📦 Package
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ["main", "develop"]
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
license:
13+
name: 🏫 License check
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Check license
18+
run: |
19+
cargo install cargo-deny
20+
cargo deny check
21+
22+
cargo_check:
23+
name: 📦 Check package integrity
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Check package integrity
28+
run: cargo package --verbose
29+
30+
publish_dry_run:
31+
name: 📢 Publish dry-run
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Publish dry run
36+
run: cargo publish --dry-run --verbose

.github/workflows/tests.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: 🧪 Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ["main", "develop"]
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
test:
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-latest]
16+
toolchain: [stable, beta, nightly]
17+
name: 🧪 Run tests
18+
runs-on: ${{ matrix.os }}
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Install latest ${{ matrix.toolchain }}
22+
uses: actions-rs/toolchain@v1
23+
with:
24+
toolchain: ${{ matrix.toolchain }}
25+
- uses: actions/checkout@v2
26+
- name: Run tests
27+
run: cargo test --verbose
28+

.rustfmt.toml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
max_width = 88

CHANGELOG.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33

44
# Changelog
55

6-
All notable changes to this project will be documented in this file.
6+
<!-- All notable changes to this project will be documented in this file.
7+
The format is based on :
78
8-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
9-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9+
* [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
10+
and this project adheres to:
11+
* [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -->
12+
13+
## Unreleased
1014

1115
## [0.0.1] - 2022-09-03
1216

1317
### Added
1418

15-
- Created Baseline Project
19+
* Created Baseline Project

Cargo.toml

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
[package]
22
name = "pyver"
3-
description = "Python PEP-440 Version Parsing"
4-
authors = ["Allstreamer <allstreamer.contact@gmail.com>"]
3+
description = "Python PEP-440 Version Parser"
4+
authors = [
5+
"Allstreamer <allstreamer.contact@gmail.com>",
6+
"Jan Bronicki <janbronicki@gmail.com>",
7+
]
58
license = "MIT"
69
version = "0.1.0"
7-
keywords = ["versions", "python"]
10+
keywords = ["versions", "python", "parser", "semver", "pep-440"]
811
readme = "README.md"
912
edition = "2021"
1013
repository = "https://github.com/Allstreamer/pyver"
@@ -17,4 +20,4 @@ serde = { version = "1", features = ["derive"] }
1720
regex = { version = "1" }
1821
lazy_static = { version = "1.4.0" }
1922
pomsky-macro = { version = "0.6.0" }
20-
derivative = { version = "2.2.0" }
23+
derivative = { version = "2.2.0" }

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
# PyVer (WIP)
1+
# PyVer
22

3-
[![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](LICENSE-MIT)
3+
<!-- markdownlint-disable MD013 -->
4+
[![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](LICENSE-MIT) [![🧪 Tests](https://github.com/Allstreamer/pyver/actions/workflows/tests.yml/badge.svg)](https://github.com/Allstreamer/pyver/actions/workflows/tests.yml) [![🖋 Check linting](https://github.com/Allstreamer/pyver/actions/workflows/lint.yml/badge.svg)](https://github.com/Allstreamer/pyver/actions/workflows/lint.yml) [![🔨 Build](https://github.com/Allstreamer/pyver/actions/workflows/build.yml/badge.svg)](https://github.com/Allstreamer/pyver/actions/workflows/build.yml) [![📦 Package](https://github.com/Allstreamer/pyver/actions/workflows/package.yml/badge.svg)](https://github.com/Allstreamer/pyver/actions/workflows/package.yml) [![📄 Build docs](https://github.com/Allstreamer/pyver/actions/workflows/docs.yml/badge.svg)](https://github.com/Allstreamer/pyver/actions/workflows/docs.yml) [![👔 Check formatting](https://github.com/Allstreamer/pyver/actions/workflows/format.yml/badge.svg)](https://github.com/Allstreamer/pyver/actions/workflows/format.yml)
5+
<!-- markdownlint-enable MD013 -->
46

5-
> **Python PEP-440 Version Parsing**
7+
> **Python PEP-440 Version Parser**
68
7-
This package allows for parsing Python PEP-440 version numbers and comparisons
8-
between PEP-440 Versions
9+
This package allows for parsing Python [PEP-440](https://peps.python.org/pep-0440/)
10+
version numbers and for comparisons between
11+
[PEP-440](https://peps.python.org/pep-0440/) version numbers.
912

1013
## Usage
1114

1215
```Toml
1316
[dependencies]
14-
pyver = "0.0.1"
17+
pyver = "0"
1518
```
1619

1720
```Rust

0 commit comments

Comments
 (0)