Skip to content

Commit 1ce3644

Browse files
authored
Merge branch 'develop' into 25-add-python-version-parsing-pep-440
2 parents 5d26bd3 + 480cf4a commit 1ce3644

21 files changed

+304
-87
lines changed

.github/issue_template.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
### Description
2+
3+
<!-- Delete these comments later -->
4+
<!-- Put the description of the task here -->
5+
6+
### Checklist
7+
8+
* [ ] Connect all related issues, and project boards, add labels, assign people, milestones etc.
9+
* [ ] Make sure that this template is properly filled in and appropriate parts deleted

.github/pull_request_template.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
### Description
2+
3+
<!-- Delete these comments later -->
4+
<!-- Put the description of the task here -->
5+
6+
### Checklist
7+
8+
<!-- Don't delete these, check them with a mouse if completed -->
9+
* [ ] Add tests, documentation, update the changelog, etc.
10+
* [ ] Connect all issues, and project boards, add labels, assign people to the PR and the issue, etc.
11+
* [ ] Make sure that the PR description and title contain "Draft: " at the beginning if its not yet ready
12+
* [ ] Make sure that this template is properly filled in and appropriate parts deleted

.github/workflows/build.yml

+21-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build
1+
name: 🔨 Build
22

33
on:
44
pull_request:
@@ -10,17 +10,27 @@ env:
1010

1111
jobs:
1212
build:
13-
name: 🔨Build release
14-
runs-on: ubuntu-latest
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 }}
1519
steps:
1620
- uses: actions/checkout@v2
17-
- name: 🔨Build release
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
1835
run: cargo build --release
1936

20-
package:
21-
name: 📦Check package generation
22-
runs-on: ubuntu-latest
23-
steps:
24-
- uses: actions/checkout@v2
25-
- name: 📦Check package generation
26-
run: cargo package

.github/workflows/docs.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Docs
1+
name: 📄 Build docs
22

33
on:
44
pull_request:
@@ -10,9 +10,9 @@ env:
1010

1111
jobs:
1212
docs:
13-
name: 📄Build docs
13+
name: 📄 Build docs
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v2
17-
- name: 📄Build docs
17+
- name: Build docs
1818
run: cargo doc --verbose

.github/workflows/format.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: 👔 Check formatting
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ["main", "develop", "release"]
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+
- uses: actions-rs/toolchain@v1
18+
with:
19+
toolchain: stable
20+
override: true
21+
- uses: davidB/rust-cargo-make@v1
22+
- name: Check Formatting
23+
run: cargo make rust-fmt-check
24+
check_format_markdown:
25+
name: 🖋 Check markdown files
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Check out code
29+
uses: actions/checkout@v2
30+
- name: Markdown Linting Action
31+
uses: avto-dev/markdown-lint@v1.5.0
32+
with:
33+
args: "*.md"
34+
check_format_toml:
35+
name: 🪦 Check toml files
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Check out code
39+
uses: actions/checkout@v2
40+
- uses: actions-rs/toolchain@v1
41+
with:
42+
toolchain: stable
43+
override: true
44+
- uses: davidB/rust-cargo-make@v1
45+
- run: cargo make toml-fmt-check
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: Code check
1+
2+
name: 🖋 Check linting
23

34
on:
45
pull_request:
@@ -9,15 +10,19 @@ env:
910
CARGO_TERM_COLOR: always
1011

1112
jobs:
12-
code_check:
13-
name: 👔✒️Formatting and Linting
13+
check_lint:
14+
name: 🖋 Check linting
1415
runs-on: ubuntu-latest
1516
steps:
1617
- uses: actions/checkout@v2
17-
- name: 👔Check Formatting
18-
run: cargo fmt -- --verbose --check --color auto
19-
- name: ✒️Check linting
18+
- uses: actions-rs/toolchain@v1
19+
with:
20+
toolchain: stable
21+
override: true
22+
- uses: davidB/rust-cargo-make@v1
23+
- name: Check linting
2024
run: |
2125
rustup component add clippy
2226
set env RUSTFLAGS="-Dwarnings"
2327
cargo clippy --workspace -- -D warnings
28+

.github/workflows/package.yml

+12-30
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Package
1+
name: 📦 Package
22

33
on:
44
pull_request:
@@ -9,46 +9,28 @@ env:
99
CARGO_TERM_COLOR: always
1010

1111
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-
package:
23-
name: 🔨Package
12+
license:
13+
name: 🏫License check
2414
runs-on: ubuntu-latest
2515
steps:
2616
- uses: actions/checkout@v2
27-
- name: 🔨Check package build
28-
run: cargo package --verbose
17+
- name: 🏫Check license
18+
run: |
19+
cargo install cargo-deny
20+
cargo deny check
2921
3022
cargo_check:
31-
name: 📦Check package integrity
23+
name: 📦 Check package integrity
3224
runs-on: ubuntu-latest
3325
steps:
3426
- uses: actions/checkout@v2
35-
- name: 📦Check package integrity
36-
run: cargo check --verbose
27+
- name: Check package integrity
28+
run: cargo package --verbose
3729

3830
publish_dry_run:
39-
name: 📢Publish dry-run
31+
name: 📢 Publish dry-run
4032
runs-on: ubuntu-latest
4133
steps:
4234
- uses: actions/checkout@v2
43-
- name: 📢Publish dry run
35+
- name: Publish dry run
4436
run: cargo publish --dry-run --verbose
45-
46-
# dummy_publish:
47-
# name: 📦⬆️📢Publish dummy
48-
# # needs: [license, package, cargo_check, publish_dry_run]
49-
# needs: [package, cargo_check, publish_dry_run]
50-
# runs-on: ubuntu-latest
51-
# steps:
52-
# - uses: actions/checkout@v2
53-
# - name: 📦⬆️📢Publish dry run
54-
# run: cargo publish --dry-run --verbose

