Skip to content
Open

Improve #1608

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
1aa6eed
comment
jaiwiwjwjwisn May 1, 2024
236874c
comment
jaiwiwjwjwisn May 1, 2024
7c9ba89
comment
jaiwiwjwjwisn May 1, 2024
3870e78
comment
jaiwiwjwjwisn May 1, 2024
6c713a9
comment
jaiwiwjwjwisn May 1, 2024
f50ccd0
comment
jaiwiwjwjwisn May 1, 2024
b0d2367
comment
jaiwiwjwjwisn May 1, 2024
4dff36b
comment
jaiwiwjwjwisn May 1, 2024
ecde8db
comment
jaiwiwjwjwisn May 1, 2024
033da23
comment
jaiwiwjwjwisn May 1, 2024
99f13f6
comment
jaiwiwjwjwisn May 1, 2024
ca77cab
comment
jaiwiwjwjwisn May 1, 2024
6913d96
comment
jaiwiwjwjwisn May 1, 2024
43caace
comment
jaiwiwjwjwisn May 1, 2024
27b0780
comment
jaiwiwjwjwisn May 1, 2024
d408e91
comment
jaiwiwjwjwisn May 1, 2024
95f5666
comment
jaiwiwjwjwisn May 1, 2024
f6eb319
comment
jaiwiwjwjwisn May 1, 2024
d6694f2
comment
jaiwiwjwjwisn May 1, 2024
18b383f
comment
jaiwiwjwjwisn May 1, 2024
ec67a54
comment
jaiwiwjwjwisn May 1, 2024
93f0a1f
comment
jaiwiwjwjwisn May 1, 2024
cb5e4de
comment
jaiwiwjwjwisn May 1, 2024
08f48b9
comment
jaiwiwjwjwisn May 1, 2024
7fbb4ac
comment
jaiwiwjwjwisn May 1, 2024
29e1833
comment
jaiwiwjwjwisn May 1, 2024
15d07bf
comment
jaiwiwjwjwisn May 1, 2024
50fbd70
improve
jaiwiwjwjwisn May 1, 2024
4561397
comment
jaiwiwjwjwisn May 1, 2024
f59c35f
comment
jaiwiwjwjwisn May 1, 2024
c039665
comment
jaiwiwjwjwisn May 1, 2024
03ccbaf
comment
jaiwiwjwjwisn May 1, 2024
bd162ab
comment
jaiwiwjwjwisn May 1, 2024
b2454f2
comment
jaiwiwjwjwisn May 1, 2024
286efa9
comment
jaiwiwjwjwisn May 1, 2024
c6c992b
comment
jaiwiwjwjwisn May 1, 2024
aaf8dc4
comment
jaiwiwjwjwisn May 1, 2024
bcb0061
comment
jaiwiwjwjwisn May 1, 2024
f9198c5
improve
jaiwiwjwjwisn May 1, 2024
bc9a920
comment
jaiwiwjwjwisn May 1, 2024
44dec28
improve
jaiwiwjwjwisn May 1, 2024
f3b5c3a
comment
jaiwiwjwjwisn May 1, 2024
cae8d7c
improve
jaiwiwjwjwisn May 1, 2024
fbe237c
improve
jaiwiwjwjwisn May 1, 2024
d8c1598
comment
jaiwiwjwjwisn May 1, 2024
7ff1e8f
comment
jaiwiwjwjwisn May 1, 2024
6dff1bf
improve
jaiwiwjwjwisn May 1, 2024
4eec0bd
comment
jaiwiwjwjwisn May 1, 2024
a09f31d
comment
jaiwiwjwjwisn May 1, 2024
7ebb0a4
comment
jaiwiwjwjwisn May 1, 2024
9145017
improve
jaiwiwjwjwisn May 1, 2024
83f547e
comment
jaiwiwjwjwisn May 1, 2024
1ed1abc
comment
jaiwiwjwjwisn May 1, 2024
3adda79
improve
jaiwiwjwjwisn May 1, 2024
d21acb8
improve
jaiwiwjwjwisn May 1, 2024
a2dd225
comment
jaiwiwjwjwisn May 1, 2024
d0d6a9d
improve
jaiwiwjwjwisn May 1, 2024
4d15746
comment
jaiwiwjwjwisn May 1, 2024
4424f74
comment
jaiwiwjwjwisn May 1, 2024
fc04511
comment
jaiwiwjwjwisn May 1, 2024
85b1c21
comment
jaiwiwjwjwisn May 1, 2024
7522554
comment
jaiwiwjwjwisn May 1, 2024
00a6eeb
improve
jaiwiwjwjwisn May 1, 2024
07cad9c
comment
jaiwiwjwjwisn May 1, 2024
8b72e36
comment
jaiwiwjwjwisn May 1, 2024
c8cf93d
improve
jaiwiwjwjwisn May 1, 2024
4c6c729
comment
jaiwiwjwjwisn May 1, 2024
e30b07e
comment
jaiwiwjwjwisn May 1, 2024
e013e8c
comment
jaiwiwjwjwisn May 1, 2024
5890cf0
comment
jaiwiwjwjwisn May 1, 2024
87edd23
improve
jaiwiwjwjwisn May 1, 2024
3ee9007
comment
jaiwiwjwjwisn May 1, 2024
b87e941
comment
jaiwiwjwjwisn May 1, 2024
5c78548
improve
jaiwiwjwjwisn May 1, 2024
19cdebb
improve
jaiwiwjwjwisn May 1, 2024
f9f4389
comment
jaiwiwjwjwisn May 1, 2024
df8e09d
improve
jaiwiwjwjwisn May 1, 2024
24ab820
comment
jaiwiwjwjwisn May 1, 2024
5b6b3a6
comment
jaiwiwjwjwisn May 1, 2024
79d1ebe
improve
jaiwiwjwjwisn May 1, 2024
f7d2843
comment
jaiwiwjwjwisn May 1, 2024
182b0f0
improve
jaiwiwjwjwisn May 1, 2024
4bb7ef5
improve
jaiwiwjwjwisn May 1, 2024
5793a2b
comment
jaiwiwjwjwisn May 1, 2024
99f2dc7
comment
jaiwiwjwjwisn May 1, 2024
adb8f70
comment
jaiwiwjwjwisn May 1, 2024
9d9d578
improve
jaiwiwjwjwisn May 1, 2024
a895f77
improve
jaiwiwjwjwisn May 1, 2024
2eaf741
comment
jaiwiwjwjwisn May 1, 2024
ec4fa2b
comment
jaiwiwjwjwisn May 1, 2024
aa72a56
improve
jaiwiwjwjwisn May 1, 2024
3289554
improve
jaiwiwjwjwisn May 1, 2024
96df05b
improve
jaiwiwjwjwisn May 1, 2024
e01cdc8
improve
jaiwiwjwjwisn May 1, 2024
659d2f9
comment
jaiwiwjwjwisn May 1, 2024
3b26edb
improve
jaiwiwjwjwisn May 1, 2024
f421710
improve
jaiwiwjwjwisn May 1, 2024
f756f95
improve
jaiwiwjwjwisn May 1, 2024
d19d9a5
improve
jaiwiwjwjwisn May 1, 2024
9e46b04
improve
jaiwiwjwjwisn May 1, 2024
c0937d5
improve
jaiwiwjwjwisn May 1, 2024
5d675f2
comment
jaiwiwjwjwisn May 1, 2024
aec46a8
comment
jaiwiwjwjwisn May 1, 2024
9352d47
comment
jaiwiwjwjwisn May 1, 2024
56a26d4
improve
jaiwiwjwjwisn May 1, 2024
9868cb6
improve
jaiwiwjwjwisn May 1, 2024
b88c4af
comment
jaiwiwjwjwisn May 1, 2024
a7882e4
improve
jaiwiwjwjwisn May 1, 2024
14d12d4
comment
jaiwiwjwjwisn May 1, 2024
903304d
improve
jaiwiwjwjwisn May 1, 2024
34985bd
improve
jaiwiwjwjwisn May 1, 2024
c7fcade
improve
jaiwiwjwjwisn May 1, 2024
27f6b6f
comment
jaiwiwjwjwisn May 1, 2024
26dd122
comment
jaiwiwjwjwisn May 1, 2024
3561cb3
comment
jaiwiwjwjwisn May 1, 2024
d117899
improve
jaiwiwjwjwisn May 1, 2024
ff3d9cf
comment
jaiwiwjwjwisn May 1, 2024
4b6a69e
comment
jaiwiwjwjwisn May 1, 2024
0f0b7a3
comment
jaiwiwjwjwisn May 1, 2024
9fcb318
improve
jaiwiwjwjwisn May 1, 2024
5a63a20
improve
jaiwiwjwjwisn May 1, 2024
d33d1c3
improve
jaiwiwjwjwisn May 1, 2024
1cf6046
comment
jaiwiwjwjwisn May 1, 2024
8b7e9d0
comment
jaiwiwjwjwisn May 1, 2024
4e39877
comment
jaiwiwjwjwisn May 1, 2024
9dfdd3f
comment
jaiwiwjwjwisn May 1, 2024
42d8011
comment
jaiwiwjwjwisn May 1, 2024
1c4f752
improve
jaiwiwjwjwisn May 1, 2024
eb784b0
comment
jaiwiwjwjwisn May 1, 2024
74d6f4c
comment
jaiwiwjwjwisn May 1, 2024
1259b92
comment
jaiwiwjwjwisn May 1, 2024
5b5f566
comment
jaiwiwjwjwisn May 1, 2024
36454ac
improve
jaiwiwjwjwisn May 1, 2024
7f2e5de
improve
jaiwiwjwjwisn May 1, 2024
f10d659
comment
jaiwiwjwjwisn May 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions default/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,43 @@
# Use the official Python 3.11.1 image as the base image
FROM python:3.11.1-bullseye

