devobs 0.1.0__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 (39) hide show
  1. devobs-0.1.0/.config/nextest.toml +2 -0
  2. devobs-0.1.0/.devcontainer/devcontainer.json +22 -0
  3. devobs-0.1.0/.devcontainer/onCreateCommand.sh +18 -0
  4. devobs-0.1.0/.devcontainer/postAttachCommand.sh +6 -0
  5. devobs-0.1.0/.editorconfig +22 -0
  6. devobs-0.1.0/.gitattributes +341 -0
  7. devobs-0.1.0/.github/dependabot.yaml +24 -0
  8. devobs-0.1.0/.github/workflows/ci.yaml +72 -0
  9. devobs-0.1.0/.github/workflows/release.yaml +105 -0
  10. devobs-0.1.0/.gitignore +113 -0
  11. devobs-0.1.0/.pre-commit-config.yaml +36 -0
  12. devobs-0.1.0/.pre-commit-hooks.yaml +7 -0
  13. devobs-0.1.0/.rustfmt.toml +3 -0
  14. devobs-0.1.0/.vscode/extensions.json +11 -0
  15. devobs-0.1.0/.vscode/launch.json +17 -0
  16. devobs-0.1.0/.vscode/settings.json +32 -0
  17. devobs-0.1.0/Cargo.lock +2181 -0
  18. devobs-0.1.0/Cargo.toml +28 -0
  19. devobs-0.1.0/LICENSE +21 -0
  20. devobs-0.1.0/Makefile +56 -0
  21. devobs-0.1.0/PKG-INFO +18 -0
  22. devobs-0.1.0/README.md +7 -0
  23. devobs-0.1.0/pyproject.toml +10 -0
  24. devobs-0.1.0/rust-toolchain.toml +3 -0
  25. devobs-0.1.0/src/commands/check_file_pair.rs +173 -0
  26. devobs-0.1.0/src/commands.rs +1 -0
  27. devobs-0.1.0/src/main.rs +107 -0
  28. devobs-0.1.0/src/utils/fs.rs +253 -0
  29. devobs-0.1.0/src/utils.rs +1 -0
  30. devobs-0.1.0/tests/commands/mod.rs +1 -0
  31. devobs-0.1.0/tests/commands/snapshots/integration_test__commands__test_check_file_pair__backward_matching.snap +10 -0
  32. devobs-0.1.0/tests/commands/snapshots/integration_test__commands__test_check_file_pair__create_if_not_exists.snap +8 -0
  33. devobs-0.1.0/tests/commands/snapshots/integration_test__commands__test_check_file_pair__create_if_not_exists_dry_run.snap +8 -0
  34. devobs-0.1.0/tests/commands/snapshots/integration_test__commands__test_check_file_pair__empty_directory_no_error_no_output.snap +5 -0
  35. devobs-0.1.0/tests/commands/snapshots/integration_test__commands__test_check_file_pair__forward_matching.snap +8 -0
  36. devobs-0.1.0/tests/commands/snapshots/integration_test__commands__test_check_file_pair__on_fully_populated_directory.snap +5 -0
  37. devobs-0.1.0/tests/commands/test_check_file_pair.rs +292 -0
  38. devobs-0.1.0/tests/helpers.rs +91 -0
  39. devobs-0.1.0/tests/integration_test.rs +2 -0
