Skip to content

Commit

Permalink
feat: init
Browse files Browse the repository at this point in the history
  • Loading branch information
ChieloNewctle committed Apr 25, 2024
0 parents commit 481d67b
Show file tree
Hide file tree
Showing 15 changed files with 1,477 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: weekly
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Cargo Build & Test

on:
push:
pull_request:
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
build_and_test:
name: Build & Test
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: cargo build --verbose
- run: cargo test --verbose
- run: cargo build --all-features --verbose
- run: cargo test --all-features --verbose
- run: cargo install cargo-all-features
- run: cargo check-all-features --verbose
- run: cargo build-all-features --verbose
- run: cargo test-all-features --verbose

rustfmt:
name: Check Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: rustup update stable && rustup default stable
- run: rustup component add rustfmt
- run: cargo fmt --all --check

build_docs:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: rustup update nightly && rustup default nightly
- run: RUSTDOCFLAGS="--cfg doc_cfg --html-in-header ./docs-header.html" cargo +nightly doc --all-features --no-deps
29 changes: 29 additions & 0 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release-plz

permissions:
pull-requests: write
contents: write

on:
workflow_run:
workflows: [Cargo Build & Test]
types: [completed]
branches: [main]

jobs:
release-plz:
name: Release-plz
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
uses: MarcoIeni/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
76 changes: 76 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/target
Cargo.lock

# Byte-compiled / optimized / DLL files
__pycache__/
.pytest_cache/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
.venv/
env/
bin/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
include/
man/
venv/
*.egg-info/
.installed.cfg
*.egg

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
pip-selfcheck.json

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo

# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# Rope
.ropeproject

# Django stuff:
*.log
*.pot

.DS_Store

# Sphinx documentation
docs/_build/

# PyCharm
.idea/

# VSCode
.vscode/

# Pyenv
.python-version

# pytest-readme
python/tests/test_readme.py
25 changes: 25 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "mtc-token-healing"
version = "0.1.0"
edition = "2021"

[dependencies]
derive_more = "0.99.17"
general-sam = { version = "1.0.0", features = ["trie"] }
pyo3 = { version = "0.21.2", optional = true }
serde = { version = "1.0.198", optional = true }
smallvec = "1.13.2"
thiserror = "1.0.59"

[features]
pyo3 = ["dep:pyo3"]
serde = ["dep:serde", "smallvec/serde"]

[dev-dependencies]
clap = { version = "4.5.4", features = ["derive", "env"] }
color-eyre = "0.6.3"
rand = "0.8.5"
regex = "1.10.4"
serde_json = "1.0.116"
tokenizers = { version = "0.19.1", features = ["hf-hub", "http"] }
tokio = { version = "1.37.0", features = ["rt-multi-thread"] }
Loading

0 comments on commit 481d67b

Please sign in to comment.