Skip to content

Commit

Permalink
Merge pull request #22 from Undertone0809/v2.1.1/fix-thread-blocking
Browse files Browse the repository at this point in the history
pref: add tea
  • Loading branch information
Undertone0809 authored May 11, 2024
2 parents 7893281 + 4788b78 commit dd65d34
Show file tree
Hide file tree
Showing 22 changed files with 1,096 additions and 211 deletions.
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: 🐛 Bug report
about: If something isn't working 🔧
title: ''
labels: bug
assignees:
---

## 🐛 Bug Report

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

## 🔬 How To Reproduce

Steps to reproduce the behavior:

1. ...

### Code sample

<!-- If applicable, attach a minimal code sample to reproduce the decried issue. -->

### Environment

* OS: [e.g. Linux / Windows / macOS]
* Python version, get it with:

```bash
python --version
```

### Screenshots

<!-- If applicable, add screenshots to help explain your problem. -->

## 📈 Expected behavior

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

## 📎 Additional context

<!-- Add any other context about the problem here. -->
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Configuration: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository

blank_issues_enabled: false
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 an idea for this project 🏖
title: ''
labels: enhancement
assignees:
---

## 🚀 Feature Request

<!-- A clear and concise description of the feature proposal. -->

## 🔈 Motivation

<!-- Please describe the motivation for this proposal. -->

## 🛰 Alternatives

<!-- A clear and concise description of any alternative solutions or features you've considered. -->

## 📎 Additional context

<!-- Add any other context or screenshots about the feature request here. -->
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: ❓ Question
about: Ask a question about this project 🎓
title: ''
labels: question
assignees:
---

## Checklist

<!-- Mark with an `x` all the checkboxes that apply (like `[x]`) -->
.
- [ ] I've searched the project's [`issues`](https://github.com/Undertone0809/promptulate/issues?q=is%3Aissue).

## ❓ Question

<!-- What is your question -->

How can I [...]?

Is it possible to [...]?

## 📎 Additional context

<!-- Add any other context or screenshots about the feature request here. -->
35 changes: 35 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Configuration: https://dependabot.com/docs/config-file/
# Docs: https://docs.github.com/en/github/administering-a-repository/keeping-your-dependencies-updated-automatically

version: 2

updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-type: "all"
commit-message:
prefix: ":arrow_up:"
open-pull-requests-limit: 50

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-type: "all"
commit-message:
prefix: ":arrow_up:"
open-pull-requests-limit: 50

- package-ecosystem: "docker"
directory: "/docker"
schedule:
interval: "weekly"
allow:
- dependency-type: "all"
commit-message:
prefix: ":arrow_up:"
open-pull-requests-limit: 50
69 changes: 69 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
SHELL := /usr/bin/env bash
OS := $(shell python -c "import sys; print(sys.platform)")

ifeq ($(OS),win32)
PYTHONPATH := $(shell python -c "import os; print(os.getcwd())")
TEST_COMMAND := set PYTHONPATH=$(PYTHONPATH) && poetry run pytest -c pyproject.toml --cov-report=html --cov=broadcast_service tests
else
PYTHONPATH := `pwd`
TEST_COMMAND := PYTHONPATH=$(PYTHONPATH) poetry run pytest -c pyproject.toml --cov-report=html --cov=broadcast_service tests
endif


#* Installation
.PHONY: install
install:
poetry lock -n && poetry export --without-hashes > requirements.txt
poetry install --with dev

.PHONY: pre-commit-install
pre-commit-install:
poetry run pre-commit install

#* Formatters
.PHONY: polish-codestyle
polish-codestyle:
poetry run ruff format --config pyproject.toml broadcast_service tests example
poetry run ruff check --fix --config pyproject.toml broadcast_service tests example

.PHONY: formatting
formatting: polish-codestyle

#* Linting
.PHONY: test
test:
$(TEST_COMMAND)
poetry run coverage-badge -o docs/images/coverage.svg -f

.PHONY: check-codestyle
check-codestyle:
poetry run ruff format --check --config pyproject.toml broadcast_service tests example
poetry run ruff check --config pyproject.toml broadcast_service tests example


.PHONY: lint
lint: test check-codestyle

#* Cleaning
.PHONY: pycache-remove
pycache-remove:
find . | grep -E "(__pycache__|\.pyc|\.pyo$$)" | xargs rm -rf

.PHONY: dsstore-remove
dsstore-remove:
find . | grep -E ".DS_Store" | xargs rm -rf

.PHONY: ipynbcheckpoints-remove
ipynbcheckpoints-remove:
find . | grep -E ".ipynb_checkpoints" | xargs rm -rf

.PHONY: pytestcache-remove
pytestcache-remove:
find . | grep -E ".pytest_cache" | xargs rm -rf

.PHONY: build-remove
build-remove:
rm -rf build/

.PHONY: cleanup
cleanup: pycache-remove dsstore-remove ipynbcheckpoints-remove pytestcache-remove
5 changes: 4 additions & 1 deletion broadcast_service/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@
# Project Link: https://github.com/Undertone0809/broadcast-service
# Contact Email: [email protected]

from ._core import *
from broadcast_service._core import broadcast_service
from broadcast_service.logger import enable_log

__all__ = ["broadcast_service", "enable_log"]
Loading

0 comments on commit dd65d34

Please sign in to comment.