Skip to content

Commit

Permalink
Merge with Develop 20240924 (#2573)
Browse files Browse the repository at this point in the history
* 20240929111306 Deleted all files in the main branch in anticipation of merging develop into main cleanly

* 20240929111329 Merge develop into main

---------

Co-authored-by: Peter Harrison <[email protected]>
  • Loading branch information
palisadoes and palisadian authored Sep 29, 2024
1 parent 77f77b5 commit b6b186f
Show file tree
Hide file tree
Showing 169 changed files with 9,746 additions and 2,835 deletions.
3 changes: 2 additions & 1 deletion coderabbit.yaml → .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ reviews:
drafts: false
base_branches:
- develop
- main
chat:
auto_reply: true
auto_reply: true
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ If applicable, add screenshots to help explain your problem.
Add any other context or screenshots about the feature request here.

**Potential internship candidates**
Please read this if you are planning to apply for a Palisadoes Foundation internship https://github.com/PalisadoesFoundation/talawa/issues/359

Please read this if you are planning to apply for a Palisadoes Foundation internship
- https://github.com/PalisadoesFoundation/talawa/issues/359
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ A clear and concise description of approach to be followed.
Add any other context or screenshots about the feature request here.

**Potential internship candidates**
Please read this if you are planning to apply for a Palisadoes Foundation internship https://github.com/PalisadoesFoundation/talawa/issues/359

Please read this if you are planning to apply for a Palisadoes Foundation internship
- https://github.com/PalisadoesFoundation/talawa/issues/359
66 changes: 33 additions & 33 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ name: PR Workflow
on:
pull_request:
branches-ignore:
- 'master'
- "master"

env:
CODECOV_UNIQUE_NAME: CODECOV_UNIQUE_NAME-${{ github.run_id }}-${{ github.run_number }}
Expand All @@ -30,12 +30,12 @@ jobs:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '12.0'
distribution: "zulu" # See 'Supported distributions' for available options
java-version: "12.0"
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
channel: 'stable' # or: 'beta', 'dev' or 'master'
flutter-version: "3.22.3"
channel: "stable" # or: 'beta', 'dev' or 'master'
- name: Set default branch.
run: git remote set-head origin --auto
shell: bash
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Count lines of code in each file
run: chmod +x ./.github/workflows/countline.py
- name: Running count lines
run: ./.github/workflows/countline.py --exclude_directories test/ --exclude_files lib/custom_painters/talawa_logo.dart lib/custom_painters/language_icon.dart lib/custom_painters/whatsapp_logo.dart lib/utils/queries.dart lib/view_model/after_auth_view_models/profile_view_models/profile_page_view_model.dart lib/view_model/pre_auth_view_models/select_organization_view_model.dart lib/views/after_auth_screens/profile/profile_page.dart lib/view_model/main_screen_view_model.dart lib/views/after_auth_screens/events/create_event_page.dart lib/views/after_auth_screens/org_info_screen.dart
run: ./.github/workflows/countline.py --exclude_directories test/ --exclude_files lib/custom_painters/talawa_logo.dart lib/custom_painters/language_icon.dart lib/custom_painters/whatsapp_logo.dart lib/utils/queries.dart lib/view_model/after_auth_view_models/profile_view_models/profile_page_view_model.dart lib/view_model/pre_auth_view_models/select_organization_view_model.dart lib/views/after_auth_screens/profile/profile_page.dart lib/view_model/main_screen_view_model.dart lib/views/after_auth_screens/events/create_event_page.dart lib/views/after_auth_screens/org_info_screen.dart lib/views/after_auth_screens/events/manage_volunteer_group.dart
- name: setup python
uses: actions/setup-python@v5
- name: Check for presence of ignore directives corresponding to custom lints
Expand Down Expand Up @@ -92,21 +92,21 @@ jobs:
echo "Error: Source and Target Branches are the same. Please ensure they are different."
exit 1
# - name: Echo the GitHub environment for troubleshooting
# run: echo "$GITHUB_CONTEXT"
# - name: Echo the GitHub context for troubleshooting
# run: echo "${{ toJSON(github) }}"
# - name: setup python
# uses: actions/setup-python@v5
# - name: Granting permission to documentationcheck.py
# run: chmod +x ./.github/workflows/documentationcheck.py
# - name: execute py script
# # For more information on the GitHub context used for the "--repository" flag used by this script visit:
# # https://docs.github.com/en/actions/learn-github-actions/contexts
# run: |
# git branch
# pip install GitPython
# python ./.github/workflows/documentationcheck.py --repository ${{github.repository}} --merge_branch_name ${{github.ref_name}}
# - name: Echo the GitHub environment for troubleshooting
# run: echo "$GITHUB_CONTEXT"
# - name: Echo the GitHub context for troubleshooting
# run: echo "${{ toJSON(github) }}"
# - name: setup python
# uses: actions/setup-python@v5
# - name: Granting permission to documentationcheck.py
# run: chmod +x ./.github/workflows/documentationcheck.py
# - name: execute py script
# # For more information on the GitHub context used for the "--repository" flag used by this script visit:
# # https://docs.github.com/en/actions/learn-github-actions/contexts
# run: |
# git branch
# pip install GitPython
# python ./.github/workflows/documentationcheck.py --repository ${{github.repository}} --merge_branch_name ${{github.ref_name}}

Flutter-Testing:
name: Testing codebase
Expand All @@ -116,12 +116,12 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '12.0'
distribution: "zulu" # See 'Supported distributions' for available options
java-version: "12.0"
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
channel: 'stable' # or: 'beta', 'dev' or 'master'
flutter-version: "3.22.3"
channel: "stable" # or: 'beta', 'dev' or 'master'
- name: Running pub get to fetch dependencies
run: flutter pub get
- name: Codebase testing
Expand All @@ -132,11 +132,11 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: false
name: '${{env.CODECOV_UNIQUE_NAME}}'
name: "${{env.CODECOV_UNIQUE_NAME}}"
- name: Test acceptable level of code coverage
uses: VeryGoodOpenSource/very_good_coverage@v2
with:
path: './coverage/lcov.info'
path: "./coverage/lcov.info"
min_coverage: 92.0

Android-Build:
Expand All @@ -147,12 +147,12 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '12.0'
distribution: "zulu" # See 'Supported distributions' for available options
java-version: "12.0"
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
channel: 'stable' # or: 'beta', 'dev' or 'master'
flutter-version: "3.22.3"
channel: "stable" # or: 'beta', 'dev' or 'master'
- name: Running pub get to fetch dependencies
run: flutter pub get
- name: Building for android
Expand All @@ -166,8 +166,8 @@ jobs:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
channel: 'stable' # or: 'beta', 'dev' or 'master'
flutter-version: "3.22.3"
channel: "stable" # or: 'beta', 'dev' or 'master'
architecture: x64
- name: Building for ios
run: flutter build ios --release --no-codesign
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
java-version: '12.0'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
flutter-version: '3.22.3'
channel: 'stable' # or: 'beta', 'dev' or 'master'
- name: Running pub get in talawa_lint
run: cd talawa_lint && flutter pub get && cd ..
Expand Down Expand Up @@ -84,11 +84,11 @@ jobs:
java-version: '12.0'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
flutter-version: '3.22.3'
channel: 'stable'
- uses: dart-lang/setup-dart@v1
with:
sdk: '3.3.0'
sdk: '3.4.4'
- run: |
cd talawa_lint && flutter pub get && cd ..
flutter pub get
Expand Down Expand Up @@ -168,7 +168,7 @@ jobs:
java-version: '12.0'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
flutter-version: '3.22.3'
channel: 'stable' # or: 'beta', 'dev' or 'master'
- name: Running pub get in talawa_lint
run: cd talawa_lint && flutter pub get && cd ..
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
java-version: '12.0'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
flutter-version: '3.22.3'
channel: 'stable' # or: 'beta', 'dev' or 'master'
- name: Running pub get in talawa_lint
run: cd talawa_lint && flutter pub get && cd ..
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.0'
flutter-version: '3.22.3'
channel: 'stable' # or: 'beta', 'dev' or 'master'
architecture: x64
- name: Building for ios
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ If you are new to contributing to open source, please read the Open Source Guide
* [Internships](#internships)
* [Community](#community)

## Videos

1. Visit our [YouTube Channel playlists](https://www.youtube.com/@PalisadoesOrganization/playlists) for more insights
1. The "[Getting Started - Developers](https://www.youtube.com/watch?v=YpBUoHxEeyg&list=PLv50qHwThlJUIzscg9a80a9-HmAlmUdCF&index=1)" videos are extremely helpful for new open source contributors.

## Code of Conduct

A safe environment is required for everyone to contribute. Read our [Code of Conduct Guide](CODE_OF_CONDUCT.md) to understand what this means. Let us know immediately if you have unacceptable experiences in this area.

No one should fear voicing their opinion. Respones must be respectful to help them.

## Videos

1. Visit our [YouTube Channel playlists](https://www.youtube.com/@PalisadoesOrganization/playlists) for more insights
1. The "[Getting Started - Developers](https://www.youtube.com/watch?v=YpBUoHxEeyg&list=PLv50qHwThlJUIzscg9a80a9-HmAlmUdCF&index=1)" videos are extremely helpful for new open source contributors.

## Ways to Contribute

If you are ready to start contributing code right away, get ready!
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ Core features include:
# Videos

1. Visit our [YouTube Channel playlists](https://www.youtube.com/@PalisadoesOrganization/playlists) for more insights
1. The "[Getting Started - Developers](https://www.youtube.com/watch?v=YpBUoHxEeyg&list=PLv50qHwThlJUIzscg9a80a9-HmAlmUdCF&index=1)" videos are extremely helpful for new open source contributors.
1. The "Getting Started - Developers" videos are extremely helpful for new open source contributors.

84 changes: 84 additions & 0 deletions lib/constants/app_strings.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/// Talawa Custom error strings.
class TalawaErrors {
/// GraphQL error for handling: User not found.
static const String userNotFound = 'User not found';

/// GraphQL error for handling: User is not authenticated.
static const String userNotAuthenticated = 'User is not authenticated';

/// GraphQL error for handling: Email address already exists.
static const String emailAccountPresent = 'Email address already exists';

/// GraphQL error for handling: Invalid credentials.
static const String wrongCredentials = 'Invalid credentials';

/// GraphQL error for handling: Organization not found.
static const String organizationNotFound = 'Organization not found';

/// GraphQL error for handling: Access Token has expired. Please refresh session.
static const String refreshAccessTokenExpiredException =
'Access Token has expired. Please refresh session.';

/// GraphQL error for handling: Membership Request already exists.
static const String memberRequestExist = 'Membership Request already exists';

/// GraphQL error for handling: Failed to determine project ID.
static const String failedToDetermineProject =
'Failed to determine project ID: Error while making request: getaddrinfo ENOTFOUND metadata.google.internal. Error code: ENOTFOUND';

/// Error for creating a post.
static const String postCreationFailed =
'You are offline. Failed to create post. Please try again.';

/// Error for updating a post.
static const String postUpdateFailed =
'You are offline. Failed to update post. Please try again.';

/// Error for deleting a post.
static const String postDeletionFailed =
'You are offline. Failed to delete post. Please try again.';

/// Error for creating an event.
static const String eventCreationFailed =
'You are offline. Failed to create event. Please try again.';

/// Error for updating an event.
static const String eventUpdateFailed =
'You are offline. Failed to update event. Please try again.';

/// Error for deleting an event.
static const String eventDeletionFailed =
'You are offline. Failed to delete event. Please try again.';

/// Error for sending a chat message.
static const String chatMessageSendFailed =
'You are offline. Failed to send chat message. Please try again.';

/// Error for deleting a chat message.
static const String chatMessageDeletionFailed =
'You are offline. Failed to delete chat message. Please try again.';

/// Error for updating user profile.
static const String userProfileUpdateFailed =
'You are offline. Failed to update user profile. Please try again.';

/// Error for deleting user profile.
static const String userProfileDeletionFailed =
'You are offline. Failed to delete user profile. Please try again.';

/// Error for saving user action.
static const String userActionNotSaved =
'You are offline. User action not saved.';

/// Error for login attempt when offline.
static const String youAreOfflineUnableToLogin =
'You are offline, unable to login, please try again later.';

/// Error for logout attempt when offline.
static const String youAreOfflineUnableToLogout =
'You are offline, unable to logout, please try again later.';

/// Error for signup attempt when offline.
static const String youAreOfflineUnableToSignUp =
'You are offline, unable to sign up, please try again later.';
}
47 changes: 43 additions & 4 deletions lib/constants/constants.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
// ignore_for_file: talawa_api_doc
// ignore_for_file: talawa_good_doc_comments

import 'package:talawa/models/language/language_model.dart';

/// This file contains the prototypes of all the languages available and supported currencies.
/// This file contains the prototypes of all the supported languages and currencies used in the application.
///
/// A list of [Language] objects representing the languages supported by the application.
///
/// Each [Language] object contains the following properties:
/// * `countryCode`: The country code associated with the language.
/// * `langCode`: The language code representing the language.
/// * `langName`: The name of the language in its native script.
/// * `langSample`: A sample text phrase in the language, used for display purposes.
List<Language> languages = [
Language(
countryCode: 'US',
Expand Down Expand Up @@ -55,6 +60,10 @@ List<Language> languages = [
),
];

/// A list of supported currency codes used in the application.
///
/// Each currency code is represented as a string in the list. This list is used to ensure that the application
/// supports various currencies for transactions, conversions, or displays.
List<String> supportedCurrencies = [
'AED',
'ALL',
Expand Down Expand Up @@ -150,3 +159,33 @@ List<String> supportedCurrencies = [
'YER',
'ZAR',
];

/// A class containing static constants representing the keys used to identify Hive boxes in the application.
///
/// These keys are used to open or access specific Hive boxes, which store various types of data such as user information,
/// organization details, and cached actions.
class HiveKeys {
/// The key used to identify the Hive box that stores the current user information.
static const userBoxKey = 'currentUser';

/// The key used to identify the Hive box that stores the current organization's information.
static const orgBoxKey = 'currentOrg';

/// The key used to identify the Hive box that stores asymmetric keys for the user.
static const asymetricKeyBoxKey = 'user_keys';

/// The key used to identify the Hive box that stores plugin-related data.
static const pluginBoxKey = 'pluginBox';

/// The key used to identify the Hive box that stores URLs.
static const urlBoxKey = 'url';

/// The key used to identify the Hive box that stores the post feed data.
static const postFeedKey = 'post_feed_key';

/// The key used to identify the Hive box that stores the event feed data.
static const eventFeedKey = 'event_feed_key';

/// The key used to identify the Hive box that stores the offline action queue.
static const offlineActionQueueKey = 'offline_action_queue';
}
6 changes: 6 additions & 0 deletions lib/constants/routing_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,10 @@ class Routes {

/// static variable to access org info screen.
static const String orgInfoScreen = '/OrganisationInfoScreen';

///static variable to access volunteer groups screen.
static const String volunteerGroupScreen = '/volunteerScreen';

///static variable to access Manage volunteer group screen.
static const String manageVolunteerGroup = '/manageVolunteerScreen';
}
Loading

0 comments on commit b6b186f

Please sign in to comment.