-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This release aims to fix up any bugs, and small fixes to provide a better dev experience and other. For more info, please see the changelog ~ Noelle
- Loading branch information
Showing
12 changed files
with
239 additions
and
49 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
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
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
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 |
---|---|---|
@@ -1,8 +1,18 @@ | ||
import os | ||
from pathlib import Path | ||
from typing import Dict, Optional | ||
|
||
from dotenv import dotenv_values | ||
|
||
|
||
def is_docker() -> bool: | ||
path = "/proc/self/cgroup" | ||
return os.path.exists("/.dockerenv") or ( | ||
os.path.isfile(path) and any("docker" in line for line in open(path)) | ||
) | ||
|
||
|
||
def read_env(path: Path, read_from_file: bool = True) -> Dict[str, Optional[str]]: | ||
if is_docker() or read_from_file is False: | ||
return {**os.environ} | ||
return {**dotenv_values(path)} |
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 |
---|---|---|
@@ -1,41 +1,24 @@ | ||
# :tada: Catherine-Chan 0.1.0 :tada: | ||
# 🛠️ Catherine-Chan 0.1.1 🛠️ | ||
|
||
The first stable version of Catherine-Chan. As of now, the codebase is extremely stable, and pretty much replaces Jade's PrideBot. This version rebuilds the whole entire bot using discord.py and all of the internals now use PostgreSQL. There are still features that are planned to be included by as of now, this version pretty much mimics PrideBot. | ||
|
||
Since this a full re-implementation, the rest of this section will be the differences included from PrideBot. Again, the changelog doesn't cover every single change I made since there is a ton. | ||
Bugfix version to generally fix up smaller issues and improve dev experience. | ||
|
||
## ✨ TD;LR | ||
|
||
- Fixes some release stuff. | ||
- Reimplement everything that PrideBot has to offer to PostgreSQL (massive performance boost w/ asyncpg) | ||
- Better interfaces for all of the commands | ||
- The first version that pretty much has everything PrideBot has | ||
- Pronouns tester command now relies on a `re.compile()` and a one-pass Regex implementation instead of 5 `.replace()` methods chained together | ||
- Added the missing feature of being able to to load only the `.env` file or only the current shell's env | ||
- Pretty much disabled prefixed commands | ||
|
||
## 🛠️ Changes | ||
|
||
- Proper documentation, including a full online docs | ||
- PEP8 standardized code (unlike Jade's version, which is a mess of personal preferences and poor design) enforced by Ruff | ||
- Pronouns tester command now relies on a one-pass regex sub implementation. This essentially removes the need to use `.replace()` a bunch of times. The implementation can be found [here](https://github.com/No767/Catherine-Chan/blob/main/bot/libs/cog_utils/pronouns/__init__.py#L48-L50). | ||
- Now based on PostgreSQL (asyncpg) instead of MongoDB (pymongo) | ||
- Added the missing feature of being able to to load only the `.env` file or only the current shell's env | ||
- Disable the default prefixed help command (we don't need this for slash commands) | ||
- Mute unwanted prefixed command errors | ||
- Make the prefix now something unlikely that you will use. | ||
|
||
## ✨ Additions | ||
|
||
- Discord support server link and shilling | ||
- Global error handler | ||
- Dockerfile that actually works | ||
- Proper CI/CD pipeline for unit testing, and linting code | ||
- Proper docstrings instead of random strings | ||
- Full unit tests (100% coverage!) | ||
- Pronouns examples approval system | ||
- Tone Tags support | ||
- SonarCloud linting | ||
- Pride Profiles | ||
- Load ENVs based on Dev mode and production. | ||
- Added the missing feature of being able to to load only the `.env` file or only the current shell's env | ||
- Added Jishaku for dev stuff | ||
|
||
## ➖ Removals | ||
|
||
- MongoDB support | ||
- Random commands that don't work anymore | ||
- Dictionary system (replaced with pronouns.pages support instead) | ||
- And a ton of bad practices that were in PrideBot | ||
- None |
Oops, something went wrong.