trackforge 0.1.3__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.
@@ -0,0 +1,33 @@
1
+ # It may be located in the user home (`~/.cargo/audit.toml`) or in the project
2
+ # root (`.cargo/audit.toml`).
3
+ #
4
+ # All of the options which can be passed via CLI arguments can also be
5
+ # permanently specified in this file.
6
+
7
+ [advisories]
8
+ ignore = ["RUSTSEC-2024-0436"] # advisory IDs to ignore e.g. ["RUSTSEC-2019-0001", ...]
9
+ informational_warnings = ["unmaintained"] # warn for categories of informational advisories
10
+ severity_threshold = "low" # CVSS severity ("none", "low", "medium", "high", "critical")
11
+
12
+ # Advisory Database Configuration
13
+ [database]
14
+ path = "~/.cargo/advisory-db" # Path where advisory git repo will be cloned
15
+ url = "https://github.com/RustSec/advisory-db.git" # URL to git repo
16
+ fetch = true # Perform a `git fetch` before auditing (default: true)
17
+ stale = false # Allow stale advisory DB (i.e. no commits for 90 days, default: false)
18
+
19
+ # Output Configuration
20
+ [output]
21
+ deny = ["unmaintained"] # exit on error if unmaintained dependencies are found
22
+ format = "terminal" # "terminal" (human readable report) or "json"
23
+ quiet = false # Only print information on error
24
+ show_tree = true # Show inverse dependency trees along with advisories (default: true)
25
+
26
+ # Target Configuration
27
+ [target]
28
+ arch = ["x86_64"] # Ignore advisories for CPU architectures other than these
29
+ os = ["linux", "windows"] # Ignore advisories for operating systems other than these
30
+
31
+ [yanked]
32
+ enabled = true # Warn for yanked crates in Cargo.lock (default: true)
33
+ update_index = true # Auto-update the crates.io index (default: true)
@@ -0,0 +1,2 @@
1
+ [alias]
2
+ xtask = "run --package xtask --"
@@ -0,0 +1,78 @@
1
+ # configuration for https://github.com/commitizen/cz-cli
2
+
3
+ [tool.commitizen]
4
+ name = "cz_customize"
5
+ tag_format = "$version"
6
+ version_type = "semver"
7
+ version_provider = "cargo"
8
+ update_changelog_on_bump = true
9
+ major_version_zero = true
10
+ use_shortcuts = true
11
+
12
+ [tool.commitizen.customize]
13
+ message_template = """{{change_type}}({{scope}}): {{subject}}
14
+
15
+ {% if body %}\
16
+ {{body}}\
17
+ {% endif %}
18
+
19
+ {%if is_breaking_change %}\
20
+ BREAKING_CHANGE: \
21
+ {% endif %}\
22
+ {{footer}}\
23
+ """
24
+ example = "feature: this feature enable customize through config file"
25
+ schema = "<type>(<scope>): <subject>\n\n<body>\n\n<footer>"
26
+ schema_pattern = "(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)\\(\\w+\\):\\s(?P<subject>.*)(\\n\\n(?P<body>.*))?(\\n\\n(?P<footer>.*))?"
27
+
28
+ # The order needs to be preserved, as it influences the order when executing cz commit/cz c
29
+
30
+ # Change types
31
+ [[tool.commitizen.customize.questions]]
32
+ type = "list"
33
+ name = "change_type"
34
+ choices = [
35
+ { value = "build", name = "build: Changes that affect the build system or external dependencies (example scopes: pip, docker, npm)", key = "b" },
36
+ { value = "chore", name = "chore: A modification that generally does not fall into any other category", key = "c" },
37
+ { value = "ci", name = "ci: Changes to our CI configuration files and scripts (example scopes: GitLabCI)", key = "i" },
38
+ { value = "docs", name = "docs: Documentation only changes", key = "d" },
39
+ { value = "feat", name = "feat: A new feature.", key = "f" },
40
+ { value = "fix", name = "fix: A bug fix.", key = "x" },
41
+ { value = "perf", name = "perf: A code change that improves performance", key = "p" },
42
+ { value = "refactor", name = "refactor: A code change that neither fixes a bug nor adds a feature", key = "r" },
43
+ { value = "revert", name = "revert: Revert previous commits", key = "v" },
44
+ { value = "style", name = "style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)", key = "s" },
45
+ { value = "test", name = "test: Adding missing or correcting existing tests", key = "t" },
46
+ ]
47
+ message = "Select the type of change you are committing"
48
+
49
+ # The scope of the change, can be a file, class name or other context
50
+ [[tool.commitizen.customize.questions]]
51
+ type = "input"
52
+ name = "scope"
53
+ message = "What is the scope of this change? (class or file name): (press [enter] to skip)\n"
54
+
55
+ # Summary of the changes
56
+ [[tool.commitizen.customize.questions]]
57
+ "type" = "input"
58
+ "name" = "subject"
59
+ "message" = "Write a short and imperative summary of the code changes: (lower case and no period)\n"
60
+
61
+ # The commit body, elaborate the changes if need be.
62
+ [[tool.commitizen.customize.questions]]
63
+ type = "input"
64
+ name = "body"
65
+ message = "Provide additional contextual information about the code changes: (press [enter] to skip)\n"
66
+
67
+ # Specify if the changes are breaking
68
+ [[tool.commitizen.customize.questions]]
69
+ type = "confirm"
70
+ name = "is_breaking_change"
71
+ message = "Is this a BREAKING CHANGE?"
72
+ default = false
73
+
74
+ # Reference closing issues and share other
75
+ [[tool.commitizen.customize.questions]]
76
+ type = "input"
77
+ name = "footer"
78
+ message = "Footer. Information about Breaking Changes and reference issues that this commit closes: (press [enter] to skip)"
@@ -0,0 +1,17 @@
1
+ # configuration for https://editorconfig.org
2
+
3
+ root = true
4
+
5
+ [*]
6
+ charset = utf-8
7
+ end_of_line = lf
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
10
+
11
+ [*.rs]
12
+ indent_style = space
13
+ indent_size = 4
14
+
15
+ [*.yml]
16
+ indent_style = space
17
+ indent_size = 2
@@ -0,0 +1,11 @@
1
+ # See <https://help.github.com/articles/about-codeowners/>
2
+
3
+ # for more info about CODEOWNERS file
4
+
5
+ # It uses the same pattern rule for gitignore file
6
+
7
+ # <https://git-scm.com/docs/gitignore#_pattern_format>
8
+
9
+ # Maintainers
10
+
11
+ * @onuralpszr
@@ -0,0 +1,24 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ # Maintain dependencies for Cargo
9
+ - package-ecosystem: "cargo"
10
+ directory: "/" # Location of package manifests
11
+ schedule:
12
+ interval: "weekly"
13
+ # Maintain dependencies for GitHub Actions
14
+ - package-ecosystem: github-actions
15
+ directory: "/"
16
+ schedule:
17
+ interval: weekly
18
+ open-pull-requests-limit: 10
19
+
20
+ - package-ecosystem: "pip"
21
+ directory: "/" # Location of package manifests
22
+ schedule:
23
+ interval: "weekly"
24
+ open-pull-requests-limit: 10
@@ -0,0 +1,145 @@
1
+ # This file is autogenerated by maturin v0.14.17
2
+ # To update, run
3
+ #
4
+ # maturin generate-ci github
5
+ #
6
+ name: CI
7
+
8
+ on:
9
+ push:
10
+ branches:
11
+ - main
12
+ - master
13
+ tags:
14
+ - '*'
15
+ pull_request:
16
+ workflow_dispatch:
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ jobs:
22
+ rust-check:
23
+ name: Rust Check
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - uses: actions/checkout@v6
27
+ - uses: dtolnay/rust-toolchain@stable
28
+ with:
29
+ components: clippy, rustfmt
30
+ - name: Check formatting
31
+ run: cargo fmt --all -- --check
32
+ - name: Linting
33
+ run: cargo clippy -- -D warnings
34
+ - name: Run tests
35
+ run: cargo test
36
+
37
+ linux:
38
+ runs-on: ubuntu-latest
39
+ strategy:
40
+ matrix:
41
+ target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
42
+ steps:
43
+ - uses: actions/checkout@v6
44
+ - uses: actions/setup-python@v6
45
+ with:
46
+ python-version: '3.10'
47
+ - name: Build wheels
48
+ uses: PyO3/maturin-action@v1
49
+ with:
50
+ target: ${{ matrix.target }}
51
+ args: --release --out dist --find-interpreter
52
+ sccache: 'true'
53
+ manylinux: auto
54
+ - name: Upload wheels
55
+ uses: actions/upload-artifact@v6
56
+ with:
57
+ name: wheels-linux-${{ matrix.target }}
58
+ path: dist
59
+
60
+ windows:
61
+ runs-on: windows-latest
62
+ strategy:
63
+ matrix:
64
+ target: [x64, x86]
65
+ steps:
66
+ - uses: actions/checkout@v6
67
+ - uses: actions/setup-python@v6
68
+ with:
69
+ python-version: '3.10'
70
+ architecture: ${{ matrix.target }}
71
+ - name: Build wheels
72
+ uses: PyO3/maturin-action@v1
73
+ with:
74
+ target: ${{ matrix.target }}
75
+ args: --release --out dist --find-interpreter
76
+ sccache: 'true'
77
+ - name: Upload wheels
78
+ uses: actions/upload-artifact@v6
79
+ with:
80
+ name: wheels-windows-${{ matrix.target }}
81
+ path: dist
82
+
83
+ macos:
84
+ runs-on: macos-latest
85
+ strategy:
86
+ matrix:
87
+ target: [x86_64, aarch64]
88
+ steps:
89
+ - uses: actions/checkout@v6
90
+ - uses: actions/setup-python@v6
91
+ with:
92
+ python-version: '3.10'
93
+ - name: Build wheels
94
+ uses: PyO3/maturin-action@v1
95
+ with:
96
+ target: ${{ matrix.target }}
97
+ args: --release --out dist --find-interpreter
98
+ sccache: 'true'
99
+ - name: Upload wheels
100
+ uses: actions/upload-artifact@v6
101
+ with:
102
+ name: wheels-macos-${{ matrix.target }}
103
+ path: dist
104
+
105
+ sdist:
106
+ runs-on: ubuntu-latest
107
+ steps:
108
+ - uses: actions/checkout@v6
109
+ - name: Build sdist
110
+ uses: PyO3/maturin-action@v1
111
+ with:
112
+ command: sdist
113
+ args: --out dist
114
+ - name: Upload sdist
115
+ uses: actions/upload-artifact@v6
116
+ with:
117
+ name: wheels-sdist
118
+ path: dist
119
+
120
+ release:
121
+ name: Release
122
+ runs-on: ubuntu-latest
123
+ environment: pypi
124
+ if: "startsWith(github.ref, 'refs/tags/')"
125
+ permissions:
126
+ id-token: write
127
+ contents: read
128
+ needs: [linux, windows, macos, sdist]
129
+ steps:
130
+ - uses: actions/checkout@v6
131
+ - uses: dtolnay/rust-toolchain@stable
132
+ - uses: actions/download-artifact@v7
133
+ with:
134
+ pattern: wheels-*
135
+ merge-multiple: true
136
+ path: dist
137
+ - name: Publish to PyPI
138
+ uses: PyO3/maturin-action@v1
139
+ with:
140
+ command: upload
141
+ args: --skip-existing dist/*
142
+ - name: Publish to Crates.io
143
+ env:
144
+ CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
145
+ run: cargo publish
@@ -0,0 +1,40 @@
1
+ name: Codecov
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ workflow_dispatch:
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ coverage:
15
+ name: coverage
16
+ runs-on: ubuntu-latest
17
+
18
+ steps:
19
+ - uses: actions/checkout@v6
20
+
21
+ - name: Set up Rust
22
+ uses: dtolnay/rust-toolchain@nightly
23
+
24
+ - name: Cache build artifacts
25
+ uses: Swatinem/rust-cache@v2.8.2
26
+
27
+ - name: Install cargo-llvm-cov
28
+ uses: taiki-e/install-action@v2.65.2
29
+ with:
30
+ tool: cargo-llvm-cov
31
+
32
+ - name: Coverage
33
+ run: cargo llvm-cov --features python --workspace --lcov --output-path lcov.info
34
+
35
+ - name: Upload coverage to Codecov
36
+ uses: codecov/codecov-action@v5.5.2
37
+ with:
38
+ files: ./lcov.info
39
+ token: ${{ secrets.CODECOV_TOKEN }}
40
+ flags: trackforge
@@ -0,0 +1,15 @@
1
+ name: Security audit
2
+ on:
3
+ push:
4
+ paths:
5
+ - '**/Cargo.toml'
6
+ - '**/Cargo.lock'
7
+ jobs:
8
+ security_audit:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v6
12
+ - uses: rustsec/audit-check@v2.0.0
13
+ with:
14
+ token: ${{ secrets.GITHUB_TOKEN }}
15
+ ignore: RUSTSEC-2024-0436
@@ -0,0 +1,93 @@
1
+ /target
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ .pytest_cache/
6
+ *.py[cod]
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ .venv/
14
+ env/
15
+ bin/
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ include/
26
+ man/
27
+ venv/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+
32
+ # Installer logs
33
+ pip-log.txt
34
+ pip-delete-this-directory.txt
35
+ pip-selfcheck.json
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .coverage
41
+ .cache
42
+ nosetests.xml
43
+ coverage.xml
44
+
45
+ # Translations
46
+ *.mo
47
+
48
+ # Mr Developer
49
+ .mr.developer.cfg
50
+ .project
51
+ .pydevproject
52
+
53
+ # Rope
54
+ .ropeproject
55
+
56
+ # Django stuff:
57
+ *.log
58
+ *.pot
59
+
60
+ .DS_Store
61
+
62
+ # Sphinx documentation
63
+ docs/_build/
64
+
65
+ # PyCharm
66
+ .idea/
67
+
68
+ # VSCode
69
+ .vscode/
70
+
71
+ # Pyenv
72
+ .python-version
73
+
74
+ # weights
75
+ *.pt
76
+ *.onnx
77
+
78
+ # Videos and Images
79
+ *.mp4
80
+ *.avi
81
+ *.jpg
82
+ *.png
83
+ *.jpeg
84
+
85
+ # mypycache
86
+ .mypy_cache/
87
+ .dmypy.json
88
+
89
+ # cargo advisory db lock file
90
+ ~/.cargo/advisory-db..lock
91
+
92
+ # Codeconv
93
+ lcov.info
@@ -0,0 +1,67 @@
1
+ # Contribution guidelines
2
+
3
+ First off, thank you for considering contributing to Trackforge.
4
+
5
+ If your contribution is not straightforward, please first discuss the change you wish to make by creating a new issue before making the change, or starting a discussion on GitHub.
6
+
7
+ ## AI Generated Content
8
+
9
+ We welcome high quality PRs, whether they are human generated or made with the assistance of AI tools, but we ask that you follow these guidelines:
10
+
11
+ - **Attribution**: Tell us about your use of AI tools.
12
+ - **Review**: Make sure you review every line of AI generated content for correctness and relevance.
13
+ - **Quality**: AI-generated content should meet the same quality standards as human-written content.
14
+
15
+ ## Pull requests
16
+
17
+ All contributions are welcome. Please include as many details as possible in your PR description.
18
+
19
+ ### Keep PRs small, intentional, and focused
20
+
21
+ - Aim for PRs under 500 lines of changes when possible.
22
+ - Separate refactoring, formatting, and functional changes into different PRs.
23
+
24
+ ### Code formatting
25
+
26
+ Run `cargo fmt` before committing to ensure that code is consistently formatted.
27
+
28
+ ## Implementation Guidelines
29
+
30
+ ### Setup
31
+
32
+ TL;DR: Clone the repo and build it using `cargo` (for Rust) or `maturin` (for Python).
33
+
34
+ ```shell
35
+ git clone https://github.com/onuralpszr/trackforge.git
36
+ cd trackforge
37
+
38
+ # Pure Rust Development
39
+ cargo build
40
+ cargo test
41
+
42
+ # Python Development
43
+ # Ensure you are in a virtual environment
44
+ maturin develop
45
+ ```
46
+
47
+ ### Tests
48
+
49
+ - **Rust**: Run `cargo test` to execute unit and integration tests.
50
+ - **Python**: Run `pytest` (when available) to check Python bindings.
51
+
52
+ ### Continuous Integration
53
+
54
+ We use GitHub Actions for CI where we perform the following checks:
55
+
56
+ - The code should compile on stable Rust.
57
+ - The tests should pass (`cargo test`).
58
+ - The code should be formatted (`cargo fmt`).
59
+ - The code should pass hygiene checks (`cargo clippy`).
60
+
61
+ You can check these locally:
62
+
63
+ ```shell
64
+ cargo fmt --all -- --check
65
+ cargo clippy -- -D warnings
66
+ cargo test
67
+ ```