-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from milselarch/feat/user_deletion
Feat/user deletion
- Loading branch information
Showing
13 changed files
with
851 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Core Algorithm Tests | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m venv venv | ||
source venv/bin/activate | ||
pip install -r requirements.txt | ||
- name: Install Rust | ||
run: | | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
source $HOME/.cargo/env | ||
- name: Build Maturin crate | ||
run: | | ||
source venv/bin/activate | ||
maturin develop --bindings pyo3 --release | ||
- name: Run tests | ||
run: | | ||
source venv/bin/activate | ||
python -m pytest tests/enum_test.py tests/test_ranked_vote.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,6 +125,7 @@ celerybeat.pid | |
# config files | ||
*.yml | ||
!config.example.yml | ||
!.github/**/*.yml | ||
|
||
# Environments | ||
.env | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from database import Users | ||
from telegram import Update as BaseTeleUpdate | ||
|
||
|
||
class ModifiedTeleUpdate(object): | ||
def __init__( | ||
self, update: BaseTeleUpdate, user: Users | ||
): | ||
self.update: BaseTeleUpdate = update | ||
self.user: Users = user | ||
|
||
@property | ||
def callback_query(self): | ||
return self.update.callback_query | ||
|
||
@property | ||
def message(self): | ||
return self.update.message | ||
|
||
@property | ||
def effective_message(self): | ||
return self.update.effective_message |
Oops, something went wrong.