-
Notifications
You must be signed in to change notification settings - Fork 0
feat: init project #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
66ce9aa
feat: init project
kuronull 07271c1
feat: init project
kuronull 5c2e562
feat: init project
kuronull dc67b55
feat: init project
kuronull 9962730
feat: init project
kuronull 070f6a3
chore(ci): update github_ci
kuronull 7afe431
chore(ci): update github_build
kuronull 8e6a707
chore: update Makefile
kuronull 39f8be4
chore: refactor and update dependencies
kuronull 0586c2e
chore(lint): update pre-commit hooks configuration
kuronull a98c05b
chore: adjust .editorconfig for consistent formatting rules
kuronull 89b5f24
docs: update README
kuronull 563d53a
test: update dummy test for compatibility with new setup
kuronull 48c7504
feat: init-project
kuronull 3ce9292
chore(ci): update workflow
kuronull 561f1fd
chore: update Makefile
kuronull 6f72c75
chore(lint): Update pre-commit hooks configuration
kuronull ec8aa37
chore: update configuration ruff file
kuronull 9acd2e1
feat: init-project
kuronull 024dcc4
feat: init-project
kuronull ed2f711
chore: refactor and update dependencies
kuronull 11e21bd
chore: update Makefile
kuronull 88c6091
feat: init-project
kuronull 97cbfe7
feat: init-project
kuronull 4d209dd
feat: init-project
kuronull 8c8982c
feat: init-project
kuronull a462bb2
feat: init-project
kuronull 7ff9b97
chore: update ci
kuronull File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,22 @@ | ||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| indent_size = 2 | ||
| indent_style = space | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true | ||
|
|
||
| [*.md] | ||
| trim_trailing_whitespace = true | ||
|
|
||
| [*.py] | ||
| indent_style = space | ||
| indent_size = 4 | ||
|
|
||
| [Makefile] | ||
| indent_style = tab | ||
|
|
||
| [*Dockerfile*] | ||
| indent_size = 4 | ||
This file contains hidden or 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 @@ | ||
| name: Build and Publish to PyPI | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v*" # Trigger on version tags | ||
|
|
||
| jobs: | ||
| build-and-publish: | ||
| needs: ci | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install the latest version of uv | ||
| uses: astral-sh/setup-uv@v6 | ||
| with: | ||
| python-version: "3.12" | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| uv sync --all-packages | ||
|
|
||
| - name: Build package | ||
| run: uv build --all-packages | ||
|
|
||
| - name: Publish to PyPI | ||
| run: | | ||
| uv publish --username ${{ secrets.PYPI_USERNAME }} --password ${{ secrets.PYPI_PASSWORD }} |
This file contains hidden or 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,39 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["main"] | ||
| pull_request: | ||
| branches: ["main"] | ||
|
|
||
| jobs: | ||
| ci: | ||
| name: Run Unit Tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install the latest version of uv | ||
| uses: astral-sh/setup-uv@v6 | ||
| with: | ||
| python-version: "3.12" | ||
|
|
||
| - name: Install dependencies with uv | ||
| run: | | ||
| uv sync --all-packages | ||
|
|
||
|
kuronull marked this conversation as resolved.
|
||
| - name: Run linter python source files | ||
| run: | | ||
| make lint | ||
|
|
||
| - name: Run unit tests | ||
| run: | | ||
| uv run pytest --cov=src --cov-report=xml --cov-report=html --cov-fail-under=0 | ||
|
|
||
| - name: Upload coverage report | ||
| uses: codecov/codecov-action@v4 | ||
|
kuronull marked this conversation as resolved.
|
||
| with: | ||
| files: coverage.xml | ||
| flags: unittests | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
This file contains hidden or 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,125 @@ | ||
| # Byte-compiled / optimized / DLL files | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *$py.class | ||
|
|
||
| # C extensions | ||
| *.so | ||
|
|
||
| # Distribution / packaging | ||
| .Python | ||
| build/ | ||
| develop-eggs/ | ||
| dist/ | ||
| downloads/ | ||
| eggs/ | ||
| .eggs/ | ||
| lib/ | ||
| lib64/ | ||
| parts/ | ||
| sdist/ | ||
| var/ | ||
| wheels/ | ||
| pip-wheel-metadata/ | ||
| share/python-wheels/ | ||
| *.egg-info/ | ||
| .installed.cfg | ||
| *.egg | ||
| MANIFEST | ||
|
|
||
| # PyInstaller | ||
| # Usually these files are written by a python script from a template | ||
| # before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
| *.manifest | ||
| *.spec | ||
|
|
||
| # Unit test / coverage reports | ||
| htmlcov/ | ||
| .tox/ | ||
| .nox/ | ||
| .coverage | ||
| .coverage.* | ||
| .cache | ||
| nosetests.xml | ||
| coverage.xml | ||
| *.cover | ||
| *.py,cover | ||
| .hypothesis/ | ||
| .pytest_cache/ | ||
|
|
||
| # Translations | ||
| *.mo | ||
| *.pot | ||
|
|
||
| # Django stuff: | ||
| *.log | ||
| local_settings.py | ||
| db.sqlite3 | ||
| db.sqlite3-journal | ||
|
|
||
| # Flask stuff: | ||
| instance/ | ||
| .webassets-cache | ||
|
|
||
| # Scrapy stuff: | ||
| .scrapy | ||
|
|
||
| # Sphinx documentation | ||
| docs/_build/ | ||
|
|
||
| # PyBuilder | ||
| target/ | ||
|
|
||
| # Jupyter Notebook | ||
| .ipynb_checkpoints | ||
|
|
||
| # IPython | ||
| profile_default/ | ||
| ipython_config.py | ||
|
|
||
|
|
||
| # pipenv | ||
| # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
| # However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
| # having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
| # install all needed dependencies. | ||
| #Pipfile.lock | ||
|
|
||
| # PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
| __pypackages__/ | ||
|
|
||
| # Celery stuff | ||
| celerybeat-schedule | ||
| celerybeat.pid | ||
|
|
||
| # SageMath parsed files | ||
| *.sage.py | ||
|
|
||
| # Environments | ||
| .env | ||
| .venv | ||
| env/ | ||
| venv/ | ||
| ENV/ | ||
| env.bak/ | ||
| venv.bak/ | ||
|
|
||
| # Spyder project settings | ||
| .spyderproject | ||
| .spyproject | ||
|
|
||
| # Rope project settings | ||
| .ropeproject | ||
|
|
||
| # mkdocs documentation | ||
| /site | ||
|
|
||
| # mypy | ||
| .mypy_cache/ | ||
| .dmypy.json | ||
| dmypy.json | ||
|
|
||
| # Pyre type checker | ||
| .pyre/ | ||
|
|
||
| volumes/ |
This file contains hidden or 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,61 @@ | ||
| repos: | ||
| - repo: https://github.com/pre-commit/pre-commit-hooks | ||
| rev: v5.2.0 | ||
| hooks: | ||
| - id: check-added-large-files | ||
| args: [--maxkb=500, --enforce-all] | ||
| - id: check-ast | ||
| - id: check-case-conflict | ||
| - id: check-docstring-first | ||
| - id: check-executables-have-shebangs | ||
| - id: check-illegal-windows-names | ||
| - id: check-json | ||
| - id: check-merge-conflict | ||
| - id: check-shebang-scripts-are-executable | ||
| - id: check-symlinks | ||
| - id: check-toml | ||
| - id: check-yaml | ||
| - id: debug-statements | ||
| - id: destroyed-symlinks | ||
| - id: detect-private-key | ||
| - id: end-of-file-fixer | ||
| - id: mixed-line-ending | ||
| args: [--fix=lf] | ||
| - id: name-tests-test | ||
| args: [--pytest-test-first] | ||
| - id: pretty-format-json | ||
| args: [--autofix, --no-sort-keys] | ||
| - id: requirements-txt-fixer | ||
| - id: trailing-whitespace | ||
|
|
||
| - repo: https://github.com/pre-commit/pygrep-hooks | ||
| rev: v1.12.0 | ||
| hooks: | ||
| - id: python-check-blanket-noqa | ||
| - id: python-check-blanket-type-ignore | ||
| - id: python-check-mock-methods | ||
| - id: python-no-eval | ||
| - id: python-no-log-warn | ||
| - id: python-use-type-annotations | ||
| - id: text-unicode-replacement-char | ||
|
|
||
| - repo: https://github.com/astral-sh/ruff-pre-commit | ||
| rev: v0.12.3 | ||
| hooks: | ||
| - id: ruff-check | ||
| - id: ruff-format | ||
|
|
||
| - repo: local | ||
| hooks: | ||
| - id: mypy | ||
| name: mypy | ||
| entry: uv run mypy | ||
| types: [python] | ||
| language: system | ||
| - id: pytest | ||
| name: pytest | ||
| entry: uv run pytest -m "not slow" | ||
| types: [python] | ||
| language: system | ||
| pass_filenames: false | ||
| always_run: true |
This file contains hidden or 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 @@ | ||
| 3.12 |
This file contains hidden or 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,85 @@ | ||
| cache-dir = ".cache/ruff" | ||
| extend-exclude = [".cache"] | ||
| fix = true | ||
| line-length = 80 | ||
| preview = true | ||
| src = [".", "src", "tests"] | ||
| target-version = "py312" | ||
|
|
||
| [format] | ||
| docstring-code-format = true | ||
| line-ending = "lf" | ||
|
|
||
| [lint] | ||
| select = ["ALL"] | ||
| ignore = [ | ||
| # Missing docstring in public module | ||
| "D100", | ||
| # Missing docstring in public class | ||
| "D101", | ||
| # Missing docstring in public method | ||
| "D102", | ||
| # Missing docstring in public function | ||
| "D103", | ||
| # Missing docstring in public package | ||
| "D104", | ||
| # Missing docstring in magic method | ||
| "D105", | ||
| # Missing docstring in __init__ | ||
| "D107", | ||
| # Trailing comma missing | ||
| "COM812", | ||
| # Implicitly concatenated string literals on one line | ||
| "ISC001", | ||
| # Missing copyright notice at top of file | ||
| "CPY001", | ||
| ] | ||
| typing-modules = ["numpy.typing"] | ||
|
|
||
| [lint.per-file-ignores] | ||
| "**/scripts/*" = [ | ||
| # `print` found | ||
| "T201", | ||
| # File {filename} is part of an implicit namespace package. Add an __init__.py. | ||
| "INP001", | ||
| ] | ||
|
|
||
|
kuronull marked this conversation as resolved.
|
||
| [lint.flake8-import-conventions.extend-aliases] | ||
| scipy = "sp" | ||
|
|
||
| [lint.flake8-pytest-style] | ||
| fixture-parentheses = true | ||
| mark-parentheses = true | ||
|
|
||
| [lint.flake8-tidy-imports] | ||
| ban-relative-imports = "all" | ||
|
|
||
| [lint.flake8-type-checking] | ||
| exempt-modules = ["typing", "typing_extensions"] | ||
| strict = true | ||
|
|
||
| [lint.isort] | ||
| length-sort = true | ||
| lines-after-imports = 2 | ||
| required-imports = ["from __future__ import annotations"] | ||
| section-order = [ | ||
| "future", | ||
| "standard-library", | ||
| "third-party", | ||
| "testing", | ||
| "first-party", | ||
| "local-folder", | ||
| ] | ||
| known-first-party = ['vecmodel'] | ||
|
|
||
| [lint.isort.sections] | ||
| testing = ["pytest", "pytest_mock", "hypothesis"] | ||
|
|
||
| [lint.mccabe] | ||
| max-complexity = 6 | ||
|
|
||
| [lint.pycodestyle] | ||
| max-doc-length = 80 | ||
|
|
||
| [lint.pydocstyle] | ||
| convention = "google" | ||
This file contains hidden or 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,12 @@ | ||
| { | ||
| "recommendations": [ | ||
| "EditorConfig.EditorConfig", | ||
| "tamasfe.even-better-toml", | ||
| "ms-python.mypy-type-checker", | ||
| "esbenp.prettier-vscode", | ||
| "ms-python.vscode-pylance", | ||
| "ms-python.python", | ||
| "charliermarsh.ruff", | ||
| "nefrob.vscode-just-syntax" | ||
| ] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.