Skip to content
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

adding pre-commit system for better commit #13

Merged
merged 12 commits into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
[*.{md,py}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 4
[*.md]
trim_trailing_whitespace = false
[*.py]
trim_trailing_whitespace = true
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*.{md,py}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 4

[*.md]
trim_trailing_whitespace = false

[*.py]
trim_trailing_whitespace = true
62 changes: 62 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
ci:
autofix_commit_msg: |
style(pre-commit.ci): auto fixes from pre-commit hooks

for more information, see https://pre-commit.ci
autoupdate_branch: ''
autoupdate_commit_msg: 'ci(deps): pre-commit autoupdate'
autoupdate_schedule: weekly
skip: [ruff]

default_language_version:
python: python3.12
default_stages:
- "pre-commit"
default_install_hook_types:
- "pre-commit"
- "commit-msg"
- "post-checkout"
- "post-merge"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: check-added-large-files
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: '^(.+\.md|LICENSE)$'
- id: mixed-line-ending
args:
- "--fix=lf"
- id: check-toml
- id: check-yaml
- id: check-ast
- repo: https://github.com/python-poetry/poetry
rev: "1.8.2"
hooks:
- id: poetry-check
- id: poetry-lock
- id: poetry-install
files: "^(pyproject.toml|poetry.lock)$"
always_run: false
stages:
- "post-checkout"
- "post-merge"
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.21.3
hooks:
- id: commitizen
stages:
- "commit-msg"
- repo: https://github.com/executablebooks/mdformat
rev: "0.7.17"
hooks:
- id: mdformat
additional_dependencies:
- "mdformat-gfm"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.3.5"
hooks:
- id: ruff-format
- id: ruff
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
***In Development - Yep, it's still crawling. Cue the baby theme music.***. USE AT YOUR OWN RISK!

## So, What's the Idea Here?

**BasiliskLLM** is like the cool uncle of LLM interaction tools. Drawing "inspiration" (a.k.a. brilliant ideas stolen in the dead of night) from [OpenAI's NVDA add-on](https://github.com/aaclause/nvda-OpenAI/), it aims to do what every project dreams of: actually be useful. Our noble mission? To make chatting with large language models (LLMs) so easy, even your grandma could do it blindfolded. Whether you're into OpenAI, OpenRouter, Mistral, or running your own secretive AI in the basement, we've got you covered. Yes, even you, screen reader users. We see you.

### And the Name? Seriously?

Why does anyone name anything? Partially as a joke, partially hoping it becomes a self-fulfilling prophecy. Why this particular name? It's a nod to the infamous **Roko's basilisk**, which if you're curious (or bored), you can dive into [here](https://en.wikipedia.org/wiki/Roko%27s_basilisk) and [here](https://www.lesswrong.com/tag/rokos-basilisk). Spoiler alert: it's the ultimate rabbit hole.

## Download and installation

Hold your horses! Not quite there yet...

## Shortcuts
Expand All @@ -35,23 +38,27 @@ Requirements: Python 3.12.2 (because only the best for us, obviously)

The project requires poetry. To install it visit the [Poetry installation guide](https://python-poetry.org/docs/#installing-with-pipx).
For short reference:

```shell
pip3.12 install pipx
pipx ensurepath
pipx install poetry
```

In the root of what may soon become your favorite project, install dependencies with poetry. It will create a special virtual environment for the project.

```shell
poetry install
```

Activate the virtual environment (because magic needs a little nudge):

```shell
poetry shell
```

Ready to watch the code baby crawl, maybe even walk? Fire up the project:

```shell
cd src
python main.pyw
Expand Down
Loading