devobs 0.2.6__tar.gz → 0.2.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. {devobs-0.2.6 → devobs-0.2.7}/.config/nextest.toml +3 -0
  2. devobs-0.2.7/.devcontainer.example/devcontainer-lock.json +9 -0
  3. devobs-0.2.7/.devcontainer.example/devcontainer.json +18 -0
  4. {devobs-0.2.6 → devobs-0.2.7}/.editorconfig +5 -8
  5. devobs-0.2.7/.github/workflows/ci.yaml +101 -0
  6. {devobs-0.2.6 → devobs-0.2.7}/.github/workflows/prepare-release.yaml +21 -5
  7. {devobs-0.2.6 → devobs-0.2.7}/.github/workflows/release.yaml +26 -20
  8. {devobs-0.2.6 → devobs-0.2.7}/.gitignore +18 -7
  9. {devobs-0.2.6 → devobs-0.2.7}/.pre-commit-config.yaml +10 -10
  10. devobs-0.2.7/.vscode.example/extensions.json +7 -0
  11. devobs-0.2.7/.vscode.example/launch.json +17 -0
  12. devobs-0.2.7/.vscode.example/settings.json +12 -0
  13. devobs-0.2.7/CONTRIBUTING.md +73 -0
  14. {devobs-0.2.6 → devobs-0.2.7}/Cargo.lock +166 -444
  15. {devobs-0.2.6 → devobs-0.2.7}/Cargo.toml +8 -8
  16. devobs-0.2.7/Justfile +76 -0
  17. devobs-0.2.7/PKG-INFO +70 -0
  18. devobs-0.2.7/README.md +58 -0
  19. devobs-0.2.7/flake.lock +61 -0
  20. devobs-0.2.7/flake.nix +46 -0
  21. devobs-0.2.7/rust-toolchain.toml +4 -0
  22. {devobs-0.2.6 → devobs-0.2.7}/src/commands/assert_diff.rs +3 -7
  23. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/test_assert_diff.rs +19 -19
  24. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/test_check_file_pair.rs +27 -27
  25. {devobs-0.2.6 → devobs-0.2.7}/tests/helpers.rs +1 -1
  26. {devobs-0.2.6 → devobs-0.2.7}/tests/integration_test.rs +1 -0
  27. devobs-0.2.6/.devcontainer.example/devcontainer.json +0 -19
  28. devobs-0.2.6/.devcontainer.example/onCreateCommand.sh +0 -17
  29. devobs-0.2.6/.devcontainer.example/postStartCommand.sh +0 -3
  30. devobs-0.2.6/.devcontainer.example/updateContentCommand.sh +0 -3
  31. devobs-0.2.6/.gitattributes +0 -341
  32. devobs-0.2.6/.github/workflows/ci.yaml +0 -68
  33. devobs-0.2.6/.vscode.example/extensions.json +0 -7
  34. devobs-0.2.6/.vscode.example/launch.json +0 -17
  35. devobs-0.2.6/Makefile +0 -62
  36. devobs-0.2.6/PKG-INFO +0 -19
  37. devobs-0.2.6/README.md +0 -7
  38. devobs-0.2.6/rust-toolchain.toml +0 -3
  39. {devobs-0.2.6 → devobs-0.2.7}/.pre-commit-hooks.yaml +0 -0
  40. {devobs-0.2.6 → devobs-0.2.7}/.rustfmt.toml +0 -0
  41. {devobs-0.2.6 → devobs-0.2.7}/LICENSE +0 -0
  42. {devobs-0.2.6 → devobs-0.2.7}/pyproject.toml +0 -0
  43. {devobs-0.2.6 → devobs-0.2.7}/renovate.json +0 -0
  44. {devobs-0.2.6 → devobs-0.2.7}/src/commands/check_file_pair.rs +0 -0
  45. {devobs-0.2.6 → devobs-0.2.7}/src/commands.rs +0 -0
  46. {devobs-0.2.6 → devobs-0.2.7}/src/main.rs +0 -0
  47. {devobs-0.2.6 → devobs-0.2.7}/src/utils/fs.rs +0 -0
  48. {devobs-0.2.6 → devobs-0.2.7}/src/utils.rs +0 -0
  49. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/mod.rs +0 -0
  50. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_assert_diff__changes_create-2.snap +0 -0
  51. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_assert_diff__changes_create.snap +0 -0
  52. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_assert_diff__changes_delete-2.snap +0 -0
  53. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_assert_diff__changes_delete.snap +0 -0
  54. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_assert_diff__changes_modify-2.snap +0 -0
  55. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_assert_diff__changes_modify.snap +0 -0
  56. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_assert_diff__empty_directory.snap +0 -0
  57. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_assert_diff__no_changes.snap +0 -0
  58. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_assert_diff__no_command_to_run.snap +0 -0
  59. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_assert_diff__nonexistent_directory.snap +0 -0
  60. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_assert_diff__on_command_error_ignore.snap +0 -0
  61. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_assert_diff__on_command_error_propagate.snap +0 -0
  62. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_check_file_pair__backward_matching.snap +0 -0
  63. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_check_file_pair__create_if_not_exists.snap +0 -0
  64. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_check_file_pair__create_if_not_exists_dry_run.snap +0 -0
  65. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_check_file_pair__empty_directory_no_error_no_output.snap +0 -0
  66. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_check_file_pair__forward_matching.snap +0 -0
  67. {devobs-0.2.6 → devobs-0.2.7}/tests/commands/snapshots/integration_test__commands__test_check_file_pair__on_fully_populated_directory.snap +0 -0