@@ -0,0 +1,2 @@
1
+ [profile.default.junit]
2
+ path = "junit.xml"
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "lasuillard/devobs",
3
+ "image": "mcr.microsoft.com/devcontainers/rust:1-bookworm",
4
+ "features": {
5
+ "ghcr.io/devcontainers-contrib/features/pre-commit:2": {}
6
+ },
7
+ "onCreateCommand": "./.devcontainer/onCreateCommand.sh",
8
+ "postAttachCommand": "./.devcontainer/postAttachCommand.sh",
9
+ "customizations": {
10
+ "vscode": {
11
+ "extensions": [
12
+ "ldez.ignore-files",
13
+ "redhat.vscode-yaml",
14
+ "tamasfe.even-better-toml",
15
+ "streetsidesoftware.code-spell-checker",
16
+ "EditorConfig.EditorConfig",
17
+ "vadimcn.vscode-lldb",
18
+ "rust-lang.rust-analyzer"
19
+ ]
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env bash
2
+
3
+ ARCH="$(dpkg --print-architecture)"
4
+
5
+ CARGO_BINSTALL_VERSION="1.12.5"
6
+
7
+ curl -fsSL "https://github.com/cargo-bins/cargo-binstall/releases/download/v${CARGO_BINSTALL_VERSION}/cargo-binstall-$(rustc -vV | sed -n 's|host: ||p').tgz" \
8
+ | tar --extract --gzip --directory "${CARGO_HOME}/bin"
9
+
10
+ # Download dev tools binaries
11
+ cargo binstall -y --log-level debug \
12
+ cargo-llvm-cov \
13
+ cargo-nextest \
14
+ cargo-udeps \
15
+ cargo-watch \
16
+ cargo-insta
17
+
18
+ pipx install maturin
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Convenience alias for this project
4
+ echo 'alias dvo="cargo run --"' >> ~/.bashrc
5
+
6
+ make install
@@ -0,0 +1,22 @@
1
+ # http://editorconfig.org
2
+
3
+ root = true
4
+
5
+ [*]
6
+ charset = utf-8
7
+ indent_style = space
8
+ indent_size = 2
9
+ end_of_line = lf
10
+ insert_final_newline = true
11
+ trim_trailing_whitespace = true
12
+
13
+ [*.md]
14
+ trim_trailing_whitespace = false
15
+ indent_size = 4
16
+
17
+ [Makefile]
18
+ indent_style = tab
19
+ indent_size = 4
20
+
21
+ [*.rs]
22
+ indent_size = 4
@@ -0,0 +1,341 @@
1
+ # https://gitattributes.io/api/devcontainer%2Cvisualstudiocode%2Cweb%2Ccommon%2Cmarkdown%2Cpython%2Crust
2
+ # Common settings that generally should always be used with your language specific settings
3
+
4
+ # Auto detect text files and perform LF normalization
5
+ * text=auto
6
+
7
+ #
8
+ # The above will handle all files NOT found below
9
+ #
10
+
11
+ # Documents
12
+ *.bibtex text diff=bibtex
13
+ *.doc diff=astextplain
14
+ *.DOC diff=astextplain
15
+ *.docx diff=astextplain
16
+ *.DOCX diff=astextplain
17
+ *.dot diff=astextplain
18
+ *.DOT diff=astextplain
19
+ *.pdf diff=astextplain
20
+ *.PDF diff=astextplain
21
+ *.rtf diff=astextplain
22
+ *.RTF diff=astextplain
23
+ *.md text diff=markdown
24
+ *.mdx text diff=markdown
25
+ *.tex text diff=tex
26
+ *.adoc text
27
+ *.textile text
28
+ *.mustache text
29
+ *.csv text eol=crlf
30
+ *.tab text
31
+ *.tsv text
32
+ *.txt text
33
+ *.sql text
34
+ *.epub diff=astextplain
35
+
36
+ # Graphics
37
+ *.png binary
38
+ *.jpg binary
39
+ *.jpeg binary
40
+ *.gif binary
41
+ *.tif binary
42
+ *.tiff binary
43
+ *.ico binary
44
+ # SVG treated as text by default.
45
+ *.svg text
46
+ # If you want to treat it as binary,
47
+ # use the following line instead.
48
+ # *.svg binary
49
+ *.eps binary
50
+
51
+ # Scripts
52
+ *.bash text eol=lf
53
+ *.fish text eol=lf
54
+ *.sh text eol=lf
55
+ *.zsh text eol=lf
56
+ # These are explicitly windows files and should use crlf
57
+ *.bat text eol=crlf
58
+ *.cmd text eol=crlf
59
+ *.ps1 text eol=crlf
60
+
61
+ # Serialisation
62
+ *.json text
63
+ *.toml text
64
+ *.xml text
65
+ *.yaml text
66
+ *.yml text
67
+
68
+ # Archives
69
+ *.7z binary
70
+ *.gz binary
71
+ *.tar binary
72
+ *.tgz binary
73
+ *.zip binary
74
+
75
+ # Text files where line endings should be preserved
76
+ *.patch -text
77
+
78
+ #
79
+ # Exclude files from exporting
80
+ #
81
+
82
+ .gitattributes export-ignore
83
+ .gitignore export-ignore
84
+ .gitkeep export-ignore
85
+ # Fix syntax highlighting on GitHub to allow comments
86
+ .devcontainer.json linguist-language=JSON-with-Comments
87
+ devcontainer.json linguist-language=JSON-with-Comments
88
+ # Apply override to all files in the directory
89
+ *.md linguist-detectable
90
+ # Basic .gitattributes for a python repo.
91
+
92
+ # Source files
93
+ # ============
94
+ *.pxd text diff=python
95
+ *.py text diff=python
96
+ *.py3 text diff=python
97
+ *.pyw text diff=python
98
+ *.pyx text diff=python
99
+ *.pyz text diff=python
100
+ *.pyi text diff=python
101
+
102
+ # Binary files
103
+ # ============
104
+ *.db binary
105
+ *.p binary
106
+ *.pkl binary
107
+ *.pickle binary
108
+ *.pyc binary export-ignore
109
+ *.pyo binary export-ignore
110
+ *.pyd binary
111
+
112
+ # Jupyter notebook
113
+ *.ipynb text eol=lf
114
+
115
+ # Note: .db, .p, and .pkl files are associated
116
+ # with the python modules ``pickle``, ``dbm.*``,
117
+ # ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
118
+ # (among others).
119
+ # Auto detect text files and perform normalization
120
+ * text=auto
121
+
122
+ *.rs text diff=rust
123
+ *.toml text diff=toml
124
+ Cargo.lock text
125
+ # Fix syntax highlighting on GitHub to allow comments
126
+ .vscode/*.json linguist-language=JSON-with-Comments
127
+ ## GITATTRIBUTES FOR WEB PROJECTS
128
+ #
129
+ # These settings are for any web project.
130
+ #
131
+ # Details per file setting:
132
+ # text These files should be normalized (i.e. convert CRLF to LF).
133
+ # binary These files are binary and should be left untouched.
134
+ #
135
+ # Note that binary is a macro for -text -diff.
136
+ ######################################################################
137
+
138
+ # Auto detect
139
+ ## Handle line endings automatically for files detected as
140
+ ## text and leave all files detected as binary untouched.
141
+ ## This will handle all files NOT defined below.
142
+ * text=auto
143
+
144
+ # Source code
145
+ *.bash text eol=lf
146
+ *.bat text eol=crlf
147
+ *.cmd text eol=crlf
148
+ *.coffee text
149
+ *.css text diff=css
150
+ *.htm text diff=html
151
+ *.html text diff=html
152
+ *.inc text
153
+ *.ini text
154
+ *.js text
155
+ *.json text
156
+ *.jsx text
157
+ *.less text
158
+ *.ls text
159
+ *.map text -diff
160
+ *.od text
161
+ *.onlydata text
162
+ *.php text diff=php
163
+ *.pl text
164
+ *.ps1 text eol=crlf
165
+ *.py text diff=python
166
+ *.rb text diff=ruby
167
+ *.sass text
168
+ *.scm text
169
+ *.scss text diff=css
170
+ *.sh text eol=lf
171
+ .husky/* text eol=lf
172
+ *.sql text
173
+ *.styl text
174
+ *.tag text
175
+ *.ts text
176
+ *.tsx text
177
+ *.xml text
178
+ *.xhtml text diff=html
179
+
180
+ # Docker
181
+ Dockerfile text
182
+
183
+ # Documentation
184
+ *.ipynb text eol=lf
185
+ *.markdown text diff=markdown
186
+ *.md text diff=markdown
187
+ *.mdwn text diff=markdown
188
+ *.mdown text diff=markdown
189
+ *.mkd text diff=markdown
190
+ *.mkdn text diff=markdown
191
+ *.mdtxt text
192
+ *.mdtext text
193
+ *.txt text
194
+ AUTHORS text
195
+ CHANGELOG text
196
+ CHANGES text
197
+ CONTRIBUTING text
198
+ COPYING text
199
+ copyright text
200
+ *COPYRIGHT* text
201
+ INSTALL text
202
+ license text
203
+ LICENSE text
204
+ NEWS text
205
+ readme text
206
+ *README* text
207
+ TODO text
208
+
209
+ # Templates
210
+ *.dot text
211
+ *.ejs text
212
+ *.erb text
213
+ *.haml text
214
+ *.handlebars text
215
+ *.hbs text
216
+ *.hbt text
217
+ *.jade text
218
+ *.latte text
219
+ *.mustache text
220
+ *.njk text
221
+ *.phtml text
222
+ *.svelte text
223
+ *.tmpl text
224
+ *.tpl text
225
+ *.twig text
226
+ *.vue text
227
+
228
+ # Configs
229
+ *.cnf text
230
+ *.conf text
231
+ *.config text
232
+ .editorconfig text
233
+ .env text
234
+ .gitattributes text
235
+ .gitconfig text
236
+ .htaccess text
237
+ *.lock text -diff
238
+ package.json text eol=lf
239
+ package-lock.json text eol=lf -diff
240
+ pnpm-lock.yaml text eol=lf -diff
241
+ .prettierrc text
242
+ yarn.lock text -diff
243
+ *.toml text
244
+ *.yaml text
245
+ *.yml text
246
+ browserslist text
247
+ Makefile text
248
+ makefile text
249
+ # Fixes syntax highlighting on GitHub to allow comments
250
+ tsconfig.json linguist-language=JSON-with-Comments
251
+
252
+ # Heroku
253
+ Procfile text
254
+
255
+ # Graphics
256
+ *.ai binary
257
+ *.bmp binary
258
+ *.eps binary
259
+ *.gif binary
260
+ *.gifv binary
261
+ *.ico binary
262
+ *.jng binary
263
+ *.jp2 binary
264
+ *.jpg binary
265
+ *.jpeg binary
266
+ *.jpx binary
267
+ *.jxr binary
268
+ *.pdf binary
269
+ *.png binary
270
+ *.psb binary
271
+ *.psd binary
272
+ # SVG treated as an asset (binary) by default.
273
+ *.svg text
274
+ # If you want to treat it as binary,
275
+ # use the following line instead.
276
+ # *.svg binary
277
+ *.svgz binary
278
+ *.tif binary
279
+ *.tiff binary
280
+ *.wbmp binary
281
+ *.webp binary
282
+
283
+ # Audio
284
+ *.kar binary
285
+ *.m4a binary
286
+ *.mid binary
287
+ *.midi binary
288
+ *.mp3 binary
289
+ *.ogg binary
290
+ *.ra binary
291
+
292
+ # Video
293
+ *.3gpp binary
294
+ *.3gp binary
295
+ *.as binary
296
+ *.asf binary
297
+ *.asx binary
298
+ *.avi binary
299
+ *.fla binary
300
+ *.flv binary
301
+ *.m4v binary
302
+ *.mng binary
303
+ *.mov binary
304
+ *.mp4 binary
305
+ *.mpeg binary
306
+ *.mpg binary
307
+ *.ogv binary
308
+ *.swc binary
309
+ *.swf binary
310
+ *.webm binary
311
+
312
+ # Archives
313
+ *.7z binary
314
+ *.gz binary
315
+ *.jar binary
316
+ *.rar binary
317
+ *.tar binary
318
+ *.zip binary
319
+
320
+ # Fonts
321
+ *.ttf binary
322
+ *.eot binary
323
+ *.otf binary
324
+ *.woff binary
325
+ *.woff2 binary
326
+
327
+ # Executables
328
+ *.exe binary
329
+ *.pyc binary
330
+ # Prevents massive diffs caused by vendored, minified files
331
+ **/.yarn/releases/** binary
332
+ **/.yarn/plugins/** binary
333
+
334
+ # RC files (like .babelrc or .eslintrc)
335
+ *.*rc text
336
+
337
+ # Ignore files (like .npmignore or .gitignore)
338
+ *.*ignore text
339
+
340
+ # Prevents massive diffs from built files
341
+ dist/* binary
@@ -0,0 +1,24 @@
1
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2
+ version: 2
3
+ updates:
4
+ - package-ecosystem: github-actions
5
+ directory: /
6
+ schedule:
7
+ interval: monthly
8
+
9
+ - package-ecosystem: cargo
10
+ directory: /
11
+ schedule:
12
+ interval: monthly
13
+ ignore:
14
+ - dependency-name: "*"
15
+ update-types: ["version-update:semver-patch"]
16
+ groups:
17
+ dev-dependencies:
18
+ applies-to: version-updates
19
+ dependency-type: development
20
+
21
+ - package-ecosystem: devcontainers
22
+ directory: "/"
23
+ schedule:
24
+ interval: monthly
@@ -0,0 +1,72 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ permissions: read-all
10
+
11
+ jobs:
12
+ lint:
13
+ name: Lint
14
+ runs-on: ubuntu-latest
15
+ timeout-minutes: 10
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Set up Rust
21
+ run: rustup show
22
+
23
+ - name: Manage Rust cache
24
+ uses: Swatinem/rust-cache@v2
25
+
26
+ - name: Check code formatting
27
+ run: cargo fmt --check
28
+
29
+ - name: Lint code
30
+ run: cargo clippy
31
+
32
+ test:
33
+ name: Test
34
+ runs-on: ubuntu-latest
35
+ timeout-minutes: 10
36
+ permissions:
37
+ contents: read
38
+ id-token: write
39
+ steps:
40
+ - name: Checkout
41
+ uses: actions/checkout@v4
42
+
43
+ - name: Set up Rust
44
+ run: rustup show
45
+
46
+ - name: Manage Rust cache
47
+ uses: Swatinem/rust-cache@v2
48
+
49
+ - name: Install devtools
50
+ uses: taiki-e/install-action@v2
51
+ with:
52
+ tool: cargo-binstall,cargo-llvm-cov,cargo-nextest
53
+
54
+ - name: Run tests
55
+ run: |
56
+ cargo llvm-cov nextest --workspace --lcov --output-path lcov.info
57
+ cargo llvm-cov report --summary-only
58
+
59
+ - name: Upload test results to Codecov
60
+ uses: codecov/codecov-action@v5
61
+ with:
62
+ use_oidc: true
63
+ fail_ci_if_error: false
64
+ report_type: test_results
65
+ files: target/nextest/default/junit.xml
66
+
67
+ - name: Upload coverage report
68
+ uses: codecov/codecov-action@v5
69
+ with:
70
+ use_oidc: true
71
+ fail_ci_if_error: false
72
+ files: lcov.info
@@ -0,0 +1,105 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ tags:
8
+ - v*
9
+
10
+ permissions: read-all
11
+
12
+ jobs:
13
+ build:
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ include:
18
+ - platform: ubuntu-latest
19
+ target: x86_64
20
+
21
+ name: Build (${{ matrix.target }})
22
+ runs-on: ${{ matrix.platform }}
23
+ timeout-minutes: 15
24
+ steps:
25
+ - name: Checkout
26
+ uses: actions/checkout@v4
27
+
28
+ - name: Build wheels
29
+ uses: PyO3/maturin-action@v1
30
+ with:
31
+ target: ${{ matrix.target }}
32
+ args: --release --out dist
33
+
34
+ - name: Upload wheels as artifact
35
+ uses: actions/upload-artifact@v4
36
+ with:
37
+ name: dist-${{ matrix.target }}
38
+ path: dist
39
+
40
+ sdist:
41
+ runs-on: ubuntu-latest
42
+ timeout-minutes: 15
43
+ steps:
44
+ - name: Checkout
45
+ uses: actions/checkout@v4
46
+
47
+ - name: Build sdist
48
+ uses: PyO3/maturin-action@v1
49
+ with:
50
+ command: sdist
51
+ args: --out dist
52
+
53
+ - name: Upload sdist as artifact
54
+ uses: actions/upload-artifact@v4
55
+ with:
56
+ name: sdist
57
+ path: dist
58
+
59
+ release:
60
+ name: Release
61
+ needs:
62
+ - build
63
+ - sdist
64
+ runs-on: ubuntu-latest
65
+ if: startsWith(github.ref, 'refs/tags/v')
66
+ timeout-minutes: 5
67
+ permissions:
68
+ contents: write
69
+ steps:
70
+ - name: Download binary artifacts
71
+ uses: actions/download-artifact@v4
72
+ with:
73
+ path: dist
74
+
75
+ - name: Show artifacts
76
+ run: ls -l --all --recursive dist
77
+
78
+ - name: Create release
79
+ uses: softprops/action-gh-release@v2
80
+ with:
81
+ generate_release_notes: true
82
+ files: dist/*
83
+
84
+ publish-pypi:
85
+ name: Publish to PyPI
86
+ needs: release
87
+ runs-on: ubuntu-latest
88
+ environment: pypi
89
+ timeout-minutes: 5
90
+ permissions:
91
+ id-token: write
92
+ steps:
93
+ - name: Download binary artifacts
94
+ uses: actions/download-artifact@v4
95
+ with:
96
+ path: dist
97
+ merge-multiple: true
98
+
99
+ - name: Show artifacts
100
+ run: ls -l --all --recursive dist
101
+
102
+ - name: Publish release distributions to PyPI
103
+ uses: pypa/gh-action-pypi-publish@release/v1
104
+ with:
105
+ skip-existing: true