Skip to content
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

fix documentation workflow for talawa-admin #1300

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 5 additions & 4 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ jobs:

- name: Generate Documentation of Markdown pages
run: |
yarn global add typedoc
yarn add typedoc-plugin-markdown
yarn typedoc --entryPoints src/components src/screens --out talawa-admin-docs --plugin typedoc-plugin-markdown --theme markdown --entryPointStrategy expand --exclude "**/*.test.ts" --exclude "**/*.css"

npm install --global typedoc
npm install typedoc-plugin-markdown
npm install --save-dev @types/node
npx typedoc --entryPoints src/components src/screens --out talawa-admin-docs --plugin typedoc-plugin-markdown --theme markdown --entryPointStrategy expand --exclude "**/*.test.ts" --exclude "**/*.css"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What have you changed to ensure that the typedoc generated files will always be MPX compatible during the giving action workflow process?

Copy link
Contributor Author

@dhiraj0911 dhiraj0911 Dec 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typedoc and its markdown plugin don't natively support MPX formatting. To address this, I am considering adding a post-processing script to escape <, >, {, and } characters in the generated Markdown files. This will be complemented by a validation step using npx docusaurus-mdx-checker to ensure MPX compatibility.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Write a python script to do this
  2. Follow the Google Python style guide especially in the DocString area. https://google.github.io/styleguide/pyguide.html
  3. Make sure that the script is python black, pydocstring, pylint, flake8 and pycodestyle compliant
  4. Make sure that the script uses functions. Use the countline.py script in the workflow directory as a guide

image


