-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add slim super linter * correct and ignore linting errors * update linter settings * only use black for python linting
- Loading branch information
1 parent
a2a108a
commit 5df4d5a
Showing
17 changed files
with
131 additions
and
85 deletions.
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
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,10 +1,11 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" # See documentation for possible values | ||
directory: "." # Location of package manifests | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "github-actions" # See documentation for possible values | ||
directory: ".github/workflows" # Location of package manifests | ||
schedule: | ||
interval: "weekly" | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" # See documentation for possible values | ||
directory: "." # Location of package manifests | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "github-actions" # See documentation for possible values | ||
directory: ".github/workflows" # Location of package manifests | ||
schedule: | ||
interval: "weekly" |
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,6 @@ | ||
--- | ||
ignored: | ||
- DL3006 | ||
- DL3008 | ||
- DL3009 | ||
- DL3059 |
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,6 @@ | ||
--- | ||
MD013: false | ||
MD024: false | ||
MD025: false | ||
MD034: false | ||
MD041: false |
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 @@ | ||
--- |
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,32 @@ | ||
--- | ||
name: Lint | ||
|
||
on: # yamllint disable-line rule:truthy | ||
push: null | ||
|
||
jobs: | ||
build: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: read | ||
# To report GitHub Actions status checks | ||
statuses: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Super-linter | ||
uses: super-linter/super-linter/[email protected] # x-release-please-version | ||
env: | ||
DEFAULT_BRANCH: main | ||
# To report GitHub Actions status checks | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_ACTIONS_COMMAND_ARGS: '-ignore SC.*' | ||
VALIDATE_PYTHON_FLAKE8: false | ||
VALIDATE_PYTHON_ISORT: false | ||
VALIDATE_PYTHON_PYLINT: false | ||
VALIDATE_PYTHON_MYPY: false |
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
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,3 +1,4 @@ | ||
--- | ||
name: Unit Tests | ||
on: | ||
pull_request: | ||
|
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
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
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
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
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,28 +1,29 @@ | ||
data_dir: ./data | ||
# Huggingface | ||
embeddings_model: sentence-transformers/all-mpnet-base-v2 | ||
introduction: Ah my good fellow! | ||
# Sources | ||
mediawikis: | ||
# - dnd4e | ||
- dnd5e | ||
# - darksun | ||
- dragonlance | ||
- eberron | ||
# - exandria | ||
- forgottenrealms | ||
- greyhawk | ||
# - planescape | ||
# - ravenloft | ||
# - spelljammer | ||
# Ollama | ||
model: volo | ||
question: How many eyestalks does a Beholder have? | ||
settings: | ||
num_sources: 4 | ||
repeat_penalty: 1.3 | ||
temperature: 0.4 | ||
top_k: 20 | ||
top_p: 0.35 | ||
# Sources Path | ||
source: ./sources | ||
--- | ||
data_dir: ./data | ||
# Huggingface | ||
embeddings_model: sentence-transformers/all-mpnet-base-v2 | ||
introduction: Ah my good fellow! | ||
# Sources | ||
mediawikis: | ||
# - dnd4e | ||
- dnd5e | ||
# - darksun | ||
- dragonlance | ||
- eberron | ||
# - exandria | ||
- forgottenrealms | ||
- greyhawk | ||
# - planescape | ||
# - ravenloft | ||
# - spelljammer | ||
# Ollama | ||
model: volo | ||
question: How many eyestalks does a Beholder have? | ||
settings: | ||
num_sources: 4 | ||
repeat_penalty: 1.3 | ||
temperature: 0.4 | ||
top_k: 20 | ||
top_p: 0.35 | ||
# Sources Path | ||
source: ./sources |
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
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
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,30 +1,32 @@ | ||
import pytest | ||
|
||
optional_markers = { | ||
"ollama": {"help": "Test ollama backend with Langchain", | ||
"marker-descr": "Enable langchain tests with ollana", | ||
"skip-reason": "Test only runs with the --{} option."}, | ||
"ollama": { | ||
"help": "Test ollama backend with Langchain", | ||
"marker-descr": "Enable langchain tests with ollana", | ||
"skip-reason": "Test only runs with the --{} option.", | ||
}, | ||
} | ||
|
||
|
||
def pytest_addoption(parser): | ||
for marker, info in optional_markers.items(): | ||
parser.addoption("--{}".format(marker), action="store_true", | ||
default=False, help=info['help']) | ||
parser.addoption( | ||
"--{}".format(marker), action="store_true", default=False, help=info["help"] | ||
) | ||
|
||
|
||
def pytest_configure(config): | ||
for marker, info in optional_markers.items(): | ||
config.addinivalue_line("markers", | ||
"{}: {}".format(marker, info['marker-descr'])) | ||
config.addinivalue_line( | ||
"markers", "{}: {}".format(marker, info["marker-descr"]) | ||
) | ||
|
||
|
||
def pytest_collection_modifyitems(config, items): | ||
for marker, info in optional_markers.items(): | ||
if not config.getoption("--{}".format(marker)): | ||
skip_test = pytest.mark.skip( | ||
reason=info['skip-reason'].format(marker) | ||
) | ||
skip_test = pytest.mark.skip(reason=info["skip-reason"].format(marker)) | ||
for item in items: | ||
if marker in item.keywords: | ||
item.add_marker(skip_test) |
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