# Set a label for the image with the Python version
LABEL python_version=python3.11.1

# Set an environment variable for the Docker context
ENV DOCKER_CONTEXT=True

# Set virtualenv environment variables. This is equivalent to running
# source /env/bin/activate
# Set up the man directories for the man pages
RUN seq 1 8 | xargs -I{} mkdir -p /usr/share/man/man{}
RUN for i in {1..8}; do mkdir -p "/usr/share/man/man$i"; done

# Update the package lists for upgrades and new package installations
RUN apt-get update

# Install necessary packages for the application
RUN apt-get install -y libpq-dev python3-dev build-essential postgresql postgresql-contrib

# Copy the requirements.txt file from the default directory to the app directory
ADD default/requirements.txt /app/

# Upgrade pip to the latest version
RUN pip3 install --upgrade pip

# Install the required packages from the requirements.txt file
RUN pip3 install -r /app/requirements.txt

# Copy the default directory and shared directory to the app directory
ADD default/ /app/
ADD shared /app/shared

# Set the working directory to the app directory
WORKDIR /app/

# Make the db-init.sh script executable
RUN ["chmod", "+x", "/app/db-init.sh"]

# Expose port 8080 for the application
EXPOSE 8080
CMD exec gunicorn --bind :8080 --timeout 120 --worker-class sync --workers 5 --no-sendfile main:app