- name: Checking doc updated
id: DocUpdated
run: |
Expand Down
6 changes: 3 additions & 3 deletions CODE_STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Follow this [link](https://getbootstrap.com/docs/5.3/customize/sass/) to learn h

**File Structure**

- `src/assets/scss/components/{partialFile}.scss` - where the {partialFile} are the following files
- `src/assets/scss/components/\{partialFile\}.scss` - where the \{partialFile\} are the following files
- **_accordion.scss**
- **_alert.scss**
- **_badge.scss**
Expand All @@ -195,12 +195,12 @@ Follow this [link](https://getbootstrap.com/docs/5.3/customize/sass/) to learn h
- **_progress.scss**
- **_spinners.scss**

- `src/assets/scss/content/{partialFile}.scss` - where the {partialFile} are the following files
- `src/assets/scss/content/\{partialFile\}.scss` - where the \{partialFile\} are the following files
- **_table.scss**
- **_typography.scss**


- `src/assets/scss/forms/{partialFile}.scss` - where the {partialFile} are the following files
- `src/assets/scss/forms/\{partialFile\}.scss` - where the \{partialFile\} are the following files
- **_check-radios.scss**
- **_floating-label.scss**
- **_form-control.scss**
Expand Down
18,363 changes: 18,360 additions & 3 deletions package-lock.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@

### fetchInstalled

▸ **fetchInstalled**(): `Promise`<`any`\>
▸ **fetchInstalled**(): `Promise<any>`

#### Returns

`Promise`<`any`\>
`Promise<any>`

#### Defined in

Expand All @@ -40,11 +40,11 @@ ___

### fetchStore

▸ **fetchStore**(): `Promise`<`any`\>
▸ **fetchStore**(): `Promise<any>`

#### Returns

`Promise`<`any`\>
`Promise<any>`

#### Defined in

Expand All @@ -54,7 +54,7 @@ ___

### generateLinks

▸ **generateLinks**(`plugins`): { `name`: `string` ; `url`: `string` }[]
▸ **generateLinks**(`plugins`): `{ name: string; url: string }[]`

#### Parameters

Expand All @@ -64,7 +64,7 @@ ___

#### Returns

{ `name`: `string` ; `url`: `string` }[]
An array of objects, each with a 'name' property of type string and a 'url' property of type string.

#### Defined in

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ___

### checkIn

**checkIn**: ``null`` \| { `_id`: `string` ; `allotedRoom`: `string` ; `allotedSeat`: `string` ; `time`: `string` }
- **checkIn**: `null` \| `{ '_id': 'string'; 'allotedRoom': 'string'; 'allotedSeat': 'string'; 'time': 'string' }`

#### Defined in

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

### checkIn

**checkIn**: ``null`` \| { `_id`: `string` ; `allotedRoom`: `string` ; `allotedSeat`: `string` ; `time`: `string` }
- **checkIn**: `null` \| `{ '_id': 'string'; 'allotedRoom': 'string'; 'allotedSeat': 'string'; 'time': 'string' }`

#### Defined in

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ ___

### setHideDrawer

**setHideDrawer**: `Dispatch`<`SetStateAction`<``null`` \| `boolean`\>\>
- **setHideDrawer**: `Dispatch<SetStateAction<null | boolean>>`

#### Defined in

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ___

### setHideDrawer

**setHideDrawer**: `Dispatch`<`SetStateAction`<``null`` \| `boolean`\>\>
- **setHideDrawer**: `Dispatch<SetStateAction<`null` \| boolean\>\>`

#### Defined in

Expand Down
6 changes: 3 additions & 3 deletions talawa-admin-docs/modules/components_AddOn_AddOn.default.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ ___

| Name | Type |
| :------ | :------ |
| `children` | `Requireable`<`any`\> |
| `extras` | `Requireable`<`InferProps`<{ `actions`: `Requireable`<`InferProps`<{}\>\> ; `components`: `Requireable`<`InferProps`<{}\>\> }\>\> |
| `name` | `Requireable`<`string`\> |
| `children` | `Requireable<any>` |
| `extras` | `Requireable<InferProps<{ actions: Requireable<InferProps<{}>>; components: Requireable<InferProps<{}>> }>>` |
| `name` | `Requireable<string>` |

#### Defined in

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ ___

#### Type declaration

| Name | Type |
| :------ | :------ |
| `configurable` | `Requireable`<`boolean`\> |
| `description` | `Requireable`<`string`\> |
| `enabled` | `Requireable`<`boolean`\> |
| `isInstalled` | `Requireable`<`boolean`\> |
| `title` | `Requireable`<`string`\> |
| Name | Type |
| :------------ | :------------------ |
| `configurable`| `Requireable<boolean>`|
| `description` | `Requireable<string>` |
| `enabled` | `Requireable<boolean>`|
| `isInstalled` | `Requireable<boolean>`|
| `title` | `Requireable<string>` |


#### Defined in

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ___

| Name | Type |
| :------ | :------ |
| `createdBy` | `Requireable`<`string`\> |
| `createdBy` | `Requireable<string\>` |

#### Defined in

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

### changeLanguage

▸ **changeLanguage**(`languageCode`): `Promise`<`void`\>
▸ **changeLanguage**(`languageCode`): `Promise<void>`

#### Parameters

Expand All @@ -23,7 +23,7 @@

#### Returns

`Promise`<`void`\>
`Promise<void>`

#### Defined in

Expand Down
32 changes: 29 additions & 3 deletions talawa-admin-docs/modules/components_CheckIn_mocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,18 @@

### checkInMutationSuccess

• `Const` **checkInMutationSuccess**: { `request`: { `query`: `DocumentNode` = MARK\_CHECKIN; `variables`: { `allotedRoom`: `string` = ''; `allotedSeat`: `string` = ''; `eventId`: `string` = 'event123'; `userId`: `string` = 'user123' } } ; `result`: { `data`: { `checkIn`: { `_id`: `string` = '123' } } } }[]
• **`checkInMutationSuccess`** (Array of objects):
- **request**: Object with properties:
- `query` (DocumentNode): Default value is `MARK_CHECKIN`.
- `variables`: Object with default properties:
- `allotedRoom` (string): Default value `''`.
- `allotedSeat` (string): Default value `''`.
- `eventId` (string): Default value `'event123'`.
- `userId` (string): Default value `'user123'`.
- **result**: Object with properties:
- `data`: Object containing:
- `checkIn`: Object with properties:
- `_id` (string): Default value `'123'`.

#### Defined in

Expand All @@ -24,7 +35,15 @@ ___

### checkInMutationUnsuccess

• `Const` **checkInMutationUnsuccess**: { `error`: `Error` ; `request`: { `query`: `DocumentNode` = MARK\_CHECKIN; `variables`: { `allotedRoom`: `string` = ''; `allotedSeat`: `string` = ''; `eventId`: `string` = 'event123'; `userId`: `string` = 'user123' } } }[]
• **`checkInMutationUnsuccess`** (Array of objects):
- **error**: `Error`
- **request**: Object with properties:
- `query` (DocumentNode): Default value is `MARK_CHECKIN`.
- `variables`: Object with default properties:
- `allotedRoom` (string): Default value `''`.
- `allotedSeat` (string): Default value `''`.
- `eventId` (string): Default value `'event123'`.
- `userId` (string): Default value `'user123'`.

#### Defined in

Expand All @@ -34,7 +53,14 @@ ___

### checkInQueryMock

• `Const` **checkInQueryMock**: { `request`: { `query`: `DocumentNode` = EVENT\_CHECKINS; `variables`: { `id`: `string` = 'event123' } } ; `result`: { `data`: [`InterfaceAttendeeQueryResponse`](../interfaces/components_CheckIn_types.InterfaceAttendeeQueryResponse.md) = checkInQueryData } }[]
• **`checkInQueryMock`** (Array of objects):
- **request**: Object with properties:
- `query` (DocumentNode): Default value is `EVENT_CHECKINS`.
- `variables`: Object with property:
- `id` (string): Default value `'event123'`.
- **result**: Object with properties:
- `data`: Array of [`InterfaceAttendeeQueryResponse`](../interfaces/components_CheckIn_types.InterfaceAttendeeQueryResponse.md), default value `checkInQueryData`.


#### Defined in

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@

### default

▸ **default**(`props`, `context?`): ``null`` \| `ReactElement`<`any`, `any`\>
▸ **default**(`props`, `context?`): `null` | `ReactElement<any, any>`

#### Parameters

| Name | Type |
| :------ | :------ |
| `props` | `PropsWithChildren`<`InterfaceCalendarProps`\> |
| `context?` | `any` |
| props | `PropsWithChildren<InterfaceCalendarProps>` |
| context? | `any` |

#### Returns

``null`` \| `ReactElement`<`any`, `any`\>
`null` \| `ReactElement<any, any\>`

#### Defined in

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@

| Name | Type |
| :------ | :------ |
| `handleClose` | () => `void` |
| `organization` | { `_id`: `string` ; `members`: `InterfaceUser`[] } |
| `organization._id` | `string` |
| `organization.members` | `InterfaceUser`[] |
| `refetchData` | () => `void` |
| `show` | `boolean` |
| `task` | `InterfaceTask` |
| handleClose | `() => void` |
| organization | `{ _id: string; members: InterfaceUser[] }` |
| organization._id | `string` |
| organization.members | `InterfaceUser[]` |
| refetchData | `() => void` |
| show | `boolean` |
| task | `InterfaceTask` |

#### Defined in

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@

### default

▸ **default**(`props`, `context?`): ``null`` \| `ReactElement`<`any`, `any`\>
▸ **default**(`props`, `context?`): `null | ReactElement<any, any>`

#### Parameters

| Name | Type |
| :------ | :------ |
| `props` | `PropsWithChildren`<`InterfaceUserPasswordUpdateProps`\> |
| `props` | `PropsWithChildren<InterfaceUserPasswordUpdateProps\>` |
| `context?` | `any` |

#### Returns

``null`` \| `ReactElement`<`any`, `any`\>
`null` \| `ReactElement<any, any\>`

#### Defined in

Expand Down
6 changes: 3 additions & 3 deletions talawa-admin-docs/modules/components_UserUpdate_UserUpdate.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@

### default

▸ **default**(`props`, `context?`): ``null`` \| `ReactElement`<`any`, `any`\>
▸ **default**(`props`, `context?`): `null` \| `ReactElement<any, any\>`

#### Parameters

| Name | Type |
| :------ | :------ |
| `props` | `PropsWithChildren`<`InterfaceUserUpdateProps`\> |
| `props` | `PropsWithChildren<InterfaceUserUpdateProps\>` |
| `context?` | `any` |

#### Returns

``null`` \| `ReactElement`<`any`, `any`\>
`null` \| `ReactElement<any, any\>`

#### Defined in

Expand Down
Loading
Loading