forked from sartography/spiff-arena
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs/pycharm setup (sartography#1169)
* Just some notes from getting my dev environnent set up again. * fix readme link * fixing black configuration. * Black config settings in pre-commit. * Update README.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update README.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update spiffworkflow-backend/docs/pycharm.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update spiffworkflow-backend/docs/pycharm.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update spiffworkflow-backend/docs/pycharm.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update spiffworkflow-backend/docs/pycharm.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
- Loading branch information
1 parent
5114e99
commit 137e8a8
Showing
8 changed files
with
80 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,6 @@ pyupgrade = "^3.1.0" | |
|
||
[tool.poetry.group.dev.dependencies] | ||
tomli = "^2.0.1" | ||
|
||
[tool.black] | ||
line-length = 130 |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# PyCharm Setup Instructions | ||
|
||
## Pre-Requisites | ||
* Before starting, be sure you can run bin/run_server_locally script successfully. | ||
This will prove that your libraries are properly configured. | ||
* Checkout a git repository with sample process models such as our [Sample Process Models](https://github.com/sartography/sample-process-models) | ||
|
||
|
||
## Step 1 - Python Interpreter | ||
In the settings, ensure that you have configured your Python interpreter to use the poetry environment you have created. | ||
|
||
## Step 2 - Configuration Settings | ||
Create a config.py file in the src/instance directory, with the following base settings | ||
```python | ||
FLASK_SESSION_SECRET_KEY="[PUT SOME RANDOM STUFF HERE]" | ||
SPIFFWORKFLOW_BACKEND_APPLICATION_ROOT="/" | ||
SPIFFWORKFLOW_BACKEND_BPMN_SPEC_ABSOLUTE_DIR="[FULL PATH TO SAMPLE PROCESS MODEL GIT CLONE]" | ||
|
||
# This will configure your application to use a built in login rather than | ||
# relying on keycloak etc... | ||
SPIFFWORKFLOW_BACKEND_AUTH_CONFIGS = [ | ||
{ | ||
"identifier":"default", | ||
"label":"internal openid", | ||
"uri":"http://localhost:7000/openid", | ||
"client_id":"spiffworkflow-backend", | ||
"client_secret":"JXeQExm0JhQPLumgHtIIqf52bDalHz0q" | ||
} | ||
] | ||
|
||
# You can modify the permissions by creating your owm permissions file and setting it here. See [example.yml](../src/spiffworkflow_backend/config/permissions/example.yml) | ||
SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME="example.yml" | ||
``` | ||
|
||
|
||
Checkout [the default.py config file](./src/spiffworkflow_backend/config/default.py) for more options you can specify here as needed. | ||
|
||
## Step 3 - Run Configuration | ||
|
||
Configure your Run configuration with the following settings: | ||
* select Flask Server as the run type | ||
* set the target to: spiffworkflow_backend | ||
* set the port to 7000 (-p 7000) | ||
*  | ||
*  | ||
|
||
|
||
## Step 4 - Code Formatting | ||
|
||
We are using [Black](https://black.readthedocs.io/en/stable/) for code formatting. | ||
To avoid the madness of having Black enforce one style, and your editor enforcing another, you should follow [the directions outlined here](https://black.readthedocs.io/en/stable/integrations/editors.html#pycharm-intellij-idea). | ||
|
||
|
||
Start it up using the play / debug buttons.~~ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.