Skip to content

Commit c552600

Browse files
committed
Initial commit
0 parents  commit c552600

27 files changed

+862
-0
lines changed

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.venv
2+
.coverage
3+
output
4+
*__pycache__*
5+
*egg-info
6+
dist
7+
.tox
8+
docs/Makefile
9+
docs/_build
10+
docs/make.bat
11+
docs/reference
12+
src/danoan/**/*.c
13+
src/danoan/**/*.so

.pre-commit-config.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
exclude: |
4+
(?x)^(
5+
\..*|
6+
__.*pycache__|
7+
cookiecutter-python-template|
8+
output
9+
)
10+
repos:
11+
- repo: https://github.com/pre-commit/pre-commit-hooks
12+
rev: v3.2.0
13+
hooks:
14+
- id: trailing-whitespace
15+
- id: end-of-file-fixer
16+
- id: check-yaml
17+
- id: check-added-large-files
18+
- id: check-json
19+
- id: pretty-format-json
20+
- id: check-toml
21+
22+
- repo: https://github.com/lovesegfault/beautysh
23+
rev: v6.2.1
24+
hooks:
25+
- id: beautysh
26+
27+
- repo: https://github.com/psf/black
28+
rev: 23.12.1
29+
hooks:
30+
- id: black

LICENSE.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2024, Daniel Martins Antunes
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+

MANIFEST.in

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# MANIFEST.in -- just for illustration
2+
graft src
3+
graft docs
4+
# `-> adds all files inside a directory
5+
6+
include tox.ini
7+
# `-> matches file paths relative to the root of the project
8+
9+
global-exclude *~ *.py[cod] *.so
10+
# `-> matches file names (regardless of directory)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/getting-started.md

dev/clean/clean.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#! /usr/bin/env bash
2+
3+
SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4+
PROJECT_PATH="$(cd "${SCRIPT_PATH}" && cd ../.. && pwd)"
5+
PROJECT_NAME="$(basename "${PROJECT_PATH}")"
6+
7+
INPUT_FOLDER="${SCRIPT_PATH}/input"
8+
OUTPUT_FOLDER="${SCRIPT_PATH}/output"
9+
mkdir -p "${OUTPUT_FOLDER}"
10+
11+
pushd "${PROJECT_PATH}" >/dev/null
12+
13+
shopt -s globstar
14+
15+
rm -rf ${PROJECT_PATH}/dev/**/output
16+
rm -rf ${PROJECT_PATH}/build
17+
18+
rm -rf ${PROJECT_PATH}/**/__pycache__
19+
rm -rf "${PROJECT_PATH}/.tox"
20+
rm -rf ${PROJECT_PATH}/**/*.egg-info
21+
22+
rm -rf ${PROJECT_PATH}/**/*.c
23+
24+
popd >/dev/null

dev/create-venv/create-venv.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#! /usr/bin/env bash
2+
3+
SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4+
PROJECT_PATH="$(cd "${SCRIPT_PATH}" && cd ../.. && pwd)"
5+
PROJECT_NAME="$(basename "${PROJECT_PATH}")"
6+
7+
INPUT_FOLDER="${SCRIPT_PATH}/input"
8+
OUTPUT_FOLDER="${SCRIPT_PATH}/output"
9+
mkdir -p "${OUTPUT_FOLDER}"
10+
11+
set -e
12+
13+
pushd "${PROJECT_PATH}" >/dev/null
14+
15+
trap "echo 'Aborted!'" err
16+
17+
./dev/clean/clean.sh
18+
python -m venv .venv
19+
20+
echo "export LLM_ASSISTANT_CONFIGURATION_FOLDER=/home/daniel/.config/llm-assistant" >>".venv/bin/activate"
21+
22+
source .venv/bin/activate
23+
24+
pip install --upgrade pip
25+
pip install -e .
26+
pip install build tox twine
27+
28+
popd >/dev/null

dev/extract-sdist/extract-sdist.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#! /usr/bin/env bash
2+
3+
SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4+
PROJECT_PATH="$(cd "${SCRIPT_PATH}" && cd ../.. && pwd)"
5+
PROJECT_NAME="$(basename "${PROJECT_PATH}")"
6+
7+
OUTPUT_FOLDER="${SCRIPT_PATH}/output"
8+
mkdir -p "${OUTPUT_FOLDER}"
9+
10+
pushd "${PROJET_PATH}" >/dev/null
11+
12+
source .venv/bin/activate
13+
14+
DIST_FOLDER="${OUTPUT_FOLDER}/dist"
15+
mkdir -p "${DIST_FOLDER}"
16+
17+
EXTRACT_FOLDER="${OUTPUT_FOLDER}/extract"
18+
mkdir -p "${EXTRACT_FOLDER}"
19+
20+
pyproject-build --outdir "${DIST_FOLDER}" .
21+
22+
tar -xf ${DIST_FOLDER}/${PROJECT_NAME}-*.tar.gz -C "${EXTRACT_FOLDER}"
23+
24+
popd >/dev/null

docs/_static/css/custom.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.sig-name {
2+
color: black;
3+
}
4+
5+
.sig-prename {
6+
color: gray;
7+
}

docs/api-reference.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
API Reference
2+
======
3+
.. autosummary::
4+
:toctree generated
5+

0 commit comments

Comments
 (0)