mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-24 02:39:20 -05:00
Merge branch 'TandoorRecipes:develop' into cookbookapp-images-import
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
If you like this application and want it to give back, there are many ways to contribute.
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
!!! success "Contribution List"
|
||||
If you help bring this project forward you deserve to be credited for it.
|
||||
Feel free to add yourself to `CONTRIBUTERS.md` or message me to add you if you have contributed anything.
|
||||
If you help bring this project forward you deserve to be credited for it.
|
||||
Feel free to add yourself to `CONTRIBUTERS.md` or message me to add you if you have contributed anything.
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## Translations
|
||||
|
||||
@@ -11,23 +13,23 @@ Improve the translations for any of the existing languages.
|
||||
|
||||
Add a new language to the long list of existing translations.
|
||||
|
||||
- Armenian
|
||||
- Bulgarian
|
||||
- Catalan
|
||||
- Czech
|
||||
- Danish
|
||||
- Dutch
|
||||
- English
|
||||
- French
|
||||
- German
|
||||
- Hungarian
|
||||
- Italian
|
||||
- Latvian
|
||||
- Norwegian
|
||||
- Polish
|
||||
- Russian
|
||||
- Spanish
|
||||
- Swedish
|
||||
- Armenian
|
||||
- Bulgarian
|
||||
- Catalan
|
||||
- Czech
|
||||
- Danish
|
||||
- Dutch
|
||||
- English
|
||||
- French
|
||||
- German
|
||||
- Hungarian
|
||||
- Italian
|
||||
- Latvian
|
||||
- Norwegian
|
||||
- Polish
|
||||
- Russian
|
||||
- Spanish
|
||||
- Swedish
|
||||
|
||||
See [here](/docs/contribute/translations) for further information on how to contribute translation to Tandoor.
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
If you want to contribute bug fixes or small tweaks then your pull requests are always welcome!
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
!!! danger "Discuss First!"
|
||||
If you want to contribute larger features that introduce more complexity to the project please
|
||||
make sure to **first submit a technical description** outlining what and how you want to do it.
|
||||
This allows me and the community to give feedback and manage the complexity of the overall
|
||||
application. If you don't do this please don't be mad if I reject your PR.
|
||||
If you want to contribute larger features that introduce more complexity to the project please
|
||||
make sure to **first submit a technical description** outlining what and how you want to do it.
|
||||
This allows me and the community to give feedback and manage the complexity of the overall
|
||||
application. If you don't do this please don't be mad if I reject your PR.
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
## License
|
||||
|
||||
@@ -20,23 +22,29 @@ To contribute to the project you are required to use the following packages with
|
||||
- isort
|
||||
- prettier
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! tip "Manual Formatting"
|
||||
It is possible to run formatting manually, but it is recommended to setup your IDE to format on save.
|
||||
``` bash
|
||||
flake8 file.py --ignore=E501 | isort -q file.py | yapf -i file.py
|
||||
prettier --write file.vue
|
||||
It is possible to run formatting manually, but it is recommended to setup your IDE to format on save.
|
||||
``` bash
|
||||
flake8 file.py --ignore=E501 | isort -q file.py | yapf -i file.py
|
||||
prettier --write file.vue
|
||||
```
|
||||
|
||||
## Testing
|
||||
Django uses pytest-django to implement a full suite of testing. If you make any functional changes, please implment the appropriate
|
||||
|
||||
Django uses pytest-django to implement a full suite of testing. If you make any functional changes, please implment the appropriate
|
||||
tests.
|
||||
|
||||
Tandoor is also actively soliciting contribors willing to setup vue3 testing. If you have knowledge in this area it would be greatly appreciated.
|
||||
Tandoor is also actively soliciting contribors willing to setup vue3 testing. If you have knowledge in this area it would be greatly appreciated.
|
||||
|
||||
## API Client
|
||||
|
||||
Tandoor uses [django-rest-framework](https://www.django-rest-framework.org/) for API implementation. Making contributions that impact the API requires an understanding of
|
||||
Viewsets and Serializers.
|
||||
<!-- prettier-ignore -->
|
||||
!!! note "JAVA required"
|
||||
The OpenAPI Generator is a Java project. You must have the java binary executable available on your PATH for this to work.
|
||||
|
||||
Tandoor uses [django-rest-framework](https://www.django-rest-framework.org/) for API implementation. Making contributions that impact the API requires an understanding of
|
||||
Viewsets and Serializers.
|
||||
|
||||
Also double check that your changes are actively reflected in the schema so that client apis are generated accurately.
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
!!! info
|
||||
The dev setup is a little messy as this application combines the best (at least in my opinion) of both Django and Vue.js.
|
||||
<!-- prettier-ignore-start -->
|
||||
!!! info "Development Setup"
|
||||
The dev setup is a little messy as this application combines the best (at least in my opinion) of both Django and Vue.js.
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
### Devcontainer Setup
|
||||
|
||||
@@ -30,10 +32,17 @@ populated from default values.
|
||||
|
||||
### Vue.js
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
!!! warning "Feature Freeze"
|
||||
With the exception of bug fixes, no changes will be accepted on the legacy `vue` front-end.
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
Most new frontend pages are build using [Vue.js](https://vuejs.org/).
|
||||
|
||||
In order to work on these pages, you will have to install a Javascript package manager of your choice. The following examples use yarn.
|
||||
|
||||
In the `vue` folder run `yarn install` to install the dependencies. After that you can use `yarn serve` to start the development server,
|
||||
and proceed to test your changes. If you do not wish to work on those pages, but instead want the application to work properly during
|
||||
development, run `yarn build` to build the frontend pages once.
|
||||
In the `vue` folder run `yarn install` followed by `yarn build` to install and build the legacy front-end.
|
||||
In the `vue3` folder run `yarn install` followed by `yarn build` to install and build the new front-end.
|
||||
|
||||
After that you can use `yarn serve` from the `vue3` folder to start the development server, and proceed to test your changes.
|
||||
If you do not wish to work on those pages, but instead want the application to work properly during development, run `yarn build` to build the frontend pages once.
|
||||
|
||||
@@ -13,14 +13,14 @@ PyCharm can be configured to format and lint on save. Doing so requires some man
|
||||
2. Click the '+' to add a new watcher.
|
||||
3. Configure the watcher as below.
|
||||
|
||||

|
||||

|
||||
|
||||
4. Navigate to File -> Settings -> Editor -> Inspections -> File watcher problems
|
||||
5. Under Severity select 'Edit Severities'
|
||||
6. Click the '+' to add a severity calling it 'Linting Error'
|
||||
7. Configure a background and effect as below.
|
||||
|
||||

|
||||

|
||||
|
||||
## Setup isort
|
||||
|
||||
@@ -28,7 +28,7 @@ PyCharm can be configured to format and lint on save. Doing so requires some man
|
||||
2. Click the '+' to add a new watcher.
|
||||
3. Configure the watcher as below.
|
||||
|
||||

|
||||

|
||||
|
||||
## Setup yapf
|
||||
|
||||
@@ -36,12 +36,16 @@ PyCharm can be configured to format and lint on save. Doing so requires some man
|
||||
2. Click the '+' to add a new watcher.
|
||||
3. Configure the watcher as below.
|
||||
|
||||

|
||||

|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! hint
|
||||
Adding a comma at the end of a list will trigger yapf to put each element of the list on a new line
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! note
|
||||
In order to debug vue yarn and vite servers must be started before starting the django server.
|
||||
|
||||
## Setup prettier
|
||||
|
||||
1. Navigate to File -> Settings -> Tools -> File Watchers
|
||||
@@ -50,13 +54,11 @@ PyCharm can be configured to format and lint on save. Doing so requires some man
|
||||
4. Click the three dots next to 'Scope' to create a custom scope.
|
||||
5. Click '+' to add a new scope
|
||||
|
||||
- Name: prettier
|
||||
- Pattern: `file:vue/src//*||file:vue3/src//*||file:docs//*`
|
||||
- Name: prettier
|
||||
- Pattern: `file:vue/src//*||file:vue3/src//*||file:docs//*`
|
||||
|
||||
6. Configure the watcher as below.
|
||||
|
||||