@@ -1,2 +1,5 @@
1
+ [profile.default]
2
+ fail-fast = false
3
+
1
4
  [profile.default.junit]
2
5
  path = "junit.xml"
@@ -0,0 +1,9 @@
1
+ {
2
+ "features": {
3
+ "ghcr.io/devcontainers/features/nix:1": {
4
+ "version": "1.3.1",
5
+ "resolved": "ghcr.io/devcontainers/features/nix@sha256:8953a9da475055d140db0ede314e8e1b117d28c1eabf289c1b07c7619ce6c078",
6
+ "integrity": "sha256:8953a9da475055d140db0ede314e8e1b117d28c1eabf289c1b07c7619ce6c078"
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "lasuillard-s/devobs",
3
+ "image": "mcr.microsoft.com/devcontainers/base:dev-trixie",
4
+ "features": {
5
+ "ghcr.io/devcontainers/features/nix:1": {
6
+ "extraNixConfig": "extra-experimental-features = nix-command flakes"
7
+ }
8
+ },
9
+ "customizations": {
10
+ "vscode": {
11
+ "extensions": [
12
+ "EditorConfig.EditorConfig",
13
+ "vadimcn.vscode-lldb",
14
+ "rust-lang.rust-analyzer"
15
+ ]
16
+ }
17
+ }
18
+ }
@@ -4,19 +4,16 @@ root = true
4
4
 
5
5
  [*]
6
6
  charset = utf-8
7
+ end_of_line = lf
7
8
  indent_style = space
8
9
  indent_size = 2
9
- end_of_line = lf
10
- insert_final_newline = true
11
10
  trim_trailing_whitespace = true
11
+ insert_final_newline = true
12
12
 
13
- [*.md]
14
- trim_trailing_whitespace = false
15
- indent_size = 4
16
-
17
- [Makefile]
18
- indent_style = tab
13
+ [{justfile,Justfile}]
14
+ indent_style = space
19
15
  indent_size = 4
20
16
 
21
17
  [*.rs]
18
+ indent_style = space
22
19
  indent_size = 4
@@ -0,0 +1,101 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ lint:
15
+ name: Lint
16
+ runs-on: ubuntu-latest
17
+ timeout-minutes: 10
18
+ permissions:
19
+ contents: read
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
23
+
24
+ - name: Set up Rust toolchain
25
+ uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1
26
+
27
+ - name: Install nightly toolchain
28
+ run: rustup toolchain install nightly --profile minimal --component rustfmt
29
+
30
+ - name: Check code formatting
31
+ run: rustup run nightly cargo fmt --check
32
+
33
+ - name: Lint code
34
+ run: cargo clippy --all-targets --all-features -- --deny warnings
35
+
36
+ ub-check:
37
+ name: UB Check
38
+ runs-on: ubuntu-latest
39
+ timeout-minutes: 15
40
+ permissions:
41
+ contents: read
42
+ steps:
43
+ - name: Checkout
44
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
45
+
46
+ - name: Set up Rust toolchain
47
+ uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1
48
+
49
+ - name: Install nightly toolchain
50
+ run: rustup toolchain install nightly --profile minimal --component miri
51
+
52
+ - name: Install devtools
53
+ uses: taiki-e/install-action@4bc351f7f2614e48088386e2a0ad917ca3a7e4ba # v2.81.5
54
+ with:
55
+ tool: cargo-nextest
56
+
57
+ - name: Run tests with Miri
58
+ env:
59
+ MIRIFLAGS: '-Zmiri-disable-isolation'
60
+ run: |
61
+ rustup run nightly cargo miri \
62
+ nextest run --workspace --all-targets --all-features
63
+
64
+ test:
65
+ name: Test
66
+ runs-on: ubuntu-latest
67
+ timeout-minutes: 15
68
+ permissions:
69
+ contents: read
70
+ id-token: write
71
+ steps:
72
+ - name: Checkout
73
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
74
+
75
+ - name: Set up Rust toolchain
76
+ uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1
77
+
78
+ - name: Install devtools
79
+ uses: taiki-e/install-action@4bc351f7f2614e48088386e2a0ad917ca3a7e4ba # v2.81.5
80
+ with:
81
+ tool: cargo-llvm-cov,cargo-nextest
82
+
83
+ - name: Run tests
84
+ run: |
85
+ cargo llvm-cov nextest --workspace --all-targets --all-features --lcov --output-path lcov.info
86
+ cargo llvm-cov report --summary-only
87
+
88
+ - name: Upload test results to Codecov
89
+ uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
90
+ with:
91
+ use_oidc: true
92
+ fail_ci_if_error: false
93
+ report_type: test_results
94
+ files: target/nextest/default/junit.xml
95
+
96
+ - name: Upload coverage report
97
+ uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
98
+ with:
99
+ use_oidc: true
100
+ fail_ci_if_error: false
101
+ files: lcov.info
@@ -7,15 +7,19 @@ on:
7
7
  description: Semver-style tag for release (e.g., v1.0.0)
8
8
  required: true
9
9
 
10
+ concurrency:
11
+ group: ${{ github.workflow }}
12
+ cancel-in-progress: false
13
+
10
14
  jobs:
11
15
  create-pr:
16
+ name: Create PR
12
17
  runs-on: ubuntu-latest
13
18
  timeout-minutes: 5
14
19
  permissions:
15
20
  contents: write
16
21
  pull-requests: write
17
22
  steps:
18
- # TODO(lasuillard): Validate tag format more strictly (semver)
19
23
  - name: Check tag format
20
24
  run: |
21
25
  if [[ ! "${{ inputs.tag }}" =~ ^v ]]; then
@@ -23,7 +27,8 @@ jobs:
23
27
  exit 1
24
28
  fi
25
29
 
26
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
30
+ - name: Checkout
31
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
27
32
 
28
33
  # https://github.com/killercup/cargo-edit/issues/864
29
34
  - name: Set version
@@ -35,17 +40,28 @@ jobs:
35
40
  cargo set-version "$tag_no_v"
36
41
 
37
42
  - name: Generate GitHub App token
38
- uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3
43
+ uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
39
44
  id: generate-token
40
45
  with:
41
- app-id: ${{ vars.GH_APP_ID }}
46
+ client-id: ${{ vars.GH_APP_ID }}
42
47
  private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
43
48
 
44
49
  - name: Create pull request
45
- uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
50
+ uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
46
51
  with:
47
52
  token: ${{ steps.generate-token.outputs.token }}
48
53
  sign-commits: true
49
54
  title: Release ${{ inputs.tag }}
55
+ body: |
56
+ This pull request prepares the repository for the ${{ inputs.tag }} release.
57
+
58
+ ### Changes
59
+ - Bumps package version to `${{ inputs.tag }}` (without creating a git tag)
60
+ - Ready for review and merge
61
+
62
+ ### Next steps
63
+ 1. Review and merge this PR
64
+ 2. Create and publish a GitHub release with tag `${{ inputs.tag }}`
65
+ 3. The release workflow will automatically build and publish the packages to PyPI via Maturin
50
66
  branch: release/${{ inputs.tag }}
51
67
  delete-branch: true
@@ -4,66 +4,71 @@ on:
4
4
  release:
5
5
  types: [published]
6
6
 
7
+ concurrency:
8
+ group: ${{ github.workflow }}
9
+ cancel-in-progress: false
10
+
7
11
  jobs:
8
12
  build:
13
+ name: Build (${{ matrix.target }})
14
+ runs-on: ${{ matrix.platform }}
15
+ timeout-minutes: 15
16
+ permissions:
17
+ contents: read
9
18
  strategy:
10
19
  fail-fast: false
11
20
  matrix:
12
21
  include:
13
22
  - platform: ubuntu-latest
14
23
  target: x86_64
15
-
16
- name: build (${{ matrix.target }})
17
- runs-on: ${{ matrix.platform }}
18
- timeout-minutes: 15
19
- permissions:
20
- contents: read
21
24
  steps:
22
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
25
+ - name: Checkout
26
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
23
27
 
24
28
  - name: Build wheels
25
- uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1
29
+ uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
26
30
  with:
27
31
  target: ${{ matrix.target }}
28
32
  args: --release --out dist
29
33
 
30
34
  - name: Upload wheels as artifact
31
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
35
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
32
36
  with:
33
37
  name: dist-${{ matrix.target }}
34
38
  path: dist
35
39
 
36
40
  sdist:
41
+ name: Build sdist
37
42
  runs-on: ubuntu-latest
38
43
  timeout-minutes: 15
39
44
  permissions:
40
45
  contents: read
41
46
  steps:
42
- - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
47
+ - name: Checkout
48
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
43
49
 
44
50
  - name: Build sdist
45
- uses: PyO3/maturin-action@04ac600d27cdf7a9a280dadf7147097c42b757ad # v1
51
+ uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
46
52
  with:
47
53
  command: sdist
48
54
  args: --out dist
49
55
 
50
56
  - name: Upload sdist as artifact
51
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
57
+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
52
58
  with:
53
59
  name: sdist
54
60
  path: dist
55
61
 
56
62
  release:
57
- needs:
58
- - build
59
- - sdist
63
+ name: Release
64
+ needs: [build, sdist]
60
65
  runs-on: ubuntu-latest
61
66
  timeout-minutes: 5
62
67
  permissions:
63
68
  contents: write
64
69
  steps:
65
70
  - name: Download binary artifacts
66
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
71
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
67
72
  with:
68
73
  path: dist
69
74
 
@@ -71,15 +76,16 @@ jobs:
71
76
  run: ls -l --all --recursive dist
72
77
 
73
78
  - name: Create release
74
- uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
79
+ uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3
75
80
  with:
76
81
  tag_name: ${{ github.event.release.tag_name }}
77
- generate_release_notes: true
82
+ generate_release_notes: false
78
83
  files: |
79
84
  dist/sdist/devobs-*.tar.gz
80
85
  dist/dist-*/devobs-*.whl
81
86
 
82
87
  publish-pypi:
88
+ name: Publish to PyPI
83
89
  needs: release
84
90
  runs-on: ubuntu-latest
85
91
  environment: pypi
@@ -88,7 +94,7 @@ jobs:
88
94
  id-token: write
89
95
  steps:
90
96
  - name: Download binary artifacts
91
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
97
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
92
98
  with:
93
99
  path: dist
94
100
  merge-multiple: true
@@ -97,6 +103,6 @@ jobs:
97
103
  run: ls -l --all --recursive dist
98
104
 
99
105
  - name: Publish release distributions to PyPI
100
- uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # release/v1
106
+ uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
101
107
  with:
102
108
  skip-existing: true
@@ -1,11 +1,17 @@
1
+ .devcontainer
2
+ .vscode
1
3
  lcov.info
2
4
  *.log
3
- .env
4
- .devcontainer/
5
- .vscode/
6
5
 
7
- # Created by https://www.toptal.com/developers/gitignore/api/osx,rust,linux,windows,visualstudiocode
8
- # Edit at https://www.toptal.com/developers/gitignore?templates=osx,rust,linux,windows,visualstudiocode
6
+ # Created by https://www.toptal.com/developers/gitignore/api/osx,rust,linux,direnv,dotenv,windows,visualstudiocode,rust-analyzer
7
+ # Edit at https://www.toptal.com/developers/gitignore?templates=osx,rust,linux,direnv,dotenv,windows,visualstudiocode,rust-analyzer
8
+
9
+ ### direnv ###
10
+ .direnv
11
+ .envrc
12
+
13
+ ### dotenv ###
14
+ .env
9
15
 
10
16
  ### Linux ###
11
17
  *~
@@ -59,7 +65,7 @@ target/
59
65
 
60
66
  # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
61
67
  # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
62
- #Cargo.lock
68
+ Cargo.lock
63
69
 
64
70
  # These are backup files generated by rustfmt
65
71
  **/*.rs.bk
@@ -67,6 +73,11 @@ target/
67
73
  # MSVC Windows builds of rustc generate these, which store debugging information
68
74
  *.pdb
69
75
 
76
+ ### rust-analyzer ###
77
+ # Can be generated by other build systems other than cargo (ex: bazelbuild/rust_rules)
78
+ rust-project.json
79
+
80
+
70
81
  ### VisualStudioCode ###
71
82
  .vscode/*
72
83
  !.vscode/settings.json
@@ -112,4 +123,4 @@ $RECYCLE.BIN/
112
123
  # Windows shortcuts
113
124
  *.lnk
114
125
 
115
- # End of https://www.toptal.com/developers/gitignore/api/osx,rust,linux,windows,visualstudiocode
126
+ # End of https://www.toptal.com/developers/gitignore/api/osx,rust,linux,direnv,dotenv,windows,visualstudiocode,rust-analyzer
@@ -1,4 +1,3 @@
1
- default_stages: [pre-commit]
2
1
  fail_fast: true
3
2
  exclude: |
4
3
  (?x)(
@@ -11,8 +10,9 @@ repos:
11
10
  - id: trailing-whitespace
12
11
  - id: end-of-file-fixer
13
12
 
13
+ # Dogfooding
14
14
  - repo: https://github.com/lasuillard-s/devobs
15
- rev: main # Dogfooding; pin to a specific version when stable
15
+ rev: main
16
16
  hooks:
17
17
  # Ensure each command has its test file pair
18
18
  - id: check-file-pair
@@ -26,24 +26,24 @@ repos:
26
26
 
27
27
  - repo: local
28
28
  hooks:
29
- - id: cargo-fmt
30
- name: Format Rust codes
29
+ - id: cargo-clippy
30
+ name: cargo clippy
31
31
  language: system
32
32
  types: [rust]
33
33
  pass_filenames: false
34
- entry: cargo fmt
34
+ entry: cargo clippy
35
+ args: [--fix, --allow-dirty, --, --deny, warnings]
35
36
 
36
- - id: cargo-clippy
37
- name: Lint Rust codes
37
+ - id: cargo-fmt
38
+ name: cargo fmt (nightly)
38
39
  language: system
39
40
  types: [rust]
40
41
  pass_filenames: false
41
- entry: cargo clippy
42
+ entry: rustup run nightly cargo fmt
42
43
 
43
44
  - id: cargo-nextest
44
- name: Test Rust codes
45
+ name: cargo nextest
45
46
  language: system
46
47
  types: [rust]
47
48
  pass_filenames: false
48
49
  entry: cargo nextest run
49
- args: [--workspace]
@@ -0,0 +1,7 @@
1
+ {
2
+ "recommendations": [
3
+ "EditorConfig.EditorConfig",
4
+ "vadimcn.vscode-lldb",
5
+ "rust-lang.rust-analyzer"
6
+ ]
7
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "type": "lldb",
6
+ "request": "launch",
7
+ "name": "Debug",
8
+ "program": "${workspaceRoot}/target/debug/devobs",
9
+ "env": {},
10
+ "args": [],
11
+ "cwd": "${workspaceRoot}",
12
+ "sourceLanguages": [
13
+ "rust"
14
+ ]
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "[rust]": {
3
+ "editor.defaultFormatter": "rust-lang.rust-analyzer"
4
+ },
5
+ "rust-analyzer.cargo.cfgs": [
6
+ "debug_assertions"
7
+ // "miri"
8
+ ],
9
+ "rust-analyzer.rustfmt.extraArgs": [
10
+ "+nightly"
11
+ ]
12
+ }
@@ -0,0 +1,73 @@
1
+ # ❤️‍🔥 Contributing to this project
2
+
3
+ Thank you for your interest in contributing to **devobs**.
4
+
5
+ ## 🐛 Reporting issues
6
+
7
+ Please report issues in our [GitHub repository](https://github.com/lasuillard-s/devobs/issues). Before submitting an issue, please search for existing issues to avoid duplicates.
8
+
9
+ ## 🏗️ Project overview
10
+
11
+ This project is a CLI tool written in Rust for development workflow automation. It provides various commands to handle development tasks such as checking for matching file pairs or detecting changes in the target directory by comparing file hashes before and after running a command.
12
+
13
+ ### 🛠️ Tech stack
14
+
15
+ This project uses the following tech stack:
16
+
17
+ - [Rust](https://www.rust-lang.org)
18
+ - [clap](https://docs.rs/clap/latest/clap/) for command-line parsing
19
+ - [Clippy](https://doc.rust-lang.org/clippy/) for linting, and [rustfmt](https://github.com/rust-lang/rustfmt) for formatting
20
+ - [Miri](https://github.com/rust-lang/miri) for undefined behavior checks
21
+ - [cargo-nextest](https://nexte.st/) for test coverage and execution
22
+
23
+ ### 📂 Key directory structure
24
+
25
+ - `src/`: Rust source code
26
+ - `tests/`: Project integration tests
27
+ - `Cargo.toml`: Rust package configuration
28
+ - `flake.nix`: Nix Flakes development environment
29
+ - `Justfile`: Local development commands
30
+ - `pyproject.toml`: Python package configuration for [Maturin](https://www.maturin.rs/)
31
+ - `rust-toolchain.toml`: Rust toolchain configuration
32
+
33
+ ## 🔧 Set up the development environment
34
+
35
+ For development, the following tools are required:
36
+
37
+ ### ❄️ Tools managed via Nix Flakes
38
+
39
+ This repository uses [Nix Flakes](https://nix.dev/concepts/flakes.html) to manage development tools. The following tools are installed automatically when `nix` is available:
40
+
41
+ - `pre-commit`
42
+ - `just`
43
+ - `pipx`
44
+ - `rustup`
45
+ - `cargo`
46
+ - `cargo-llvm-cov`
47
+ - `cargo-nextest`
48
+ - `cargo-watch`
49
+ - `cargo-insta`
50
+ - `maturin`
51
+
52
+ Simply run `nix develop` to enter the development environment, then run `just install` to set up dependencies.
53
+
54
+ If you prefer using a [Dev Container](https://containers.dev), an example configuration file ([`devcontainer.json`](./.devcontainer.example/devcontainer.json)) is provided.
55
+
56
+ ## ✅ Verifying changes
57
+
58
+ Before pushing your code, run `just ci` to verify that your changes adhere to the project's coding standards and pass all linters, formatters, and tests.
59
+
60
+ Alternatively, use the `pre-commit` hooks to handle formatting, linting, and quick test feedback automatically.
61
+
62
+ ## ✨ Submitting changes
63
+
64
+ Please feel free to submit pull requests on GitHub. Before opening a PR, ensure your changes pass all checks by running `just ci`.
65
+
66
+ ## 🚀 Release process
67
+
68
+ `devobs` is published to PyPI as a Python package via [Maturin](https://github.com/PyO3/maturin), to make it easy to install and use. To release a new version, follow these steps:
69
+
70
+ 1. Dispatch [Prepare Release](https://github.com/lasuillard-s/devobs/actions/workflows/prepare-release.yaml) workflow with the new version (e.g. `v0.1.0`)
71
+ 1. Review and merge the PR created by the workflow
72
+ 1. Create and publish a new release in GitHub Releases
73
+ 1. Application will be built with Maturin and published to PyPI automatically