Skip to content

Commit

Permalink
Update: v0.11.0
Browse files Browse the repository at this point in the history
This update introduces the auctions and the redirects module. Because of my college workload, chances are that new releases won't be made as frequently. Summer is coming to a close, so I don't have that much time left. For more info, please check out the changelogs as per usual, and peace. ~ Noelle ❤️
  • Loading branch information
No767 authored Aug 15, 2023
2 parents 3b36529 + 9a9b7e0 commit f0a60eb
Show file tree
Hide file tree
Showing 148 changed files with 5,794 additions and 2,789 deletions.
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: No767
ko_fi: no767
19 changes: 1 addition & 18 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,10 @@ on:
pull_request:
branches:
- dev

# env:
# DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres

jobs:
Analyze:
runs-on: ubuntu-latest

# services:
# postgres:
# image: postgres:15
# env:
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: postgres
# POSTGRES_DB: postgres
# ports:
# - 5432:5432
# options: >-
# --health-cmd pg_isready
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5

strategy:
fail-fast: false
Expand Down Expand Up @@ -65,5 +47,6 @@ jobs:
poetry run pyright Bot
- name: Run Ruff
# the rewrite for using PEP8 standards will come later
run: |
poetry run ruff Bot
2 changes: 1 addition & 1 deletion .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
python-version: '3.11'
- name: Set up Node.js 18
uses: actions/setup-node@v3.7.0
uses: actions/setup-node@v3.8.0
with:
node-version: '20'
- name: Install Snyk CLI
Expand Down
158 changes: 79 additions & 79 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,79 +1,79 @@
name: Tests

on:
push:
branches:
- dev

pull_request:
branches:
- dev

env:
POSTGRES_URI: postgresql://postgres:postgres@localhost:5432/postgres
REDIS_URI: redis://localhost:6379/0


jobs:
Test:
name: Test (${{ matrix.version }})
runs-on: ubuntu-latest

services:
redis:
image: redis/redis-stack-server:7.0.6-RC8
ports:
- 6379:6379

postgres:
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
version: [3.8, 3.9, '3.10', '3.11']

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Codecov Uploader
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov
- name: Set up Python
id: setup-python
uses: actions/[email protected]
with:
python-version: ${{ matrix.version }}

- name: Set up Poetry
uses: Gr1N/setup-poetry@v8

- name: Install Nox
run: |
pip install --upgrade nox
- name: Run Tests
run: |
RAW_PYTHON_VERSION=${{ matrix.version }}
PYTHON_VERSION=$(echo $RAW_PYTHON_VERSION | sed 's/\.//')
nox --sessions test$PYTHON_VERSION
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
name: Tests

on:
push:
branches:
- dev

pull_request:
branches:
- dev

env:
POSTGRES_URI: postgresql://postgres:postgres@localhost:5432/postgres
REDIS_URI: redis://localhost:6379/0


jobs:
Test:
name: Test (${{ matrix.version }})
runs-on: ubuntu-latest

services:
redis:
image: redis/redis-stack-server:7.2.0-RC3
ports:
- 6379:6379

postgres:
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
version: [3.8, 3.9, '3.10', '3.11']

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Codecov Uploader
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov
- name: Set up Python
id: setup-python
uses: actions/[email protected]
with:
python-version: ${{ matrix.version }}

- name: Set up Poetry
uses: Gr1N/setup-poetry@v8

- name: Install Nox
run: |
pip install --upgrade nox
- name: Run Tests
run: |
RAW_PYTHON_VERSION=${{ matrix.version }}
PYTHON_VERSION=$(echo $RAW_PYTHON_VERSION | sed 's/\.//')
nox --sessions test$PYTHON_VERSION
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
19 changes: 16 additions & 3 deletions Bot/Cogs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
from pkgutil import iter_modules

EXTENSIONS = [module.name for module in iter_modules(__path__, f"{__package__}.")]
from pkgutil import iter_modules
from typing import Literal, NamedTuple


class VersionInfo(NamedTuple):
major: int
minor: int
micro: int
releaselevel: Literal["dev", "alpha", "beta", "final"]

def __str__(self) -> str:
return f"{self.major}.{self.minor}.{self.micro}-{self.releaselevel}"


