-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
433 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs | ||
|
||
# Top-most EditorConfig file | ||
root = true | ||
|
||
# Python files | ||
[*.py] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.{yaml,json}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
use flake | ||
dotenv | ||
|
||
# https://python-poetry.org/docs/basic-usage/#activating-the-virtual-environment | ||
source $(poetry env info --path)/bin/activate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
name: "CI" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
# https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#caching-packages | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
cache: poetry | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
|
||
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#using-ruff-to-lint-code | ||
- name: Ruff | ||
run: poetry run ruff --output-format=github . | ||
continue-on-error: true | ||
|
||
- name: Mypy | ||
run: poetry run mypy . | ||
|
||
# https://github.com/codecov/example-python | ||
- name: Pytest | ||
run: poetry run pytest --cov=src --cov-report=xml | ||
|
||
# - name: Compile Vertex Pipeline | ||
# run: python -m src.dazai_bert_pipeline.compile | ||
|
||
- name: Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"files.exclude": { | ||
".venv": true, | ||
".mypy_cache": true, | ||
".ruff_cache": true, | ||
".pytest_cache": true, | ||
"**/*.egg-info": true, | ||
"**/__pycache__": true | ||
}, | ||
"[python]": { | ||
"editor.defaultFormatter": "charliermarsh.ruff", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "always" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
# ainu-llm | ||
# ainu-nlp | ||
|
||
[![CI](https://github.com/aynumosir/ainu-nlp/actions/workflows/ci.yaml/badge.svg)](https://github.com/aynumosir/ainu-nlp/actions/workflows/ci.yaml) | ||
[![codecov](https://codecov.io/gh/aynumosir/ainu-nlp/graph/badge.svg?token=K8CFQ0UBPN)](https://codecov.io/gh/aynumosir/ainu-nlp) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
description = "A very basic flake"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; | ||
}; | ||
|
||
outputs = { self, nixpkgs }: let | ||
pkgs = nixpkgs.legacyPackages.aarch64-darwin; | ||
in | ||
{ | ||
devShell.aarch64-darwin = pkgs.mkShell { | ||
buildInputs = with pkgs; [ | ||
python311 | ||
poetry | ||
# google-cloud-sdk | ||
]; | ||
}; | ||
}; | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[tool.poetry] | ||
name = "ainu-nlp" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["Ryo Igarashi <[email protected]>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
package-mode = false | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.11" | ||
|
||
|
||
[tool.poetry.group.dev.dependencies] | ||
pytest = "^8.1.1" | ||
pytest-cov = "^4.1.0" | ||
ruff = "^0.3.3" | ||
mypy = "^1.9.0" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.mypy] | ||
ignore_missing_imports = true | ||
exclude = ["dazai_bert_pipeline"] | ||
|
||
[tool.ruff.lint] | ||
select = ["E4", "E7", "E9", "F", "I", "ANN"] | ||
ignore = ["ANN101", "ANN102"] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def add(x: int, y: int) -> int: | ||
return x + y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from .add import add | ||
|
||
|
||
def test_add() -> None: | ||
assert add(1, 2) == 3 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
def add(x: int, y: int) -> int: | ||
return x + y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from .add import add | ||
|
||
|
||
def test_add() -> None: | ||
assert add(1, 2) == 3 |