# Set the default command to run the application using Gunicorn
CMD exec gunicorn --bind :8080 --timeout 120 --worker-class sync --workers 5 --no-sendfile main:app
105 changes: 84 additions & 21 deletions default/docs/actions/action_run_list.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,85 @@

---
summary: Action Runs List
description: Gets the actions runs associated with the given action ID.
tags:
- Workflows & Actions
parameters:
- name: project_string_id
in: path
type: string
required: true
- name: action_id
in: path
type: number
required: true
responses:
200:
description: The list of action runs.
schema:
type: array
items:
$ref: './default/docs/actions/schemas.yaml#/definitions/ActionRun'
# OpenAPI specification for the API endpoint.
openapi: 3.0.0
info:
title: My API
version: 1.0.0

# This is the summary for the API endpoint. It provides a brief description of what the endpoint does.
paths:
/projects/{project_string_id}/actions/{action_id}/runs:
get:
# The summary field provides a brief description of the endpoint.
summary: Get Action Runs List
# The description field provides more detailed information about the endpoint.
description: This endpoint retrieves the list of action runs associated with the given action ID in the specified project.

# The tags field is used to categorize the endpoint and make it easier to find in documentation.
tags:
- Workflows_and_Actions # Indicates that this endpoint is related to workflows and actions.

