Skip to content

Commit

Permalink
Merge branch 'main' into chore/test-pyspark
Browse files Browse the repository at this point in the history
  • Loading branch information
fpgmaas authored Jul 20, 2024
2 parents 9c5b7ad + 580631a commit e7575ba
Show file tree
Hide file tree
Showing 46 changed files with 1,687 additions and 2,491 deletions.
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a bug report to help us improve
labels: "bug"
---

**Describe the bug**

<!-- A clear and concise description of what the bug is. -->

**To Reproduce**

Steps to reproduce the behavior:

1. ...
2. ...
3. ...

**Expected behavior**

<!-- A clear and concise description of what you expected to happen. -->

**System [please complete the following information]:**

- OS: e.g. [Ubuntu 18.04]
- Python Version: [e.g. Python 3.8]
- PySpark version: [e.g. PySpark 3.5.1]

**Additional context**

<!-- Add any other context about the problem here. -->

**Are you planning on creating a PR?**

<!-- Check the box below with an `x` if you are planning to create a PR for this. -->

- [ ] I'm planning to make a pull-request
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest a new feature
labels: "enhancement"
---

**Is your feature request related to a problem? Please describe.**

<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when ... -->

**Describe the solution you would like**

<!-- A clear and concise description of what you want to happen. -->

**Additional context**

<!-- Add any other context or screenshots about the feature request here. -->

**Are you planning on creating a PR?**

<!-- Check the box below with an `x` if you are planning to create a PR for this. -->

- [ ] I'm planning to make a pull-request
4 changes: 2 additions & 2 deletions .github/actions/setup-poetry-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ inputs:
required: false
description: "Install the docs dependency group"
default: 'false'

runs:
using: "composite"
steps:
Expand Down Expand Up @@ -60,4 +60,4 @@ runs:
run: |
poetry run python --version
poetry run pyspark --version
shell: bash
shell: bash
10 changes: 10 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
**PR Checklist**

- [ ] A description of the changes is added to the description of this PR.
- [ ] If there is a related issue, make sure it is linked to this PR.
- [ ] If you've fixed a bug or added code that should be tested, add tests!
- [ ] If you've added or modified a feature, documentation in `docs` is updated

**Description of changes**

<!-- Please state what you've changed and how it might affect the users. -->
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
- name: Check lock file
run: poetry lock --check

- name: Run pre-commit hooks
run: poetry run pre-commit run -a

test:
runs-on: ubuntu-latest
strategy:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Set up the environment
uses: ./.github/actions/setup-poetry-env
with:
with-docs: true

- name: Setup GH
run: |
sudo apt update && sudo apt install -y git
Expand Down
109 changes: 96 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,106 @@
build/
dist/
chispa.egg-info/
.cache/
tmp/
.idea/
.DS_Store
.DS_store
.python_version

# Emacs
.dir-locals.el

# VSCode
.vscode

# Below are sections from https://github.com/github/gitignore/blob/main/Python.gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# MKDocs
site
# Translations
*.mo
*.pot

# VSCode
.vscode
# Sphinx documentation
docs/_build/

# Emacs
.dir-locals.el
# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.6.0"
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.5.2"
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]
- id: ruff-format
17 changes: 16 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,25 @@ install: ## Install the Poetry environment
@echo "Creating virtual environment using Poetry"
@poetry install

.PHONY: check
check: ## Run code quality checks
@echo "Running pre-commit hooks"
@poetry run pre-commit run -a

.PHONY: test
test: ## Run unit tests
@echo "Running unit tests"
@poetry run pytest tests
@poetry run pytest tests --cov=chispa --cov-report=term

.PHONY: test-cov-html
test-cov-html: ## Run unit tests and create a coverage report
@echo "Running unit tests and generating HTML report"
@poetry run pytest tests --cov=chispa --cov-report=html

.PHONY: test-cov-xml
test-cov-xml: ## Run unit tests and create a coverage report in xml format
@echo "Running unit tests and generating XML report"
@poetry run pytest tests --cov=chispa --cov-report=xml

.PHONY: build
build: clean-build ## Build wheel and sdist files using Poetry
Expand Down
Loading

0 comments on commit e7575ba

Please sign in to comment.