-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
Updated operation documentation #3475
Updated operation documentation #3475
Conversation
WalkthroughThis pull request introduces new documentation for the Talawa-Admin project, focusing on developer resources and getting started guides. Several markdown files have been added in the Changes
Sequence DiagramsequenceDiagram
participant Developer
participant TalawaAdmin
participant LocalServer
Developer->>TalawaAdmin: Run npm run serve
TalawaAdmin->>LocalServer: Start server on port 4321
Developer->>LocalServer: Access http://localhost:4321/
Developer->>TalawaAdmin: Register new account
Developer->>TalawaAdmin: Login with credentials
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🔇 Additional comments (3)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Our Pull Request Approval ProcessThanks for contributing! Testing Your CodeRemember, your PRs won't be reviewed until these criteria are met:
Our policies make our code better. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (11)
docs/docs/docs/getting-started/operation.md (5)
8-8
: Improve grammar in the introduction.The sentence contains a split infinitive. Consider rewording for better clarity and professionalism.
-This page outlines how to successfully operate the application +This page outlines how to operate the application successfully🧰 Tools
🪛 LanguageTool
[style] ~8-~8: Style-wise, it’s not ideal to insert an adverb (‘successfully’) in the middle of an infinitive construction (‘to operate’). Try moving the adverb to avoid split infinitives.
Context: ...position: 2 --- This page outlines how to successfully operate the application ## Operation Operation of the applica...(SPLIT_INFINITIVE)
25-25
: Add missing comma for better readability.-By default `talawa-admin` runs on port `4321` on your system's localhost. +By default, `talawa-admin` runs on port `4321` on your system's localhost.
37-41
: Clarify the placeholder syntax usage.The
{{customPort}}
syntax might be confusing for users unfamiliar with template placeholders. Consider adding a brief explanation or using a more explicit example.-http://localhost:{{customPort}}/ +http://localhost:PORT_NUMBER/ -Replace `{{customPort}}` with the actual custom port number you have configured in your `.env` file. +Replace `PORT_NUMBER` with the actual port number you have configured in your `.env` file (e.g., http://localhost:3000/).
45-45
: Improve the registration section structure and clarity.The current paragraph is a run-on sentence and lacks specific details about the registration process.
-The first time you navigate to the running talawa-admin's website you'll land at talawa-admin registration page. Sign up using whatever credentials you want and create the account. Make sure to remember the email and password you entered because they'll be used to sign you in later on. +When you first navigate to the running Talawa-Admin website, you'll land on the registration page. Follow these steps to create your account: + +1. Fill in your email address +2. Choose a secure password +3. Complete any additional required fields +4. Click the "Sign Up" button to create your account + +**Note:** Remember your email and password as they will be required for future logins.
57-58
: Fix grammar and improve clarity of API environment variables.-The email address and password are defined these API environment variables: +The email address and password are defined by the following API environment variables:🧰 Tools
🪛 LanguageTool
[uncategorized] ~57-~57: Possible missing preposition found.
Context: ... email address and password are defined these API environment variables: 1. `API_ADM...(AI_EN_LECTOR_MISSING_PREPOSITION)
docs/docs/docs/developer-resources/testing.md (6)
8-10
: Enhance the introduction with more context.The introduction could be more informative by including:
- Types of tests supported (unit, integration, e2e)
- Testing framework used (Jest, React Testing Library)
- Overview of project's testing strategy and requirements
## Introduction -It is important to test our code. If you are a contributor, please follow these steps. +Talawa Admin uses Jest and React Testing Library for testing. As a contributor, you should: + +- Write unit tests for new components and utilities +- Ensure integration tests cover component interactions +- Maintain minimum 80% test coverage +- Follow the testing guidelines below
12-19
: Add more details about test execution and requirements.Consider expanding this section with:
- Test coverage requirements and how to check coverage
- Explanation of test output and how to interpret results
- Guidelines for writing new tests
### Running tests You can run the tests for `talawa-admin` using this command: ```bash npm run test
+To check test coverage:
+bash +npm run test:coverage +
+
+The coverage report will show:
+- Statements coverage (minimum 80% required)
+- Branch coverage
+- Function coverage
+- Line coverage
+
+### Writing Tests
+
+When writing new tests:
+1. Place test files next to the component being tested
+2. Name test files with.test.tsx
extension
+3. Follow the AAA pattern (Arrange, Act, Assert)
+4. Mock external dependencies appropriately--- `23-23`: **Fix typo in the word "browser".** There's a typo in the word "broswer". ```diff -You can see the output of failing tests in broswer by running `jest-preview` package before running your tests +You can see the output of failing tests in browser by running `jest-preview` package before running your tests
35-41
: Expand the linting documentation.The linting section could be more comprehensive by including:
- Available linting rules and their purpose
- How to configure linting rules
- How to handle and fix common linting errors
### Linting code files You can lint your code files using this command: ```bash npm run lint:fix
+We use ESLint with the following configurations:
+- React recommended rules
+- TypeScript recommended rules
+- Custom project rules
+
+To check linting without fixing:
+bash +npm run lint +
+
+Common linting errors and how to fix them:
+1. Import ordering
+2. Unused variables
+3. Missing type annotations<details> <summary>🧰 Tools</summary> <details> <summary>🪛 LanguageTool</summary> [grammar] ~37-~37: The word ‘lint’ is a noun or an adjective. A verb or adverb is missing or misspelled here, or maybe a comma is missing. Context: ....webp) ### Linting code files You can lint your code files using this command: ``... (PRP_MD_NN) </details> </details> --- `59-59`: **Fix typo in "package.json".** There's a typo in the word "pakage.json". ```diff -We are also running a post-merge(post-pull) hook which will automatically run "npm install" only if there is any change made to pakage.json file so that the developer has all the required dependencies when pulling files from remote. +We are also running a post-merge(post-pull) hook which will automatically run "npm install" only if there is any change made to package.json file so that the developer has all the required dependencies when pulling files from remote.
49-49
: List the specific checks performed by the pre-commit hook.The documentation should specify which code quality checks are performed by the pre-commit hook.
-We run a pre-commit hook which automatically runs code quality checks each time you make a commit and also fixes some of the issues. This way you don't have to run them manually each time. +We run a pre-commit hook which automatically performs the following checks: +1. ESLint for code style and potential errors +2. Prettier for code formatting +3. TypeScript compilation +4. Unit tests in changed files + +These checks help maintain code quality and catch issues early. Failed checks will prevent the commit, but some issues can be automatically fixed.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
docs/docs/docs/developer-resources/introduction.md
(1 hunks)docs/docs/docs/developer-resources/operation.md
(1 hunks)docs/docs/docs/developer-resources/testing.md
(1 hunks)docs/docs/docs/developer-resources/troubleshooting.md
(1 hunks)docs/docs/docs/getting-started/installation.md
(0 hunks)docs/docs/docs/getting-started/operation.md
(1 hunks)docs/sidebars.ts
(1 hunks)
💤 Files with no reviewable changes (1)
- docs/docs/docs/getting-started/installation.md
✅ Files skipped from review due to trivial changes (3)
- docs/docs/docs/developer-resources/troubleshooting.md
- docs/docs/docs/developer-resources/introduction.md
- docs/docs/docs/developer-resources/operation.md
🧰 Additional context used
🪛 LanguageTool
docs/docs/docs/getting-started/operation.md
[style] ~8-~8: Style-wise, it’s not ideal to insert an adverb (‘successfully’) in the middle of an infinitive construction (‘to operate’). Try moving the adverb to avoid split infinitives.
Context: ...position: 2 --- This page outlines how to successfully operate the application ## Operation Operation of the applica...
(SPLIT_INFINITIVE)
[uncategorized] ~24-~24: Did you mean: “By default,”?
Context: ...serve ``` ### Accessing Talawa-Admin By default talawa-admin
runs on port `4321` on y...
(BY_DEFAULT_COMMA)
[uncategorized] ~57-~57: Possible missing preposition found.
Context: ... email address and password are defined these API environment variables: 1. `API_ADM...
(AI_EN_LECTOR_MISSING_PREPOSITION)
docs/docs/docs/developer-resources/testing.md
[grammar] ~37-~37: The word ‘lint’ is a noun or an adjective. A verb or adverb is missing or misspelled here, or maybe a comma is missing.
Context: ....webp) ### Linting code files You can lint your code files using this command: ``...
(PRP_MD_NN)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Test Application
🔇 Additional comments (2)
docs/docs/docs/developer-resources/testing.md (2)
1-6
: LGTM! Well-structured metadata.The frontmatter contains all necessary fields and follows documentation conventions.
33-33
: Verify the referenced image exists.The documentation references an image at
../../../static/img/markdown/installation/jest-preview.webp
. Please ensure this image exists in the repository.✅ Verification successful
Image file exists at the referenced location ✅
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check if the referenced image exists fd -t f "jest-preview.webp"Length of output: 115
In a development environment, the defaults are: | ||
|
||
1. `API_ADMINISTRATOR_USER_EMAIL_ADDRESS`[email protected] | ||
1. `API_ADMINISTRATOR_USER_NAME`=administrator | ||
1. `API_ADMINISTRATOR_USER_PASSWORD`=password |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add security warning for default credentials.
The documentation should emphasize that these are development-only credentials and should never be used in production.
In a development environment, the defaults are:
1. `API_ADMINISTRATOR_USER_EMAIL_ADDRESS`[email protected]
1. `API_ADMINISTRATOR_USER_NAME`=administrator
1. `API_ADMINISTRATOR_USER_PASSWORD`=password
+
+> **⚠️ Security Warning**: These are default credentials for development purposes only.
+> Never use these credentials in a production environment. Always change these values
+> to secure credentials before deploying to production.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
In a development environment, the defaults are: | |
1. `API_ADMINISTRATOR_USER_EMAIL_ADDRESS`=[email protected] | |
1. `API_ADMINISTRATOR_USER_NAME`=administrator | |
1. `API_ADMINISTRATOR_USER_PASSWORD`=password | |
In a development environment, the defaults are: | |
1. `API_ADMINISTRATOR_USER_EMAIL_ADDRESS`=[email protected] | |
1. `API_ADMINISTRATOR_USER_NAME`=administrator | |
1. `API_ADMINISTRATOR_USER_PASSWORD`=password | |
> **⚠️ Security Warning**: These are default credentials for development purposes only. | |
> Never use these credentials in a production environment. Always change these values | |
> to secure credentials before deploying to production. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop-postgres #3475 +/- ##
=====================================================
+ Coverage 1.90% 88.80% +86.89%
=====================================================
Files 316 338 +22
Lines 8249 8626 +377
Branches 1880 1922 +42
=====================================================
+ Hits 157 7660 +7503
+ Misses 8083 636 -7447
- Partials 9 330 +321 ☔ View full report in Codecov by Sentry. |
008904a
into
PalisadoesFoundation:develop-postgres
What kind of change does this PR introduce?
Updated operation documentation
Issue Number:
Snapshots/Videos:
If relevant, did you update the documentation?
Summary
Updated operation documentation explaining how to login
Does this PR introduce a breaking change?
Other information
Have you read the contributing guide?
Summary by CodeRabbit