# The parameters field lists the expected inputs for the endpoint.
parameters:
- name: project_string_id # The name of the parameter.
in: path # The location of the parameter (in this case, in the URL path).
description: The unique identifier of the project.
required: true # Whether or not the parameter is required.
schema:
type: string

- name: action_id # The name of the parameter.
in: path # The location of the parameter (in this case, in the URL path).
description: The unique identifier of the action.
required: true # Whether or not the parameter is required.
schema:
type: integer

# The responses field describes the possible responses from the endpoint.
responses:
'200':
description: Successful operation.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ActionRun'

'400':
description: Bad Request.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'

'404':
description: Not Found.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'

# The components field is used to define reusable components such as schemas and responses.
components:
schemas:
ActionRun:
type: object
properties:
id:
type: integer
status:
type: string
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time

ErrorResponse:
type: object
properties:
error:
type: string
message:
type: string
38 changes: 22 additions & 16 deletions default/docs/actions/action_template_get.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@

---
summary: Get Action Template
description: Gets the given action template by ID.
tags:
summary: # A one-sentence summary of what the API call does
Get Action Template

description: # A more detailed description of the API call's functionality
Gets the given action template by ID. This operation is useful when you need to retrieve a specific action template from a project.

tags: # Tags help categorize and organize the API documentation
- Workflows & Actions
parameters:
- name: project_string_id
in: path
type: string
required: true
- name: action_template_id
in: path
type: number
required: true
responses:

parameters: # Parameters are inputs the API needs to make the call
- name: project_string_id # The name of the parameter
in: path # The location of the parameter (in this case, it's part of the URL path)
type: string # The data type of the parameter
required: true # Whether or not this parameter is required

- name: action_template_id # The name of the parameter
in: path # The location of the parameter (in this case, it's part of the URL path)
type: number # The data type of the parameter
required: true # Whether or not this parameter is required

responses: # The possible responses the API can return
200:
description: The action template object.
description: The action template object. # A short description of the response
schema:
$ref: './default/docs/actions/schemas.yaml#/definitions/ActionTemplate'
$ref: './default/docs/actions/schemas.yaml#/definitions/ActionTemplate' # A reference to the schema defining the structure of the response
36 changes: 20 additions & 16 deletions default/docs/actions/action_template_list.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@

---
summary: Action Templates List
description: Gets the list of action templates on the project.
tags:
summary: # (summary) A brief summary of the endpoint's purpose.
description: # (description) A detailed explanation of the endpoint's functionality.
This action retrieves the list of action templates for a specific project.

tags: # (tags) Categorizes the endpoint for easier navigation in the API documentation.
- Workflows & Actions
parameters:
- name: project_string_id
in: path
type: string
required: true
responses:
200:
description: The list of action templates.
schema:
type: array
items:
$ref: './default/docs/actions/schemas.yaml#/definitions/ActionTemplate'

parameters: # (parameters) Describes the required input for this endpoint.
- name: project_string_id # (name) The name of the parameter.
in: path # (in) The location of the parameter in the API call.
type: string # (type) The data type of the parameter.
required: true # (required) Whether or not the parameter is mandatory.

responses: # (responses) Describes the possible HTTP status codes and their associated data structures.
200: # (200) The standard HTTP success status code.
description: # (description) A brief explanation of the response.
The list of action templates is returned in this response.
schema: # (schema) Describes the structure of the response body.
type: array # (type) The data type of the response.
items: # (items) Describes the structure of each item in the array.
$ref: './default/docs/actions/schemas.yaml#/definitions/ActionTemplate' # (ref) A reference to the ActionTemplate schema.
Loading