-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DQB-27 create weekly menu #38
Merged
Merged
Conversation
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
* Add .env to .gitignore file * Update precommit with hook that auto adds ticket from branch name * Update pre commit config so things are install into the correct stages * Update docker to use pipx rather than a curl command * Update the docker file to utilize pipx and an up to date version of poetry * Fix comments in Dockerfile --------- Co-authored-by: JP Hanna <[email protected]>
Replace ticket commit msg hook to work when not using -m. Add hook for commit message linting.
Title match now matches what should always be expected. Required file names updated to include more configuration level files. DQB-27 #comment # Please enter the commit message for your changes. Lines starting
Updated ctx fixture to include guild and be modifiable per test. Unit tests created for Menu property, and all variations of the command controller DQB-27 #comment # Please enter the commit message for your changes. Lines starting
Dictionary based config does not support defaulting or validation. Pydantic supports an extensible env reader configuration. Updated pyproject.toml with pydantic and pydantic-settings. As well as including pydantic within mypy
dependency-injector does not support 3.12 yet so updating all existing packages. pydantic requires usage of typing-extension. Update pyproject.toml to allow upward bounds of sqlalchemy, asyncpg.
docker-compose.yml updated to support testing through env variables. Also updated docker-compose to reduce redundancy. Resolve mypy issues.
Update Dockerfile and docker-compose.yml to better support unique local setup Update README.md to include all env variables that are required
Dependency-injector does not support pydantic settings v2 so must still use dictionary. Defaults were also not defined correctly.
Utilize type Annotation and StringConstraint to enforce that config values cannot be an empty string. Thus not allowing the server to start if not all the configuration values are there.
Update pyproject.toml to include SQLModel. Update docker-compose.yml to continue to better support dynamic local development
Update more of testing suite to work
get first was using replace but not setting it to anything.
Event loop was not being created within the event loop causing 2 differents loops to be used.
Update pyproject.toml to cap pytest version, 8.0.0 currently breaks pytest-asyncio Update sqlalchemy to now use non beta versions and ensure asyncio support is included.
Pydantic requires properties to be marked as computed fields Alembic config also needed to be updated to use this new uri
Tests and bot run should both use sqlmodles AsyncSession class Updated repository to utilize this new class
Previously discord did not properly support mypy typing, has since been fixed
Update pyproject.toml to introduce new version of ruff. Update alembic setup to support usage of sqlmodel
Update ignore files to support alembic and daemon mypy
Tavern group now has menu as a sub group. Create initial command to add items to the tavern menu
Update menu service to be a more generic as a tavern service Fill in code for adding a new item to the menu DQB-27 #comment # Please enter the commit message for your changes. Lines starting
Menu needs a big into for server id and look up needs to use between correctly
Group commands cannot be called directly and must have a fallback Menu format is currently hard to read, adding some touch ups
Update existing tests for menu look up, and create new ones for the upsert to menu
Introduce missing join test Introduce test for update method Update query arg to remove type in name of join attribute
Rather than have list in name of all the query attributes have names that point more to their functionality
Update pyproject.toml so that ruff lint configuration matches new standard
Current service design does not support multiple repos. Introduce a handler class that allows service to dynamically access multiple repos by a defined name. Implement command to remove items from menu
Create controller and service level unit tests for the remove item command
Created a success test and created a some empty list tests
Accidental typo in .dockerignore
jplhanna
commented
Feb 8, 2024
Update checkout to most recent version of 4.1.1 Update setup-python to version 5
jplhanna
added a commit
that referenced
this pull request
Jul 20, 2024
* DQB-27 Created menu tables * Add initial implementation of MenuService * DQB-27 Fix black alembic hook to no longer think line lenght is 79 * Clean up DockerFile (#37) * Add .env to .gitignore file * Update precommit with hook that auto adds ticket from branch name * Update pre commit config so things are install into the correct stages * Update docker to use pipx rather than a curl command * Update the docker file to utilize pipx and an up to date version of poetry * Fix comments in Dockerfile --------- Co-authored-by: JP Hanna <[email protected]> * Introduce initial retrieve tavern menu of the week support * Fix commit-msg hook * Created IntEnum model type * Update pre commit versions and set giticket mode * Update ars for giticket * DQB-27 Test * Update MenuItem to use Enum and update Menu query to be more specific * Add menu data in tavern menu command response * DQB-27 Create test for menu item grouping property * DQB-27 Fix commit msg hooks Replace ticket commit msg hook to work when not using -m. Add hook for commit message linting. * DQB-27 Update gitlint rules Title match now matches what should always be expected. Required file names updated to include more configuration level files. DQB-27 #comment # Please enter the commit message for your changes. Lines starting * DQB-27 Write tests for the new menu retrieval command Updated ctx fixture to include guild and be modifiable per test. Unit tests created for Menu property, and all variations of the command controller DQB-27 #comment # Please enter the commit message for your changes. Lines starting * DQB-27 Migrate dictionary configuration to pydantic-settings Dictionary based config does not support defaulting or validation. Pydantic supports an extensible env reader configuration. Updated pyproject.toml with pydantic and pydantic-settings. As well as including pydantic within mypy * DQB-27 Update poetry lock file with new package versions dependency-injector does not support 3.12 yet so updating all existing packages. pydantic requires usage of typing-extension. Update pyproject.toml to allow upward bounds of sqlalchemy, asyncpg. * DQB-27 Finish migration from dict based settings to pydantic docker-compose.yml updated to support testing through env variables. Also updated docker-compose to reduce redundancy. Resolve mypy issues. * DQB-27 Update to better support local setup Update Dockerfile and docker-compose.yml to better support unique local setup Update README.md to include all env variables that are required * DQB-27 Fix issues with the Pydantic Setings configuration Dependency-injector does not support pydantic settings v2 so must still use dictionary. Defaults were also not defined correctly. * DQB-27 Enforce non empty strings in configuration Utilize type Annotation and StringConstraint to enforce that config values cannot be an empty string. Thus not allowing the server to start if not all the configuration values are there. * DQB-27 Migrate to pydantic and SQLModel Update pyproject.toml to include SQLModel. Update docker-compose.yml to continue to better support dynamic local development * DQB-27 Updates to testing suite Update more of testing suite to work * DQB-27 Remove bad fixture, update get first get first was using replace but not setting it to anything. * DQB-27 Fix integration tests by fixing event loop creation Event loop was not being created within the event loop causing 2 differents loops to be used. * DQB-27 Update sqlalchemy and pytest versioning Update pyproject.toml to cap pytest version, 8.0.0 currently breaks pytest-asyncio Update sqlalchemy to now use non beta versions and ensure asyncio support is included. * DQB-27 Fix pydantic config not properly dumping db uri Pydantic requires properties to be marked as computed fields Alembic config also needed to be updated to use this new uri * DQB-27 Align tests with actual run of bot Tests and bot run should both use sqlmodles AsyncSession class Updated repository to utilize this new class * DQB-27 Remove unnecessary mypy workaround Previously discord did not properly support mypy typing, has since been fixed * DQB-27 Introduce menu tables and update alembic for sqlmodel Update pyproject.toml to introduce new version of ruff. Update alembic setup to support usage of sqlmodel * DQB-27 Update ignore files Update ignore files to support alembic and daemon mypy * DQB-27 Update tavern group to add more layers Tavern group now has menu as a sub group. Create initial command to add items to the tavern menu * DQB-27 Introduce code behind add menu item Update menu service to be a more generic as a tavern service Fill in code for adding a new item to the menu DQB-27 #comment # Please enter the commit message for your changes. Lines starting * DQB-27 Fix menu lookup query Menu needs a big into for server id and look up needs to use between correctly * DQB-27 Update group commands and clean up menu format Group commands cannot be called directly and must have a fallback Menu format is currently hard to read, adding some touch ups * DQB-27 Create unit tests for upsert controller Update existing tests for menu look up, and create new ones for the upsert to menu * DQB-27 Introduce new integration tests Introduce missing join test Introduce test for update method Update query arg to remove type in name of join attribute * DQB-27 Update more of query arg to remove type in name Rather than have list in name of all the query attributes have names that point more to their functionality * DQB-27 Update ruff config to support new style Update pyproject.toml so that ruff lint configuration matches new standard * DQB-27 Update service code to support multiple repos Current service design does not support multiple repos. Introduce a handler class that allows service to dynamically access multiple repos by a defined name. Implement command to remove items from menu * DQB-27 Create tests for remove item Create controller and service level unit tests for the remove item command * DQB-27 Create more tests for deleting a menu item Created a success test and created a some empty list tests * DQB-27 Fix typo in docker ignore Accidental typo in .dockerignore * DQB-27 Update github actions Update checkout to most recent version of 4.1.1 Update setup-python to version 5 --------- Co-authored-by: JP Hanna <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces read, upsert and delete commands for managing a taverns menu
Also replaces sqlalchemy dataclass implementation with the pydantic implementation.
There is a lot going on in this MR