|
||||

|
||||
|
||||
- Arguments: `--cwd $ProjectFileDir$\vue prettier -w --config $ProjectFileDir$\.prettierrc $FilePath$`
|
||||
|
||||
## Setup Volar??
|
||||
- Arguments: `--cwd $ProjectFileDir$\vue prettier -w --config $ProjectFileDir$\.prettierrc $FilePath$`
|
||||
|
||||
@@ -7,10 +7,11 @@ You can simply register an account and then follow these steps to add translatio
|
||||
3. Select Tandoor and on the top-right hand corner, select `Watch project Tandoor` (click on `Not watching`).
|
||||
4. Go back to the dashboard. It now shows you the relevant translations for your languages. Click on the pencil icon to get started.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! info "Creating a new language"
|
||||
To create a new language you must first select Tandoor (the project) and then a component.
|
||||
Here you will have the option to add the language. Afterwards you can also simply add it to the other components as well.
|
||||
Once a new language is (partially) finished let me know on GitHub so I can add it to the language-switcher in Tandoor itself.
|
||||
To create a new language you must first select Tandoor (the project) and then a component.
|
||||
Here you will have the option to add the language. Afterwards you can also simply add it to the other components as well.
|
||||
Once a new language is (partially) finished let me know on GitHub so I can add it to the language-switcher in Tandoor itself.
|
||||
|
||||
There is also [a lot of documentation](https://docs.weblate.org/en/latest/user/translating.html) available from Weblate directly.
|
||||
|
||||
|
||||
@@ -27,19 +27,23 @@ VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=esbenp.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! hint
|
||||
Adding a comma at the end of a list will trigger yapf to put each element of the list on a new line
|
||||
Adding a comma at the end of a list will trigger yapf to put each element of the list on a new line
|
||||
|
||||
## VSCode Tasks
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
!!! note
|
||||
In order to debug vue yarn and vite servers must be started before starting the django server.
|
||||
|
||||
There are a number of built in tasks that are available. Here are a few of the key ones:
|
||||
|
||||
- `Setup Dev Server` - Runs all the prerequisite steps so that the dev server can be run inside VSCode.
|
||||
- `Setup Tests` - Runs all prerequisites so tests can be run inside VSCode.
|
||||
- `Setup Dev Server` - Runs all the prerequisite steps so that the dev server can be run inside VSCode.
|
||||
- `Setup Tests` - Runs all prerequisites so tests can be run inside VSCode.
|
||||
|
||||
Once these are run, you should be able to run/debug a django server in VSCode as well as run/debug tests directly through VSCode.
|
||||
There are also a few other tasks specified in case you have specific development needs:
|
||||
|
||||
- `Run Dev Server` - Runs a django development server not connected to VSCode.
|
||||
- `Run all pytests` - Runs all the pytests outside of VSCode.
|
||||
- `Yarn Serve` - Runs development Vue.js server not connected to VSCode. Useful if you want to make Vue changes and see them in realtime.
|
||||
- `Serve Documentation` - Runs a documentation server. Useful if you want to see how changes to documentation show up.
|
||||
- `Run Dev Server` - Runs a django development server not connected to VSCode.
|
||||
- `Run all pytests` - Runs all the pytests outside of VSCode.
|
||||
- `Yarn Serve` - Runs development Vue.js server not connected to VSCode. Useful if you want to make Vue changes and see them in realtime.
|
||||
- `Serve Documentation` - Runs a documentation server. Useful if you want to see how changes to documentation show up.
|
||||
|
||||
Reference in New Issue
Block a user