diff --git a/alembic/versions/2022-03-23-17.43.34_263dd6707191_convert_quantity_from_integer_to_float.py b/alembic/versions/2022-03-23-17.43.34_263dd6707191_convert_quantity_from_integer_to_float.py index d158c88853a9..b453ecdff04c 100644 --- a/alembic/versions/2022-03-23-17.43.34_263dd6707191_convert_quantity_from_integer_to_float.py +++ b/alembic/versions/2022-03-23-17.43.34_263dd6707191_convert_quantity_from_integer_to_float.py @@ -23,8 +23,8 @@ def is_postgres(): def upgrade(): # ### commands auto generated by Alembic - please adjust! ### - # SQLite doesn't require migration as types are not inforced. - # Postgres Specifc Migration + # SQLite doesn't require migration as types are not enforced. + # Postgres Specific Migration if is_postgres(): op.alter_column( "recipes_ingredients", @@ -38,8 +38,8 @@ def upgrade(): def downgrade(): # ### commands auto generated by Alembic - please adjust! ### - # SQLite doesn't require migration as types are not inforced. - # Postgres Specifc Migration + # SQLite doesn't require migration as types are not enforced. + # Postgres Specific Migration if is_postgres(): op.alter_column( "recipes_ingredients", diff --git a/dev/code-generation/gen_locales.py b/dev/code-generation/gen_locales.py index 785c1c2cf2f0..c9f997d1a96c 100644 --- a/dev/code-generation/gen_locales.py +++ b/dev/code-generation/gen_locales.py @@ -39,7 +39,7 @@ NAMES = { "nl-NL": "Nederlands (Dutch)", "pl-PL": "Polski (Polish)", "pt-BR": "Português do Brasil (Brazilian Portuguese)", - "pt-PT": "Português (Portugese)", + "pt-PT": "Português (Portuguese)", "ro-RO": "Română (Romanian)", "ru-RU": "Pусский (Russian)", "sr-SP": "српски (Serbian)", diff --git a/dev/code-generation/gen_pytest_routes.py b/dev/code-generation/gen_pytest_routes.py index 50c976590aa1..8e7e288d3313 100644 --- a/dev/code-generation/gen_pytest_routes.py +++ b/dev/code-generation/gen_pytest_routes.py @@ -11,7 +11,7 @@ from mealie.app import app """ This code is used for generating route objects for each route in the OpenAPI Specification. Currently, they are NOT automatically injected into the test suite. As such, you'll need to copy -the relavent contents of the generated file into the test suite where applicable. I am slowly +the relevant contents of the generated file into the test suite where applicable. I am slowly migrating the test suite to use this new generated file and this process will be "automated" in the future. """ diff --git a/docs/docs/changelog/v0.2.0.md b/docs/docs/changelog/v0.2.0.md index 130ba885c697..4b29a9165633 100644 --- a/docs/docs/changelog/v0.2.0.md +++ b/docs/docs/changelog/v0.2.0.md @@ -67,6 +67,6 @@ This is, what I think, is a big release! Tons of new features and some great qua ### Breaking Changes !!! error "Breaking Changes" - - API endpoints have been refactored to adhear to a more consistent standard. This is a WIP and more changes are likely to occur. + - API endpoints have been refactored to adhere to a more consistent standard. This is a WIP and more changes are likely to occur. - Officially Dropped MongoDB Support - Database Breaks! We have not yet implemented a database migration service. As such, upgrades cannot be done by simply pulling the image. You must first export your recipes, update your deployment, and then import your recipes. This pattern is likely to be how upgrades take place prior to v1.0. After v1.0 migrations will be done automatically. diff --git a/docs/docs/changelog/v0.5.0.md b/docs/docs/changelog/v0.5.0.md index 8376233c4667..5ff3e4a3bc28 100644 --- a/docs/docs/changelog/v0.5.0.md +++ b/docs/docs/changelog/v0.5.0.md @@ -73,7 +73,7 @@ - See what's for dinner - Manage Long Live API Tokens (New) - New Admin Dashboard! 🎉 - - Now you can get some insight on your application with application statics and events. + - Now you can get some insight on your application with application statistics and events. - See uncategorized/untagged recipes and organize them! - Backup/Restore right from your dashboard - See server side events. Now you can know who deleted your favorite recipe! diff --git a/docs/docs/changelog/v1.0.0.md b/docs/docs/changelog/v1.0.0.md index 7197805dcb13..848de36fb075 100644 --- a/docs/docs/changelog/v1.0.0.md +++ b/docs/docs/changelog/v1.0.0.md @@ -73,7 +73,7 @@ - Site Settings has been completely revamped. All site-wide settings at defined on the server as ENV variables. The site settings page now only shows you the non-secret values for reference. It also has some helpers to let you know if something isn't configured correctly. - Server Side Bare URL will let you know if the BASE_URL env variable has been set - - Secure Site let's you know if you're serving via HTTPS or accessing by localhost. accessing without a secure site will render some of the features unusable. + - Secure Site let's you know if you're serving via HTTPS or accessing by localhost. Accessing without a secure site will render some of the features unusable. - Email Configuration Status will let you know if all the email settings have been provided and offer a way to send test emails. #### 👨‍👩‍👧‍👦 Users and Groups diff --git a/docs/docs/contributors/developers-guide/starting-dev-server.md b/docs/docs/contributors/developers-guide/starting-dev-server.md index 677f44b1281d..8bae387bf704 100644 --- a/docs/docs/contributors/developers-guide/starting-dev-server.md +++ b/docs/docs/contributors/developers-guide/starting-dev-server.md @@ -36,7 +36,7 @@ Checkout the makefile for all of the available commands. Once the prerequisites are installed you can cd into the project base directory and run `make setup` to install the python and node dependencies. -=== "Linux / MacOs" +=== "Linux / macOS" ```bash # Naviate To The Root Directory @@ -66,7 +66,7 @@ Before you start the server you MUST copy the `template.env` and `frontend/templ Once that is complete you're ready to start the servers. You'll need two shells open, One for the server and one for the frontend. -=== "Linux / MacOs" +=== "Linux / macOS" ```bash # Terminal #1 diff --git a/docs/docs/contributors/guides/ingredient-parser.md b/docs/docs/contributors/guides/ingredient-parser.md index a7f1532a55d6..4bfdd38d016b 100644 --- a/docs/docs/contributors/guides/ingredient-parser.md +++ b/docs/docs/contributors/guides/ingredient-parser.md @@ -4,7 +4,7 @@ Mealie uses Conditional Random Fields (CRFs) for parsing and processing ingredie ## Improving The CRF Parser -To improve results with the model, you'll likely need to focus on improving the tokenization and parsing of the original string to aid the model in determine what the ingredient is. Datascience is not my forte, but I have done some tokenization to improve the model. You can find that code under `/mealie/services/parser_services/crfpp` along with some other utility functions to aid in the tokenization and processing of ingredient strings. +To improve results with the model, you'll likely need to focus on improving the tokenization and parsing of the original string to aid the model in determine what the ingredient is. Data science is not my forte, but I have done some tokenization to improve the model. You can find that code under `/mealie/services/parser_services/crfpp` along with some other utility functions to aid in the tokenization and processing of ingredient strings. The best way to test on improving the parser is to register additional test cases in `/mealie/tests/unit_tests/test_crfpp_parser.py` and run the test after making changes to the tokenizer. Note that the test cases DO NOT run in the CI environment, therefore you will need to have CRF++ installed on your machine. If you're using a Mac the easiest way to do this is through brew. diff --git a/docs/docs/documentation/community-guide/bulk-url-import.md b/docs/docs/documentation/community-guide/bulk-url-import.md index 402fdd3e2cb1..4bf2f74db81a 100644 --- a/docs/docs/documentation/community-guide/bulk-url-import.md +++ b/docs/docs/documentation/community-guide/bulk-url-import.md @@ -8,7 +8,7 @@ Recipes can be imported in bulk from a file containing a list of URLs. This can ```bash #!/bin/bash -function authentification () { +function authentication () { auth=$(curl -X 'POST' \ "$3/api/auth/token" \ -H 'accept: application/json' \ @@ -38,7 +38,7 @@ password="MyPassword" mealie_url=http://localhost:9000 -token=$(authentification $mail $password $mealie_url) +token=$(authentication $mail $password $mealie_url) import_from_file $input $token $mealie_url ``` @@ -51,7 +51,7 @@ See Jleagle import requests import re -def authentification(mail, password, mealie_url): +def authentication(mail, password, mealie_url): headers = { 'accept': 'application/json', 'Content-Type': 'application/x-www-form-urlencoded', @@ -90,7 +90,7 @@ password="MyPassword" mealie_url="http://localhost:9000" -token = authentification(mail, password, mealie_url) +token = authentication(mail, password, mealie_url) import_from_file(input_file, token, mealie_url) ``` diff --git a/docs/docs/documentation/getting-started/features.md b/docs/docs/documentation/getting-started/features.md index 616c39fc7c50..f2174d3d295e 100644 --- a/docs/docs/documentation/getting-started/features.md +++ b/docs/docs/documentation/getting-started/features.md @@ -52,7 +52,7 @@ Each of the above organizers can be filtered in searches, and have their own pag #### Cookbooks -Mealie also has the concept of cookbooks. These can be created inside of a group and can use a cross section of Categories, Tags, and Tools to filter recipes and view them in one specific page. Cookbooks are a great way to keep a supset of recipes easily accessible to you. You can think of them as a saved search results page. While most examples are simple, you can use as many organizers to filter a cookbook as you'd like. +Mealie also has the concept of cookbooks. These can be created inside of a group and can use a cross section of Categories, Tags, and Tools to filter recipes and view them in one specific page. Cookbooks are a great way to keep a subset of recipes easily accessible to you. You can think of them as a saved search results page. While most examples are simple, you can use as many organizers to filter a cookbook as you'd like. #### Examples: @@ -113,7 +113,7 @@ Managing a robust collection of recipes inevitable requires a lot of data. Meali ### Site Settings -The site settings page contains general information about your installtion like the application version, some configuration details, and some utilities to help you confirm your installation is working as expected. For example, you can use the Email Configuration section to validate that your email credentials are setup correctly and that the email service is working as expected. Additionally, there is a docker-volume utility that will confirm your volumes are configured and shared correctly between the front and backend of the application. +The site settings page contains general information about your installation like the application version, some configuration details, and some utilities to help you confirm your installation is working as expected. For example, you can use the Email Configuration section to validate that your email credentials are setup correctly and that the email service is working as expected. Additionally, there is a docker-volume utility that will confirm your volumes are configured and shared correctly between the front and backend of the application. [Demo](https://demo.mealie.io/admin/site-settings){ .md-button .md-button--primary } diff --git a/docs/docs/documentation/getting-started/installation/installation-checklist.md b/docs/docs/documentation/getting-started/installation/installation-checklist.md index 7e376361a16b..9898b1b4f5d9 100644 --- a/docs/docs/documentation/getting-started/installation/installation-checklist.md +++ b/docs/docs/documentation/getting-started/installation/installation-checklist.md @@ -63,7 +63,7 @@ After you've configured your database, and updated the `docker-compose.yaml` fil $ docker-compose up -d ``` -You should see the containers start up without error. You should now be able to access the Mealie frontend at [http://localhost:9925](http://locahost:9925). +You should see the containers start up without error. You should now be able to access the Mealie frontend at [http://localhost:9925](http://localhost:9925). !!! tip "Default Credentials" @@ -102,8 +102,8 @@ While the docker-compose file should work without modification, some users want ![Docker Diagram](../../../assets/img/docker-diagram.drawio.svg) -In the diagram above there's a few crutial things to note. +In the diagram above there's a few crucial things to note. 1. Port 9925 is the host port, this can be anything you want. The important part is that it's mapped to the mealie-frontend container at port 3000. 2. The mealie-frontend container communicated with the mealie-api container through the INTERNAL docker network. This requires that the two containers are on the same network and that the network supports name resolution (anything but the default bridge network). The resolution URL can be specified in the docker-compose as the `API_URL` environment variable. -3. The mealie-data volume is mounted to BOTH the mealie-frontend and mealie-api containers. This is REQUIRED to ensure that images and assets are severed up correctly. While the default configuration is a docker-volume, that same can be accomplished by using a local directory mounted to the containers. +3. The mealie-data volume is mounted to BOTH the mealie-frontend and mealie-api containers. This is REQUIRED to ensure that images and assets are served up correctly. While the default configuration is a docker-volume, that same can be accomplished by using a local directory mounted to the containers. diff --git a/docs/docs/documentation/getting-started/migrating-to-mealie-v1.md b/docs/docs/documentation/getting-started/migrating-to-mealie-v1.md index 72a6175d0e5a..a5afd3aabfd2 100644 --- a/docs/docs/documentation/getting-started/migrating-to-mealie-v1.md +++ b/docs/docs/documentation/getting-started/migrating-to-mealie-v1.md @@ -33,7 +33,7 @@ This can be a plus or a minus depending on your use case. If you relied on the o ## Step 1: Setting Up The New Application -Given the nature of the upgrade, it is highly recommended that you standup a new instance of mealie along side your current instance. This will allow you to migrate your data safely and quickly without any issues. Follow the instructions in the [Installation Checklist](../getting-started/installation/installation-checklist.md) to get started. Once that's complete and you can login, continue here with step 2. +Given the nature of the upgrade, it is highly recommended that you stand up a new instance of mealie along side your current instance. This will allow you to migrate your data safely and quickly without any issues. Follow the instructions in the [Installation Checklist](../getting-started/installation/installation-checklist.md) to get started. Once that's complete and you can login, continue here with step 2. ## Step 2: Exporting Your Data from Pre-v1 @@ -42,7 +42,7 @@ In your instance of Mealie prior to v1, perform an export of your data in the Ad ## Step 3: Using the Migration Tool -In your new v1 instance, navigate to `/group/migrations` and select "Mealie" from the dropdown selector. Upload the exported data from your pre-v1 instance. Optionally, you can tag all the recipes you've imported with the `mealie_alpha` tag to help you identify them. Once the upload has finished, submit the form and your migration will begin. This may take some time, but when it's complete you'll be provided a new entry in hte "Previous Migrations" table below. Be sure to review the migration report to make sure everything was successful. There may be instances where some of the recipes were not imported, but the migration will still import all the successful recipes. +In your new v1 instance, navigate to `/group/migrations` and select "Mealie" from the dropdown selector. Upload the exported data from your pre-v1 instance. Optionally, you can tag all the recipes you've imported with the `mealie_alpha` tag to help you identify them. Once the upload has finished, submit the form and your migration will begin. This may take some time, but when it's complete you'll be provided a new entry in the "Previous Migrations" table below. Be sure to review the migration report to make sure everything was successful. There may be instances where some of the recipes were not imported, but the migration will still import all the successful recipes. In most cases, it's faster to manually migrate the recipes that didn't take instead of trying to identify why the recipes failed to import. If you're experiencing issues with the migration tool, please open an issue on GitHub. diff --git a/docs/docs/documentation/getting-started/usage/backups-and-restoring.md b/docs/docs/documentation/getting-started/usage/backups-and-restoring.md index 06e24936673e..7c160427b25e 100644 --- a/docs/docs/documentation/getting-started/usage/backups-and-restoring.md +++ b/docs/docs/documentation/getting-started/usage/backups-and-restoring.md @@ -1,6 +1,6 @@ # Backups and Restoring -Mealie provides an integrated mechanics for doing full installation backups of the database. Naviate to `/admin/backups` to +Mealie provides an integrated mechanics for doing full installation backups of the database. Navigate to `/admin/backups` to - See a list of available backups - Perform a backups diff --git a/frontend/api/class-interfaces/backups.ts b/frontend/api/class-interfaces/backups.ts index ab8ddfae47fd..030934df3672 100644 --- a/frontend/api/class-interfaces/backups.ts +++ b/frontend/api/class-interfaces/backups.ts @@ -14,7 +14,7 @@ const routes = { }; export class BackupAPI extends BaseAPI { - /** Returns a list of avaiable .zip files for import into Mealie. + /** Returns a list of available .zip files for import into Mealie. */ async getAll() { return await this.requests.get(routes.backupsAvailable); diff --git a/frontend/api/class-interfaces/user-registration.ts b/frontend/api/class-interfaces/user-registration.ts index dfc54c7b9a3e..fc99658e2ac9 100644 --- a/frontend/api/class-interfaces/user-registration.ts +++ b/frontend/api/class-interfaces/user-registration.ts @@ -8,7 +8,7 @@ const routes = { }; export class RegisterAPI extends BaseAPI { - /** Returns a list of avaiable .zip files for import into Mealie. + /** Returns a list of available .zip files for import into Mealie. */ async register(payload: CreateUserRegistration) { return await this.requests.post(routes.register, payload); diff --git a/frontend/components/Domain/User/UserProfileLinkCard.vue b/frontend/components/Domain/User/UserProfileLinkCard.vue index 39af0323d0bc..9da81fc2bc46 100644 --- a/frontend/components/Domain/User/UserProfileLinkCard.vue +++ b/frontend/components/Domain/User/UserProfileLinkCard.vue @@ -44,7 +44,7 @@ export default defineComponent({ }, image: { type: String, - requried: false, + required: false, default: "", }, }, diff --git a/frontend/composables/use-locales/available-locales.ts b/frontend/composables/use-locales/available-locales.ts index 7e334d0ae7b6..96091c70745a 100644 --- a/frontend/composables/use-locales/available-locales.ts +++ b/frontend/composables/use-locales/available-locales.ts @@ -56,7 +56,7 @@ export const LOCALES = [ progress: 4, }, { - name: "Português (Portugese)", + name: "Português (Portuguese)", value: "pt-PT", progress: 10, }, diff --git a/frontend/composables/use-user.ts b/frontend/composables/use-user.ts index f893c384a73f..97b9416cc3c6 100644 --- a/frontend/composables/use-user.ts +++ b/frontend/composables/use-user.ts @@ -3,7 +3,7 @@ import { useUserApi } from "~/composables/api"; import { UserIn, UserOut } from "~/types/api-types/user"; /* -TODO: Potentiall combine useAllUsers and useUser by delaying the get all users functinality +TODO: Potentially combine useAllUsers and useUser by delaying the get all users functionality Unsure how this could work but still be clear and functional. Perhaps by passing arguments to the useUsers function to control whether the object is substantiated... but some of the others rely on it being substantiated...Will come back to this. */ diff --git a/frontend/pages/group/index.vue b/frontend/pages/group/index.vue index aa8ee44ac486..25316287c746 100644 --- a/frontend/pages/group/index.vue +++ b/frontend/pages/group/index.vue @@ -29,7 +29,7 @@
- These are the default settings when a new recipe is created in your group. These can be changed for indivdual + These are the default settings when a new recipe is created in your group. These can be changed for individual recipes in the recipe settings menu. diff --git a/frontend/pages/recipe/create/bulk.vue b/frontend/pages/recipe/create/bulk.vue index 578c10810f91..4877973b9481 100644 --- a/frontend/pages/recipe/create/bulk.vue +++ b/frontend/pages/recipe/create/bulk.vue @@ -3,7 +3,7 @@
Recipe Bulk Importer - The Bulk recipe importer allows you to import multiple recipes at once by queing the sites on the backend and + The Bulk recipe importer allows you to import multiple recipes at once by queueing the sites on the backend and running the task in the background. This can be useful when initially migrating to Mealie, or when you want to import a large number of recipes. diff --git a/mealie/core/root_logger.py b/mealie/core/root_logger.py index 1e1e54e88ee7..518cf01bf475 100644 --- a/mealie/core/root_logger.py +++ b/mealie/core/root_logger.py @@ -64,7 +64,7 @@ logging.basicConfig( def logger_init() -> logging.Logger: - """Returns the Root Loggin Object for Mealie""" + """Returns the Root Logging Object for Mealie""" return logging.getLogger("mealie") diff --git a/mealie/core/settings/directories.py b/mealie/core/settings/directories.py index 081043bdee16..f550324446aa 100644 --- a/mealie/core/settings/directories.py +++ b/mealie/core/settings/directories.py @@ -39,7 +39,7 @@ class AppDirectories: for dir in required_dirs: dir.mkdir(parents=True, exist_ok=True) - # Boostrap Templates + # Bootstrap Templates markdown_template = self.TEMPLATE_DIR.joinpath("recipes.md") if not markdown_template.exists(): diff --git a/mealie/db/models/_model_base.py b/mealie/db/models/_model_base.py index a8744e35c68e..5a39dcfed4e4 100644 --- a/mealie/db/models/_model_base.py +++ b/mealie/db/models/_model_base.py @@ -15,7 +15,7 @@ class Base: class BaseMixins: """ - `self.update` method which directly passing arugments to the `__init__` + `self.update` method which directly passing arguments to the `__init__` `cls.get_ref` method which will return the object from the database or none. Useful for many-to-many relationships. """ diff --git a/mealie/db/models/_model_utils/helpers.py b/mealie/db/models/_model_utils/helpers.py index b3a3dcfc5c53..5e24f2dd3f90 100644 --- a/mealie/db/models/_model_utils/helpers.py +++ b/mealie/db/models/_model_utils/helpers.py @@ -5,13 +5,13 @@ from typing import Any def get_valid_call(func: Callable, args_dict) -> dict: """ - Returns a dictionary of valid arguemnts for the supplied function. if kwargs are accepted, + Returns a dictionary of valid arguments for the supplied function. if kwargs are accepted, the original dictionary will be returned. """ def get_valid_args(func: Callable) -> list[str]: """ - Returns a tuple of valid arguemnts for the supplied function. + Returns a tuple of valid arguments for the supplied function. """ return inspect.getfullargspec(func).args diff --git a/mealie/pkgs/img/minify.py b/mealie/pkgs/img/minify.py index ceeb2a187fca..f6562d8c1263 100644 --- a/mealie/pkgs/img/minify.py +++ b/mealie/pkgs/img/minify.py @@ -30,7 +30,7 @@ def sizeof_fmt(file_path: Path, decimal_places=2): @dataclass class MinifierOptions: original: bool = True - minature: bool = True + miniature: bool = True tiny: bool = True @@ -108,7 +108,7 @@ class PillowMinifier(ABCMinifier): PillowMinifier.to_webp(image_file, org_dest, quality=70) success = True - if self._opts.minature: + if self._opts.miniature: if not force and min_dest.exists(): self._logger.info(f"{image_file.name} already minified") else: diff --git a/mealie/routes/_base/mixins.py b/mealie/routes/_base/mixins.py index 78f1a0454daa..6729117a036c 100644 --- a/mealie/routes/_base/mixins.py +++ b/mealie/routes/_base/mixins.py @@ -16,7 +16,7 @@ U = TypeVar("U", bound=BaseModel) class HttpRepo(Generic[C, R, U]): """ The HttpRepo[C, R, U] class is a mixin class that provides a common set of methods for CRUD operations. - This class is inteded to be used in a composition pattern where a class has a mixin property. For example: + This class is intended to be used in a composition pattern where a class has a mixin property. For example: ``` class MyClass: diff --git a/mealie/routes/admin/admin_maintenance.py b/mealie/routes/admin/admin_maintenance.py index 0941907178ea..fccf650e0ce9 100644 --- a/mealie/routes/admin/admin_maintenance.py +++ b/mealie/routes/admin/admin_maintenance.py @@ -43,7 +43,7 @@ def clean_recipe_folders(root_dir: Path, dry_run: bool) -> int: for recipe_dir in root_dir.iterdir(): if recipe_dir.is_dir(): - # Attemp to convert the folder name to a UUID + # Attempt to convert the folder name to a UUID try: uuid.UUID(recipe_dir.name) continue diff --git a/mealie/routes/groups/controller_mealplan.py b/mealie/routes/groups/controller_mealplan.py index 95c1e8593e74..f312b9d85553 100644 --- a/mealie/routes/groups/controller_mealplan.py +++ b/mealie/routes/groups/controller_mealplan.py @@ -46,14 +46,14 @@ class GroupMealplanController(BaseUserController): @router.post("/random", response_model=ReadPlanEntry) def create_random_meal(self, data: CreateRandomEntry): """ - create_random_meal is a route that provides the randomized funcitonality for mealplaners. + create_random_meal is a route that provides the randomized functionality for mealplaners. It operates by following the rules setout in the Groups mealplan settings. If not settings are set, it will default return any random meal. Refer to the mealplan settings routes for more information on how rules can be applied to the random meal selector. """ - # Get relavent group rules + # Get relevant group rules rules = self.repos.group_meal_plan_rules.by_group(self.group_id).get_rules( PlanRulesDay.from_date(data.date), data.entry_type.value ) diff --git a/mealie/schema/recipe/recipe_ingredient.py b/mealie/schema/recipe/recipe_ingredient.py index 1a4ebc456558..5a14f03a56e9 100644 --- a/mealie/schema/recipe/recipe_ingredient.py +++ b/mealie/schema/recipe/recipe_ingredient.py @@ -83,7 +83,7 @@ class RecipeIngredient(MealieModel): @classmethod def validate_quantity(cls, value, values) -> NoneFloat: """ - Sometimes the frontend UI will provide an emptry string as a "null" value because of the default + Sometimes the frontend UI will provide an empty string as a "null" value because of the default bindings in Vue. This validator will ensure that the quantity is set to None if the value is an empty string. """ diff --git a/mealie/schema/response/responses.py b/mealie/schema/response/responses.py index 977d9cc231bf..237f174c50b3 100644 --- a/mealie/schema/response/responses.py +++ b/mealie/schema/response/responses.py @@ -13,7 +13,7 @@ class ErrorResponse(BaseModel): @classmethod def respond(cls, message: str, exception: Optional[str] = None) -> dict: """ - This method is an helper to create an obect and convert to a dictionary + This method is an helper to create an object and convert to a dictionary in the same call, for use while providing details to a HTTPException """ return cls(message=message, exception=exception).dict() @@ -26,7 +26,7 @@ class SuccessResponse(BaseModel): @classmethod def respond(cls, message: str) -> dict: """ - This method is an helper to create an obect and convert to a dictionary + This method is an helper to create an object and convert to a dictionary in the same call, for use while providing details to a HTTPException """ return cls(message=message).dict() @@ -38,7 +38,7 @@ class FileTokenResponse(MealieModel): @classmethod def respond(cls, token: str) -> dict: """ - This method is an helper to create an obect and convert to a dictionary + This method is an helper to create an object and convert to a dictionary in the same call, for use while providing details to a HTTPException """ return cls(file_token=token).dict() diff --git a/mealie/services/group_services/service_group_meals.py b/mealie/services/group_services/service_group_meals.py index 6ca559e7ad46..9bc447e602bc 100644 --- a/mealie/services/group_services/service_group_meals.py +++ b/mealie/services/group_services/service_group_meals.py @@ -15,7 +15,7 @@ class MealPlanService(BaseService): def get_random_recipe(self, categories: list[RecipeCategory] = None) -> Recipe: """get_random_recipe returns a single recipe matching a specific criteria of categories. if no categories are provided, a single recipe is returned from the - entire recipe databas. + entire recipe database. Note that the recipe must contain ALL categories in the list provided. diff --git a/mealie/services/group_services/shopping_lists.py b/mealie/services/group_services/shopping_lists.py index f06b0fe5085d..b7d9ddb8cd39 100644 --- a/mealie/services/group_services/shopping_lists.py +++ b/mealie/services/group_services/shopping_lists.py @@ -49,7 +49,7 @@ class ShoppingListService: """ itterates through the shopping list provided and returns a consolidated list where all items that are matched against multiple values are - de-duplicated and only the first item is kept where the quantity is updated accoridngly. + de-duplicated and only the first item is kept where the quantity is updated accordingly. """ consolidated_list: list[ShoppingListItemOut] = [] diff --git a/mealie/services/parser_services/_helpers/string_utils.py b/mealie/services/parser_services/_helpers/string_utils.py index 348aeefafa19..426d540c8e29 100644 --- a/mealie/services/parser_services/_helpers/string_utils.py +++ b/mealie/services/parser_services/_helpers/string_utils.py @@ -19,5 +19,5 @@ def move_parens_to_end(ing_str) -> str: def check_char(char, *eql) -> bool: - """Helper method to check if a charaters matches any of the additional provided arguments""" + """Helper method to check if a characters matches any of the additional provided arguments""" return any(char == eql_char for eql_char in eql) diff --git a/mealie/services/parser_services/crfpp/pre_processor.py b/mealie/services/parser_services/crfpp/pre_processor.py index c3151b700738..9da8b4f16cec 100644 --- a/mealie/services/parser_services/crfpp/pre_processor.py +++ b/mealie/services/parser_services/crfpp/pre_processor.py @@ -11,7 +11,7 @@ replace_abbreviations = { "pint": " pint ", "qt": " quart ", "tbsp": " tablespoon ", - "tbs": " tablespoon ", # Order Matters!, 'tsb' must come after 'tbsp' incase of duplicate matches + "tbs": " tablespoon ", # Order Matters!, 'tsb' must come after 'tbsp' in case of duplicate matches "tsp": " teaspoon ", } @@ -55,7 +55,7 @@ def wrap_or_clause(string: str): '1 tsp. Diamond Crystal or ½ tsp. Morton kosher salt, plus more' -> '1 teaspoon diamond crystal (or 1/2 teaspoon morton kosher salt), plus more' """ - # TODO: Needs more adequite testing to be sure this doens't have side effects. + # TODO: Needs more adequite testing to be sure this doesn't have side effects. split_by_or = string.split(" or ") split_by_comma = split_by_or[1].split(",") diff --git a/mealie/services/parser_services/ingredient_parser.py b/mealie/services/parser_services/ingredient_parser.py index 0762e6b8ad90..f24ed6a869b7 100644 --- a/mealie/services/parser_services/ingredient_parser.py +++ b/mealie/services/parser_services/ingredient_parser.py @@ -78,7 +78,7 @@ class NLPParser(ABCIngredientParser): ) except Exception as e: logger.error(f"Failed to parse ingredient: {crf_model}: {e}") - # TODO: Capture some sort of state for the user to see that an exception occured + # TODO: Capture some sort of state for the user to see that an exception occurred ingredient = RecipeIngredient( title="", note=crf_model.input, diff --git a/mealie/services/recipe/recipe_service.py b/mealie/services/recipe/recipe_service.py index 2240820736ed..ecff5648cbf9 100644 --- a/mealie/services/recipe/recipe_service.py +++ b/mealie/services/recipe/recipe_service.py @@ -83,8 +83,8 @@ class RecipeService(BaseService): def _recipe_creation_factory(user: PrivateUser, name: str, additional_attrs: dict = None) -> Recipe: """ The main creation point for recipes. The factor method returns an instance of the - Recipe Schema class with the appropriate defaults set. Recipes shoudld not be created - else-where to avoid conflicts. + Recipe Schema class with the appropriate defaults set. Recipes should not be created + elsewhere to avoid conflicts. """ additional_attrs = additional_attrs or {} additional_attrs["name"] = name diff --git a/mealie/services/scheduler/scheduler_registry.py b/mealie/services/scheduler/scheduler_registry.py index ae8cbb65080d..88af59338bf8 100644 --- a/mealie/services/scheduler/scheduler_registry.py +++ b/mealie/services/scheduler/scheduler_registry.py @@ -7,7 +7,7 @@ logger = root_logger.get_logger() class SchedulerRegistry: """ - A container class for registring and removing callbacks for the scheduler. + A container class for registering and removing callbacks for the scheduler. """ _daily: list[Callable] = [] diff --git a/mealie/services/scheduler/tasks/__init__.py b/mealie/services/scheduler/tasks/__init__.py index b771f8748d2c..fd7649fba526 100644 --- a/mealie/services/scheduler/tasks/__init__.py +++ b/mealie/services/scheduler/tasks/__init__.py @@ -17,6 +17,6 @@ Tasks Package Common recurring tasks for the server to perform. Tasks here are registered to the SchedulerRegistry class in the app.py file as a post-startup task. This is done to ensure that the tasks are run after the server has -started up and the Scheduler object is only avaiable to a single worker. +started up and the Scheduler object is only available to a single worker. """ diff --git a/mealie/services/scraper/scraper_strategies.py b/mealie/services/scraper/scraper_strategies.py index c79536e4ff1d..1528a38f082a 100644 --- a/mealie/services/scraper/scraper_strategies.py +++ b/mealie/services/scraper/scraper_strategies.py @@ -42,7 +42,7 @@ def safe_scrape_html(url: str) -> str: raise ForceTimeoutException() # ===================================== - # Coppied from requests text property + # Copied from requests text property # Try charset from content-type content = None diff --git a/mealie/services/server_tasks/background_executory.py b/mealie/services/server_tasks/background_executory.py index 62c338695318..57e076dac0cf 100644 --- a/mealie/services/server_tasks/background_executory.py +++ b/mealie/services/server_tasks/background_executory.py @@ -24,7 +24,7 @@ class BackgroundExecutor: pass def dispatch(self, task_name: ServerTaskNames, func: Callable, *args: Any, **kwargs: Any) -> ServerTask: - """The dispatch function is a wrapper around the BackgroundTasks class in Starlett. It dirctly calls + """The dispatch function is a wrapper around the BackgroundTasks class in Starlett. It directly calls the add_task function and your task will be run in the background. This function all passes the id required to check on the server tasks in the database and provide updates. diff --git a/mealie/services/user_services/password_reset_service.py b/mealie/services/user_services/password_reset_service.py index 7a9a3c78967e..62bbc61fe27a 100644 --- a/mealie/services/user_services/password_reset_service.py +++ b/mealie/services/user_services/password_reset_service.py @@ -18,7 +18,7 @@ class PasswordResetService(BaseService): if user is None: self.logger.error(f"failed to create password reset for {email=}: user doesn't exists") - # Do not raise exception here as we don't want to confirm to the client that the Email doens't exists + # Do not raise exception here as we don't want to confirm to the client that the Email doesn't exists return None # Create Reset Token diff --git a/tests/integration_tests/admin_tests/test_admin_about.py b/tests/integration_tests/admin_tests/test_admin_about.py index 5867ece6ef8e..6d5872c5a74b 100644 --- a/tests/integration_tests/admin_tests/test_admin_about.py +++ b/tests/integration_tests/admin_tests/test_admin_about.py @@ -32,7 +32,7 @@ def test_admin_about_get_app_statistics(api_client: TestClient, admin_user: Test as_dict = response.json() - # Smoke Test - Test the endpoint returns something thats a number + # Smoke Test - Test the endpoint returns something that's a number assert as_dict["totalRecipes"] >= 0 assert as_dict["uncategorizedRecipes"] >= 0 assert as_dict["untaggedRecipes"] >= 0 @@ -45,7 +45,7 @@ def test_admin_about_check_app_config(api_client: TestClient, admin_user: TestUs as_dict = response.json() - # Smoke Test - Test the endpoint returns something thats a the expected shape + # Smoke Test - Test the endpoint returns something that's a the expected shape assert as_dict["emailReady"] in [True, False] assert as_dict["ldapReady"] in [True, False] assert as_dict["baseUrlSet"] in [True, False] diff --git a/tests/integration_tests/user_group_tests/test_group_permissions.py b/tests/integration_tests/user_group_tests/test_group_permissions.py index a7d0bcaa356b..cfb550987334 100644 --- a/tests/integration_tests/user_group_tests/test_group_permissions.py +++ b/tests/integration_tests/user_group_tests/test_group_permissions.py @@ -9,7 +9,7 @@ from tests.utils.fixture_schemas import TestUser class Routes: self = "/api/groups/self" - memebers = "/api/groups/members" + members = "/api/groups/members" permissions = "/api/groups/permissions" @@ -25,7 +25,7 @@ def get_permissions_payload(user_id: str, can_manage=None) -> dict: def test_get_group_members(api_client: TestClient, user_tuple: list[TestUser]): usr_1, usr_2 = user_tuple - response = api_client.get(Routes.memebers, headers=usr_1.token) + response = api_client.get(Routes.members, headers=usr_1.token) assert response.status_code == 200 members = response.json() diff --git a/tests/integration_tests/user_recipe_tests/test_recipe_bulk_action.py b/tests/integration_tests/user_recipe_tests/test_recipe_bulk_action.py index b091589ab58b..b910f8a787f9 100644 --- a/tests/integration_tests/user_recipe_tests/test_recipe_bulk_action.py +++ b/tests/integration_tests/user_recipe_tests/test_recipe_bulk_action.py @@ -140,7 +140,7 @@ def test_bulk_export_recipes(api_client: TestClient, unique_user: TestUser, ten_ assert validate_file_token(response_data["fileToken"]) == Path(export_path) - # Use Export Token to donwload export + # Use Export Token to download export response = api_client.get(f'/api/utils/download?token={response_data["fileToken"]}') assert response.status_code == 200 diff --git a/tests/integration_tests/user_tests/test_user_login.py b/tests/integration_tests/user_tests/test_user_login.py index 60f6afe4bec6..861eadcd3194 100644 --- a/tests/integration_tests/user_tests/test_user_login.py +++ b/tests/integration_tests/user_tests/test_user_login.py @@ -41,7 +41,7 @@ def test_user_token_refresh(api_client: TestClient, api_routes: AppRoutes, admin def test_user_lockout_after_bad_attemps(api_client: TestClient, unique_user: TestUser, database: AllRepositories): """ - if the user has more than 5 bad login attemps the user will be locked out for 4 hours + if the user has more than 5 bad login attempts the user will be locked out for 4 hours This only applies if there is a user in the database with the same username """ routes = AppRoutes() diff --git a/tests/unit_tests/test_ingredient_parser.py b/tests/unit_tests/test_ingredient_parser.py index b03ff30717f1..7a97789b3b6f 100644 --- a/tests/unit_tests/test_ingredient_parser.py +++ b/tests/unit_tests/test_ingredient_parser.py @@ -39,7 +39,7 @@ test_ingredients = [ def test_nlp_parser(): models: list[CRFIngredient] = convert_list_to_crf_model([x.input for x in test_ingredients]) - # Itterate over mdoels and test_ingreidnets to gether + # Iterate over models and test_ingredients to gather for model, test_ingredient in zip(models, test_ingredients): assert round(float(sum(Fraction(s) for s in model.qty.split())), 3) == pytest.approx(test_ingredient.quantity)