Skip to content

Commit

Permalink
Merge pull request #14 from EURAC-EEBgroup/main
Browse files Browse the repository at this point in the history
Alignment
  • Loading branch information
PeriniM authored Nov 11, 2024
2 parents f495549 + 2372873 commit f507cf5
Show file tree
Hide file tree
Showing 86 changed files with 2,457 additions and 412 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
OPENAI_API_KEY=sk-example-1234567890abcdef1234567890abcdef
ANTHROPIC_API_KEY=sk-example-1234567890abcdef1234567890abcdef
FIREWORKS_API_KEY=sk-example-1234567890abcdef1234567890abcdef
FIREWORKS_API_KEY=sk-example-1234567890abcdef1234567890abcdef
109 changes: 109 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: 🐛 Bug report
description: Submit a bug report to help us improve BrickLLM.
labels: ["type:bug", "status:needs-triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report this problem!
We really appreciate the community's efforts to improve BrickLLM.
- type: checkboxes
attributes:
label: Checklist
description: Please confirm and check all the following options.
options:
- label: I have searched the [existing issues](https://github.com/EURAC-EEBgroup/brick-llm/issues) for similar issues.
required: true
- label: I added a very descriptive title to this issue.
required: true
- label: I have provided sufficient information below to help reproduce this issue.
required: true
- type: textarea
attributes:
label: Summary
description: Type here a clear and concise description of the problem. Aim for 2-3 sentences.
validations:
required: true
- type: textarea
attributes:
label: Reproducible Code Example
render: Python
description: |
If applicable, please provide a [self-contained minimal code example](https://stackoverflow.com/help/minimal-reproducible-example) that reproduces the problem you ran into.
If we can copy it, run it, and see it right away, there's a much higher chance we will be able to help you.
placeholder: |
import brickllm
# Your code here
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Please provide the steps we should take to reproduce the bug.
placeholder: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: false
- type: textarea
attributes:
label: Expected Behavior
description: Explain what you expect to happen when you go through the steps above, assuming there were no bugs.
validations:
required: false
- type: textarea
attributes:
label: Current Behavior
placeholder: |
Error message:
```
Traceback (most recent call last):
File "example.py", line 1, in <module>
import brickllm
```
description: |
Explain the buggy behavior you experience when you go through the steps above.
If you have error messages or stack traces please provide them here as well.
If applicable, add screenshots to help explain your problem.
_Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in._
validations:
required: false
- type: checkboxes
attributes:
label: Is this a regression?
description: Did this use to work the way you expected in the past?
options:
- label: Yes, this used to work in a previous version.
required: false
- type: textarea
attributes:
label: Debug info
description: |
Please share some system information related to the environment your app is running in.
Example:
- **BrickLLM version**: 0.1.0 _(get it with `$ pip show brickllm`)_
- **Python version**: 3.9 _(get it with `$ python --version`)_
- **Operating System**: MacOs 12.6
- **Browser**: Chrome
value: |
- BrickLLM version:
- Python version:
- Operating System:
- Browser:
validations:
required: false
- type: textarea
attributes:
label: Additional Information
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
_Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in._
validations:
required: false
51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: ✨ Feature request
description: Suggest a feature or enhancement for BrickLLM.
labels: ["type:enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to suggest a feature or enhancement for BrickLLM!
We really appreciate the community's efforts to improve BrickLLM ❤️
- type: checkboxes
attributes:
label: Checklist
description: Please confirm and check all the following options.
options:
- label: I have searched the [existing issues](https://github.com/EURAC-EEBgroup/brick-llm/issues) for similar feature requests.
required: true
- label: I added a descriptive title and summary to this issue.
required: true
- type: textarea
attributes:
label: Summary
description: Type here a clear and concise description of the feature or enhancement request. Aim for 2-3 sentences.
validations:
required: true
- type: textarea
attributes:
label: Why?
description: Please outline the problem, motivation, or use case related to this feature request.
placeholder: |
I'm always frustrated when ...
validations:
required: false
- type: textarea
attributes:
label: How?
description: |
Please describe the solution or implementation you'd like to see. This might include suggestions for new parameters, UI mockups etc.
Don't worry if you don't have a clear solution in mind; any input helps!
placeholder: |
Introduce a new command called `brickllm new_feature` that ...
validations:
required: false
- type: textarea
attributes:
label: Additional Context
description: |
Links? References? Anything that will give us more context about the feature request here!
_Tip: You can attach images by clicking this area to highlight it and then dragging files in._
validations:
required: false
120 changes: 120 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Release

on:
push:
branches:
- main
- pre/*

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install Poetry
run: pip install poetry

- name: Install dependencies
run: poetry install --no-interaction --no-ansi

- name: Build the package
run: poetry build

test:
name: Test
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install Poetry
run: pip install poetry

- name: Install dependencies
run: poetry install --no-interaction --no-ansi

- name: Run Linting and Formatting Checks
run: |
poetry run ruff check brickllm tests
poetry run black --check brickllm tests
poetry run isort --check-only brickllm tests
# - name: Run Type Checking
# run: poetry run mypy brickllm tests

- name: Run Tests with Coverage
run: poetry run pytest --cov=brickllm --cov-report=xml tests/

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: coverage.xml
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}

release:
name: Release
runs-on: ubuntu-latest
needs: [build, test]
if: |
github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/pre/')) ||
github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged &&
(github.event.pull_request.base.ref == 'main' || startsWith(github.event.pull_request.base.ref, 'pre/'))
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install Poetry
run: pip install poetry

- name: Install dependencies
run: poetry install --no-interaction --no-ansi

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4.1.0
with:
semantic_version: 23
extra_plugins: |
semantic-release-pypi@3
@semantic-release/git
@semantic-release/commit-analyzer@12
@semantic-release/release-notes-generator@13
@semantic-release/github@10
@semantic-release/changelog@6
conventional-changelog-conventionalcommits@7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy documentation to GitHub Pages

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --no-root
- name: Build documentation
run: |
poetry run mkdocs build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ coverage.xml
*.py,cover
.hypothesis/
.pytest_cache/
.ruff_cache/
cover/

# Translations
Expand Down Expand Up @@ -147,4 +148,4 @@ cython_debug/
# macOS
.DS_Store

dev.ipynb
dev.ipynb
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
repos:
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
exclude: mkdocs.yml
Loading

0 comments on commit f507cf5

Please sign in to comment.