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

[Suggestion] - Mkdocs Material as the base for documentation #5

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
48 changes: 48 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
; More information at http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false

# See Google Shell Style Guide
# https://google.github.io/styleguide/shell.xml
[*.sh]
indent_size = 2 # shfmt: like -i 2
insert_final_newline = true
switch_case_indent = true # shfmt: like -ci

[*.py]
insert_final_newline = true
indent_size = 4
max_line_length = 120

[*.md]
trim_trailing_whitespace = false
indent_size = 4

[*.yml]
indent_size = 2

[Makefile]
indent_style = tab

[*.js]
indent_size = 4
insert_final_newline = true

[*.ts]
insert_final_newline = true

[*.scss]
insert_final_newline = true

[*.json]
indent_size = 2

[*.html]
insert_final_newline = true
49 changes: 49 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# See https://pre-commit.com for more information.
# See https://pre-commit.com/hooks.html for more hooks.
default_language_version:
python: python3.9
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-toml
- id: check-yaml
args:
- --unsafe
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.3
hooks:
- id: pyupgrade
args:
- --py3-plus
- --keep-runtime-typing
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.254
hooks:
- id: ruff
args: ["--fix", "--line-length=120"]
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black
args: ["--line-length=120"]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args: ["--project=lakehouse_engine", "--line-length=120"]
- id: isort
name: isort (cython)
types: [cython]
args: ["--project=lakehouse_engine", "--line-length=120"]
- id: isort
name: isort (pyi)
types: [pyi]
args: ["--project=lakehouse_engine", "--line-length=120"]
ci:
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate
55 changes: 3 additions & 52 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,4 @@
# How to Contribute
# Contributing

📖 Search algorithms, transformations and check implementation details & examples in our [documentation](https://adidas.github.io/lakehouse-engine-docs/lakehouse_engine.html).

💭 In case you have doubts, ideas, want to ask for help or want to discuss different approach and usages, feel free to create a [discussion](https://github.com/adidas/lakehouse-engine/discussions).

⚠️ Are you facing any issues? Open an issue on [GitHub](https://github.com/adidas/lakehouse-engine/issues).

💡 Do you have ideas for new features? Open a feature request on [GitHub](https://github.com/adidas/lakehouse-engine/issues).

🚀 Want to find the available releases? Check our release notes on [GitHub](https://github.com/adidas/lakehouse-engine/releases) and [PyPi](https://pypi.org/project/lakehouse-engine/).

## Prerequisites

1. Git.
2. Your IDE of choice with a Python 3 environment (e.g., virtualenv created from the requirements_cicd.txt file).
3. Docker.
4. GNU make.

## General steps for contributing
1. Fork the project.
2. Clone the forked project into your working environment.
3. Create your feature branch following the convention [feature|bugfix]/ISSUE_ID_short_name.
4. Apply your changes in the recently created branch. It is **mandatory** to add tests covering the feature of fix contributed.
5. Style, lint, test and test security:
```
make style
make lint
make test
make test-security
```
> **Note:** To use the make targets with another docker-compatible cli other than docker you can pass the parameter "container_cli".
Example: `make test container_cli=nerdctl`

> **Note:** Most make target commands are running on docker. If you face any problem, you can also check the code of the respective
make targets and directly execute the code in your python virtual environment.
6. (optional) You can build the wheel locally with `make build` or `make build os_deployment=True` (in case the wheel targets an environment, which does not have the dependencies listed in [extra_os_requirements.txt](cicd/extra_os_requirements.txt) pre-installed).
7. (optional) Install the wheel you have just generated and test it.
8. If you have changed or added new requirements, you should run `make build-lock-files`, to rebuild the lock files.
9. If the transitive dependencies have not been updated for a while, and you want to upgrade them, you can use `make upgrade-lock-files` to update them.
This will update the transitive dependencies even if you have not changed the requirements.
10. When you're ready with your changes, open a Pull Request (PR) to develop.
11. Ping the team through the preferred communication channel.
12. The team will come together to review it and approve it (2 approvals required).
13. Your changes will be tested internally, promoted to master and included in the next release.

> 🚀🚀🚀
>
> **Pull Requests are welcome from anyone**. However, before opening one, please make sure to open an issue on [GitHub](https://github.com/adidas/lakehouse-engine/issues)
> and link it.
> Moreover, if the Pull Request intends to cover big changes or features, it is recommended to first discuss it on a [GitHub issue](https://github.com/adidas/lakehouse-engine/issues) or [Discussion](https://github.com/adidas/lakehouse-engine/discussions).
>
> 🚀🚀🚀
Please read the [Contributing](https://adidas.github.io/lakehouse-engine-docs/lakehouse-engine/contributing)
guidelines in the official documentation.
File renamed without changes.
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,22 @@ push-release:
delete-tag:
git push --delete origin $(tag)


clean: clean_pyc ## Clean all PYC in the system

clean_pyc: ## Cleans all *.pyc in the system
find . -type f -name "*.pyc" -delete || true

clean_pycache: ## Removes the __pycaches__
find . -type d -name "*__pycache__*" -delete

requirements-local: ## Install the requirements in a local virtual environment.
pip install -r cicd/requirements.txt && pip install -r cicd/requirements_cicd.txt

serve-mkdocs: ## Serves the documentation with mkdocs-material
mkdocs serve

build-docs: ## Runs the local mkdocs-material
mkdocs build

.PHONY: $(MAKECMDGOALS)
Loading