EXTENSIONS = [module.name for module in iter_modules(__path__, f"{__package__}.")]
VERSION: VersionInfo = VersionInfo(major=0, minor=11, micro=0, releaselevel="final")
16 changes: 8 additions & 8 deletions Bot/Cogs/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from discord.ext import commands
from discord.ext.commands import Greedy
from kumikocore import KumikoCore
from Libs.utils import Embed, formatGreedy
from Libs.utils import Embed, format_greedy


class Actions(commands.Cog):
Expand All @@ -25,7 +25,7 @@ async def hug(self, ctx: commands.Context, user: Greedy[discord.Member]) -> None
async with self.session.get("https://nekos.life/api/v2/img/hug") as r:
data = await r.json(loads=orjson.loads)
embed = Embed(
title=f"{ctx.author.name} hugs {formatGreedy([items.name for items in user])}!"
title=f"{ctx.author.name} hugs {format_greedy([items.name for items in user])}!"
)
embed.set_image(url=data["url"])
await ctx.send(embed=embed)
Expand All @@ -37,7 +37,7 @@ async def pat(self, ctx: commands.Context, user: Greedy[discord.Member]) -> None
async with self.session.get("https://nekos.life/api/v2/img/pat") as r:
data = await r.json(loads=orjson.loads)
embed = Embed(
title=f"{ctx.author.name} pats {formatGreedy([items.name for items in user])}!"
title=f"{ctx.author.name} pats {format_greedy([items.name for items in user])}!"
)
embed.set_image(url=data["url"])
await ctx.send(embed=embed)
Expand All @@ -49,7 +49,7 @@ async def kiss(self, ctx: commands.Context, user: Greedy[discord.Member]) -> Non
async with self.session.get("https://nekos.life/api/v2/img/kiss") as r:
data = await r.json(loads=orjson.loads)
embed = Embed(
title=f"{ctx.author.name} kisses {formatGreedy([items.name for items in user])}!"
title=f"{ctx.author.name} kisses {format_greedy([items.name for items in user])}!"
)
embed.set_image(url=data["url"])
await ctx.send(embed=embed)
Expand All @@ -61,7 +61,7 @@ async def cuddle(self, ctx: commands.Context, user: Greedy[discord.Member]) -> N
async with self.session.get("https://nekos.life/api/v2/img/cuddle") as r:
data = await r.json(loads=orjson.loads)
embed = Embed(
title=f"{ctx.author.name} cuddles {formatGreedy([items.name for items in user])}!"
title=f"{ctx.author.name} cuddles {format_greedy([items.name for items in user])}!"
)
embed.set_image(url=data["url"])
await ctx.send(embed=embed)
Expand All @@ -73,7 +73,7 @@ async def slap(self, ctx: commands.Context, user: Greedy[discord.Member]) -> Non
async with self.session.get("https://nekos.life/api/v2/img/slap") as r:
data = await r.json(loads=orjson.loads)
embed = Embed(
title=f"{ctx.author.name} slaps {formatGreedy([items.name for items in user])}!"
title=f"{ctx.author.name} slaps {format_greedy([items.name for items in user])}!"
)
embed.set_image(url=data["url"])
await ctx.send(embed=embed)
Expand All @@ -87,7 +87,7 @@ async def tickles(
async with self.session.get("https://nekos.life/api/v2/img/tickle") as r:
data = await r.json(loads=orjson.loads)
embed = Embed(
title=f"{ctx.author.name} tickles {formatGreedy([items.name for items in user])}!"
title=f"{ctx.author.name} tickles {format_greedy([items.name for items in user])}!"
)
embed.set_image(url=data["url"])
await ctx.send(embed=embed)
Expand All @@ -99,7 +99,7 @@ async def poke(self, ctx: commands.Context, user: Greedy[discord.Member]) -> Non
async with self.session.get("https://nekos.life/api/v2/img/poke") as r:
data = await r.json(loads=orjson.loads)
embed = Embed(
title=f"{ctx.author.name} pokes {formatGreedy([items.name for items in user])}!"
title=f"{ctx.author.name} pokes {format_greedy([items.name for items in user])}!"
)
embed.set_image(url=data["url"])
await ctx.send(embed=embed)
Expand Down
Loading

0 comments on commit f0a60eb

Please sign in to comment.