Skip to content

Commit

Permalink
Merge branch 'main' into cicd_initial
Browse files Browse the repository at this point in the history
  • Loading branch information
jszutenb authored Nov 18, 2024
2 parents c1d0a16 + 18134a6 commit d612f6d
Show file tree
Hide file tree
Showing 707 changed files with 90,230 additions and 108 deletions.
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Deployment
deployment/**/bin/
deployment/*.out
**/charts/*.tgz
deployment/*.key
deployment/*.crt

# Telemetry
/deployment/telemetry/helm/example/pcm/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
dist/
build/
*.egg-info/

# Compiled Python files
*.pyc

# Test output files
.coverage
.pytest_cache/
.benchmarks/

# Ignore the .vscode directory
.vscode/

# Super-Linter output directory
super-linter-output/

# Tox filex
.tox
121 changes: 121 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

ci:
autofix_prs: true
autoupdate_schedule: quarterly

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: end-of-file-fixer
files: (.*\.(py|md|rst|yaml|yml|json|ts|js|html|svelte|sh))$
- id: check-json
- id: check-yaml
- id: debug-statements
- id: requirements-txt-fixer
- id: trailing-whitespace
files: (.*\.(py|rst|cmake|yaml|yml|json|ts|js|html|svelte|sh))$

- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
files: (Dockerfile)$
args:
[
--license-filepath=.github/license_template.txt,
--use-current-year,
--detect-license-in-X-top-lines=5,
--skip-license-insertion-comment=Copyright,
]
- id: insert-license
files: (.*\.(py|yaml|yml|sh))$
args:
[
--license-filepath=.github/license_template.txt,
--use-current-year,
--detect-license-in-X-top-lines=5,
--skip-license-insertion-comment=Copyright,
]
- id: insert-license
files: (.*\.(ts|js))$
args:
[
--license-filepath=.github/license_template.txt,
--use-current-year,
--detect-license-in-X-top-lines=5,
--skip-license-insertion-comment=Copyright,
--comment-style=//,
]
- id: insert-license
files: (.*\.(html|svelte))$
args:
[
--license-filepath=.github/license_template.txt,
--use-current-year,
--detect-license-in-X-top-lines=5,
--skip-license-insertion-comment=Copyright,
--comment-style=<!--| |-->,
]

- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa
name: Unused noqa

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

- repo: https://github.com/PyCQA/docformatter
rev: v1.7.5
hooks:
- id: docformatter
args: [
--in-place,
--wrap-summaries=0, # 0 means disable wrap
--wrap-descriptions=0, # 0 means disable wrap
--black,
--style=google,
]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8" # Use the sha / tag you want to point at
hooks:
- id: prettier
args: [--print-width=120]
types_or: [yaml, markdown, html, css, scss, javascript, json, ts, shell, sh]
additional_dependencies:
- [email protected]

- repo: https://github.com/psf/black.git
rev: 24.4.2
hooks:
- id: black
files: (.*\.py)$

- repo: https://github.com/asottile/blacken-docs
rev: 1.18.0
hooks:
- id: blacken-docs
args: [--line-length=120, --skip-errors]
additional_dependencies:
- black==24.3.0

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: [-w]
additional_dependencies:
- tomli

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --no-cache]
152 changes: 49 additions & 103 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,130 +2,76 @@

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:
Examples of behavior that contributes to creating a positive environment
include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior include:
Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
professional setting

## Enforcement Responsibilities
## Our Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
CommunityCodeOfConduct AT intel DOT com.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning
reported to project maintainers using [Reporting abuse or spam] form. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
This Code of Conduct is adapted from the [Contributor Covenant], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[Reporting abuse or spam form]: https://docs.github.com/en/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam
[Contributor Covenant]: https://www.contributor-covenant.org
42 changes: 40 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# Contributing

## Table of Contents
1. [License](#license)
2. [Sign your work](#sign-your-work)
3. [Local linting](#local-linting)

### License

<PROJECT NAME> is licensed under the terms in [LICENSE]<link to license file in repo>. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.
Intel(R) AI for Enterprise RAG is licensed under the terms in [LICENSE](LICENSE).
By contributing to the project, you agree to the license and copyright terms therein
and release your contribution under these terms.

### Sign your work

Please use the sign-off line at the end of the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify
Please use the sign-off line at the end of the patch. Your signature certifies
that you wrote the patch or otherwise have the right to pass it on as an
open-source patch. The rules are pretty simple: if you can certify
the below (from [developercertificate.org](http://developercertificate.org/)):

```
Expand Down Expand Up @@ -55,3 +64,32 @@ Use your real name (sorry, no pseudonyms or anonymous contributions.)

If you set your `user.name` and `user.email` git configs, you can sign your
commit automatically with `git commit -s`.

### Local linting

This project utilizes [Super-Linter](https://github.com/super-linter/super-linter) to run as a Github Action for Pull Requests. If you would like to check before pushing your changes whether they comply with the linter's rules, you can run the linter locally.

#### Prerequisites
In order to run Super-Linter, you need to have Docker installed. Follow the instructions to install it on you machine: [docker installation](https://docs.docker.com/engine/install/).
#### Running the linter
To run Super-Linter, perform following command. It will work only on commited changes diffed against the main branch, so be sure to commit locally all of the changes you'd like to check. If you'd like to run the linter for all of the code, change `VALIDATE_ALL_CODEBASE` to `true`.
```bash
docker run \
-e LOG_LEVEL=DEBUG \
-e VALIDATE_ALL_CODEBASE=false \
-e VALIDATE_BASH=true \
-e BASH_SEVERITY=error \
-e FILTER_REGEX_EXCLUDE=".*helm/templates/.*.yaml" \
-e VALIDATE_YAML=true \
-e VALIDATE_PYTHON_RUFF=true \
-e VALIDATE_DOCKERFILE_HADOLINT=true \
-e DEFAULT_BRANCH=main \
-e RUN_LOCAL=true \
-e SAVE_SUPER_LINTER_SUMMARY=true \
-e SAVE_SUPER_LINTER_OUTPUT=true \
-v .:/tmp/lint \
--rm \
ghcr.io/super-linter/super-linter:slim-v6.8.0
```

For more information on running Super-Linter locally, follow [link](https://github.com/super-linter/super-linter/blob/main/docs/run-linter-locally.md).
Loading

0 comments on commit d612f6d

Please sign in to comment.