.github/workflows/tests.yml

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Tests
1+
name: 🧪 Tests
22

33
on:
44
pull_request:
@@ -10,9 +10,19 @@ env:
1010

1111
jobs:
1212
test:
13-
name: 🧪Run tests
14-
runs-on: ubuntu-latest
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 }}
1519
steps:
1620
- uses: actions/checkout@v2
17-
- name: 🧪Run tests
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
1827
run: cargo test --verbose
28+

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@ target/
2424
workspace.code-workspace
2525

2626
# macOS
27-
.DS_Store
27+
.DS_Store
28+
29+
# Vim files
30+
*.vim

.rustfmt.toml

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
max_width = 88
2-
ignore = ["."] # rustfmt does a poor job, and I don't want it ruining well-formatted code

CHANGELOG.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<!--Markdownlint Rules-->
2+
<!-- markdownlint-disable no-duplicate-header-->
3+
4+
# Changelog
5+
6+
All notable changes to this project will be documented in this file.
7+
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).
10+
11+
## [Unreleased]
12+
13+
### Changed
14+
15+
- Changed CLI to use CLAP [#6](https://github.com/John15321/rust-pip/pull/6)
16+
17+
### Docs
18+
19+
- Added changelog [#39](https://github.com/John15321/rust-pip/pull/39)
20+
21+
## [0.0.1] 22 July 2022
22+
23+
### Added
24+
25+
- Added Basic CLI functionality using StructOpt
26+
- Added Base Project

CONTRIBUTING.md

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
<!-- TODO: Create new screen shots for this project -->
2+
# Branching
3+
4+
## The branching strategy
5+
6+
The branching strategy looks like this:
7+
8+
The short description of the branching strategy is as follows.
9+
The feature branches are a category of branches that branch out
10+
of the `develop` branch. A person branches out from develop,
11+
works on a given feature on their branch and when the feature
12+
is ready they submit a Pull Request to merge again into the
13+
develop branch. After the review process is finished the commits
14+
from the branch should be squashed and then merged into `develop`
15+
(GitHubs WebUI provides that). Therefore each commit that lands
16+
on the `develop` branch is an addition of a feature, documentation
17+
etc.. When an arbitrary set of new features is completed and could
18+
be deemed as a new release (release cycle should follow the
19+
[semver](https://semver.org/) convention) it should be merged
20+
into `main` (of course it should also follow the process of a
21+
Pull Request and reviews) when it is merged into `main`
22+
additional testing, validation etc. should be done as this is
23+
now a release candidate. If the state of the code is deemed safe
24+
and proper it should be released as a new version of the software.
25+
This should be done by tagging which marks a given commit a
26+
release candidate which should automatically trigger a series of
27+
CI/CD checks and if they succeed the software package will
28+
be finally released.
29+
30+
![branching](img/branching.png)
31+
32+
## Creating a task
33+
34+
TL;DR
35+
36+
If you want to work on something create an issue for that.
37+
38+
1. Fill out the name for the issue
39+
2. Provide a description for the task and what are your plans etc.
40+
3. If you know you will be working on that task assign yourself
41+
4. Add applicable labels to the task, e.g. if you are solving a bug
42+
then add `Bug`, if adding a new functionality add `Enhancement` etc.
43+
5. Assign the task to the `rust-pip` project
44+
6. If applicable assign the task to a given milestone
45+
7. Submit the issue/task
46+
47+
![issue](img/task_issue_creation.png)
48+
49+
## Creating a branch and using it
50+
51+
Then when you have created an issue for you task click the `Create new branch`
52+
in the lower right corner:
53+
54+
![cr](img/create_a_branch.png)
55+
56+
Click on the `Change branch source`, then:
57+
58+
1. Make sure that the actual branch name is concise and fairly short
59+
2. *Make sure that you branch out from the `develop` branch!*
60+
3. Make sure `Checkout locally` is selected
61+
4. Click the create branch button
62+
63+
![lol](img/actual_create_branch.png)
64+
65+
Now a branch has been created for you, copy the commands needed for you to use it:
66+
67+
![asd](img/checkout.png)
68+
69+
In you cloned repository open a terminal and paste the copied commands.
70+
Now you should be on your newly created branch and you can start working.
71+
To make sure you are on that branch run:
72+
73+
```bash
74+
$ git branch
75+
* 16-task-number-do-something-with-something
76+
...
77+
```
78+
79+
The branch on which you currently reside will be marked with a `*`.
80+
Next simply keep working on your branch, push commits, and when you think
81+
you are ready create a Pull Request, make sure that you mark your PR as a
82+
draft if its not ready for review otherwise it looks like noise.
83+
84+
## Creating a Pull Request (PR)
85+
86+
After you create changes on your branch create a Pull Request and mark it
87+
as a `Draft` as that it can be seen that you are working on a given issue.
88+
Similarly to creating an issue ensure that:
89+
90+
* Summary of changes in the body of the pull
91+
* Labels
92+
* Milestone
93+
* Link related issues
94+
* Assign the project `rust-pip`
95+
* etc.

LICENSE

-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22-

0 commit comments

Comments
 (0)