Skip to content

Commit

Permalink
GSoC-Develop Merge (#904)
Browse files Browse the repository at this point in the history
* Added mdoel to the locator and debugging

* Flutter Format

* Fixing travis tests

* Add FutureBuilder Logic To Main.dart

* logic correction

* setted MVVM structure

* Attached viewModel

* reduced lines

* refactored and completed local device test.

* updated tests

* Add news_article+page_view_model.dart

* Implements the ViewModel

* ptch: Updated the Test

* ptch: flutter linting

* logic correction

* minor error fixing after merge conflict

* minor error fixing after merge conflict

* minor error fixing after merge conflict

* Flutter format

* Fixing errors

* Updated Tests

* ptch: Adding Comment Bug Fix

* ptch: flutter linitng

* ptch: test update

* Fixed code formatting

* bfix: fixes comment count not updating on newsfeed

* ptch: Change in Loader

* ptch: Change in Loader

* ptch: added default parameter in Loader

* logic correction

* upstream fetch

* Flutter format .

* conflict

* Url controller

* url page controller addn

* controller registration

* Unused files removal

* Adding test

* conflict resoved

* fixing tests

* Fixed errors

* Flutter format .

* Flutter Format

* Merge remote-tracking branch 'upstream/master' into newPagination

* flutter format .

* flutter format

* flutter format .

* Fixes #793

* flutter format .

* fixed changes

* flutter format

* Merge remote-tracking branch 'upstream/master' into provider-add

* flutter format .

* fixed formatting

* Fixed formatting

* Merge remote-tracking branch 'upstream/master' into provider-add

* Merge remote-tracking branch 'upstream/master' into provider-add

* Fixed travis build fail

* chore: fixes linting issue

* events update

* ptch: Flutter lint

* ptch: Replace the Column with Listview in Loader.dart

* controlller add

* flutter format .

* Image Handler

* Image Ui and Controller Connection

* Test Updates

* uniformisation

* Code style prttification

* app localization and language controller addition

* language

* logic correction with generalised approach rather than specific case-wise approach

* change of a minor error in pull-request.yml

* addition of justified docstrings and methodogy

* correction of a specific case in group_controller.dart's formatting

* increasing the legibility of the code

* removed usused import from post_cotroller.dart for resubmitting for the build

* Fix : Not able to close pop up in Join Organization Screen #815

Bug was caused due to Page context was used in close button instated new context of builder.

Fix:
Refactor : ctx -> dialogContext
Change : context -> dialogContext (line 142)

* undoing the change in pubspec.yaml for travis CI build

* Splash Screen Added

* travis ci fix

* fix

* http ^0.12.0+4

* fix

* dependency overide

* dependency overide

* dependency change

* compatible packages

* adding crypto 2.1.3

* crypto: 3.0.1

* To rerun travis ci

* Done : code formatting

* Red screen error resolved from the update profile page(Issue #824)

* [Fix] RenderFlex overflow in Member details Screen

* Merge branch 'functionality-to-crop-picture' of https://github.com/afaanshariff/talawa into functionality-to-crop-picture

* resolved merge conflicts

* resolved exceptions in image_service.dart

* resolved exceptions in image_service.dart

* Organisation setting bug fix

- Fixes bug #833
- Code reformatting of profile_page_viewModel.dart and profile_page.dart

* Updated CONTRIBUTING.md with new Branching Strategy

* Removed gitflow from CONTRIBUTING.md

* Fixed typo in CONTRIBUTING.md

* User will not able to delete others event

fix #832

* Simplification of LeaveOrg and OrgSetting Button

* Using snake case in file names

- Flutter SDK was showing Warning as the Camel case was used in the file names so the file was renamed as snake case.

* Organisations directory file size reduction

- dart file size reduction (under 300 lines) of files under  "lib/views/pages/organization" directory
- Code refactored and reformatted

* Users can't see an option to delete if they are not allowed

* Fixes #840

* Fixes #840

* Minor change : Ternary operators removed

* event_dialog file size reduction

- Widgets common between add_event_dialog.dart and edit_event_dialog.dart have been separated into file event_widgets.dart
- Data is passed as parameter
- Register form also reformatted

* Organization names are displayed in sorted order.

* File size reduction set_url_page.dart

* Reformatted

- Reformatted with flutter format
- URL Page Animation extracted and moved to other file

* Update register_form_test.dart

* Added linting,actions and other repo related files

* Preauth screens with applogo native,flutter splash screens

* Fonts added - refactor

* Add HomePage

* Add widget test for homepage

* update line limit to 400 in countline.py

* HomePage starter UI

* Updated the tests

* Updated GitHub workflow to exclude 'lib/custom_painters/talawa_logo.dart'. Fixes #856

* Updated GitHub workflow to exclude 'lib/custom_painters/talawa_logo.dart'. Fixes #856

* Updated GitHub workflow to exclude 'lib/custom_painters/talawa_logo.dart'. Fixes #856

* Add themeclass for light and dark theme

* Refractor textstyles

* Delete textstyles.dart

* Update pull_request_template.md

* [GSoC] - Code re-write and migration (#863)

* Validators,Plugins,File structuring,Test fail fix and joinorg,waiting pages

* Updated the workflow for minimum coverage, will we reverted back soon

* [Gsoc ] Added UI and implemented MVVM started on OrganizationFeedPage (#864)

* Added CustomCarousel

* Added models

* Removing linting problems

* Fixed errors except sort dependency

* Completed - demo data and models implemented MVVM

* Removed problems

* [GSoC] Deeplinking in application for invitation links, renaming according to lint (#866)

* Validators,Plugins,File structuring,Test fail fix and joinorg,waiting pages

* Updated the workflow for minimum coverage, will we reverted back soon

* Deeplinking for invitation links completed

* [Gsoc] Added Individual Post Page , Pinned post Page  (#867)

* Added CustomCarousel

* Added models

* Removing linting problems

* Fixed errors except sort dependency

* Completed - demo data and models implemented MVVM

* Removed problems

* Finished Pinned Post Page and Individual Post Page

* [GSoC] - Pre-auth view_models and model implementation, refactor needed (#868)

* Validators,Plugins,File structuring,Test fail fix and joinorg,waiting pages

* Updated the workflow for minimum coverage, will we reverted back soon

* Deeplinking for invitation links completed

* Pre-auth view_models and model implementation, refactor needed

* [GSoC] Added UI with basic implementation of MVVM started for Explore Events Screen (#870)

* add explore events page with mvvm

* modify tests

* add eventInfo Page and createEvent Page (#874)

* [GSoC] - Pre-auth new navigation flow completion with server linking (#878)

* Validators,Plugins,File structuring,Test fail fix and joinorg,waiting pages

* Updated the workflow for minimum coverage, will we reverted back soon

* Deeplinking for invitation links completed

* Pre-auth view_models and model implementation, refactor needed

* Minor route fixes

* [GSoC] - Test Fix, invite link deprecation fix (#880)

* Model refactoring and invite link fix

* # This is a combination of 2 commits.
# This is the 1st commit message:

fix test failure

# This is the commit message #2:

Added flutter analyser

* [GSoC] homeview UI refractoring and adding drawer UI (#881)

* fixed generated plugin error

* Refactored UI for dark mode

* Added drawer UI

* Added Drawer UI

* [GSoC] Created "Add post page" UI (#884)

* fixed generated plugin error

* Created Add Post Page UI

* Updated Home page test

* [GSoC] - Organisation Switching from drawer (#885)

* Added flutter analyzer

* Switiching org from drawer and minor bug fixes

* Added test for splash screen

* [GSoC] Add Profile and Edit Profile screens with MVVM (#886)

* add profile and edit profile screen

* delete home_page.dart and fix profile textfield

* [GSoC] - Update the UserConfig to get realtime updates (#887)

* fixed generated plugin error

* Used subscriptions to get realtime UI updates.

* Updated tests

* Refactored to work with stream data (#888)

* fixed generated plugin error

* Used subscriptions to get realtime UI updates.

* Updated tests

* refactored to work with the stream data

* Fixed travis build error

* Analyzer fixes

* [GSoC] - Refactoring, common alert popup & test (#889)

* Refactoring, common alert popup & test'

* talawa analysis point increment

* [GSoC] - Connected Post Service with backend and switch organization service (#890)

* fixed generated plugin error

* Used subscriptions to get realtime UI updates.

* Updated tests

* refactored to work with the stream data

* Fixed travis build error

* Analyzer fixes

* Inital code for post service

* Added Stream setup for posts

* Integrated post service and preserved page state

* Fixing the analyzer

* Tests updates

* Refactoring and join org page after auth (#891)

* [GSoC] - Mockito testing setup with the services || Service Stream Refactoring (#893)

* fixed generated plugin error

* Used subscriptions to get realtime UI updates.

* Updated tests

* refactored to work with the stream data

* Fixed travis build error

* Analyzer fixes

* Inital code for post service

* Added Stream setup for posts

* Integrated post service and preserved page state

* Fixing the analyzer

* Tests updates

* Refactored Services & added Local cache "LIKE" fun

* Finished mocking the services using Mockito

* Fixing the travis build failure

* [GSoC] Connect explore events and create events with the backend (#894)

* connect explore events with backend

* add create event functionality

* Fix failing tests

* [GSoC] - Refactoring in functions class, use of global model for post (#895)

* Refactoring in functions class, use of global model for post

* Merge conflicts fix

* [GSoC] Add validation for create_event_form.dart and refractor. (#896)

* fix events not displaying issue

* Remove unused imports

* Updated connectivity_plus plugin (#899)

* GSoC - Adding / Removing || Adding comment (#903)

* fixed generated plugin error

* Added like functionality

* Added Removing like feature

* Added comment feature without single source  truth

* Added comment features and Updated test.

Co-authored-by: rutvik11062000 <[email protected]>

* GSoC branch lang controller addition (#897)

* language controller and befor auth language addition

* Pubspec update

* test changes

* test updates

* Updates

* test updated

* language updates

* selection test case updated

* Final Updates

* viewmodel update

* Test file updates

* Flutter code analyze update

Co-authored-by: rutvik11062000 <[email protected]>
Co-authored-by: Shreyash Lata <[email protected]>
Co-authored-by: Astha Nayak <[email protected]>
Co-authored-by: StrangeNoob <[email protected]>
Co-authored-by: raunak_k02 <[email protected]>
Co-authored-by: Sagar Utekar <[email protected]>
Co-authored-by: Peter Harrison <[email protected]>
Co-authored-by: afaanshariff <[email protected]>
Co-authored-by: AFFAN SHARIFF <[email protected]>
Co-authored-by: ahluwaliatikant <[email protected]>
Co-authored-by: Aditya Birangal <[email protected]>
Co-authored-by: Muskan Modi <[email protected]>
Co-authored-by: Muskan Modi <[email protected]>
Co-authored-by: Troy Anderson <[email protected]>
Co-authored-by: Aman Anand <[email protected]>
Co-authored-by: DangaRanga <[email protected]>
Co-authored-by: Piyush Goel <[email protected]>
Co-authored-by: CyberWake <[email protected]>
Co-authored-by: Utkarsh S <[email protected]>
Co-authored-by: Rutvik Chandla <[email protected]>
Co-authored-by: CyberWake <[email protected]>
Co-authored-by: rutvik11062000 <[email protected]>
  • Loading branch information
23 people authored Jun 29, 2021
1 parent 92b173c commit 384d69f
Show file tree
Hide file tree
Showing 201 changed files with 15,094 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: [palisadoes]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: PalisadoesFoundation/talawa
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve.
title: Bug report
labels: Bug
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1.
2.
3.
4.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Actual behavior**
A clear and concise description of how the code performed w.r.t expectations.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional details**
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an idea for this project
title: Feature request
labels: Feature
assignees: ""
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Approach to be followed (optional)**
A clear and concise description of approach to be followed.

**Additional context**
Add any other context or screenshots about the feature request here.
8 changes: 8 additions & 0 deletions .github/PR_TEMPLATE/pr-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- **What kind of change does this PR introduce:** <Add brief description about what problem you are solving.>
- **Issue Number:** <Add related issue number here.>
- **Did you add tests for your code?** <Yes or No. Note: Add unit tests or automation tests for your code.>
- **Snapshots/Videos:** <Add snapshots or videos wherever possible.>
- **Does this PR introduce a breaking change?** <Make sure this change does not break existing code functionality.>
- **Other information:** <Add extra information about this PR here>
- **Have you read the [contributing guide](https://github.com/PalisadoesFoundation/talawa/blob/master/CONTRIBUTING.md)?** <Yes or No>

51 changes: 51 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!--
This section can be deleted after reading.
We employ the following branching strategy to simplify the development process and to ensure that only stable code is pushed to the `master` branch:
- `develop`: For unstable code: New features and bug fixes.
- `alpha-x.x.x`: For stability testing: Only bug fixes accepted.
- `master`: Where the stable production ready code lies. Only security related bugs.
-->

<!--
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request.
-->

**What kind of change does this PR introduce?**

<!-- E.g. a bugfix, feature, refactoring, etc… -->

**Issue Number:**

Fixes #<!--Add related issue number here.-->

**Did you add tests for your changes?**

<!--Yes or No. Note: Add unit tests or automation tests for your code.-->

**Snapshots/Videos:**

<!--Add snapshots or videos wherever possible.-->

**If relevant, did you update the documentation?**

<!--Add link to Talawa-Docs.-->

**Summary**

<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
<!-- Try to link to an open issue for more information. -->

**Does this PR introduce a breaking change?**

<!-- If this PR introduces a breaking change, please describe the impact and a migration path for existing applications. -->

**Other information**

<!--Add extra information about this PR here-->

**Have you read the [contributing guide](https://github.com/PalisadoesFoundation/talawa/blob/master/CONTRIBUTING.md)?**

<!--Yes or No-->
22 changes: 22 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Talawa GitHub Workflows Guidelines

Here are some contributing guidelines for this directory.

## YAML Files

Follow these guidelines when creating new YAML defined GitHub actions.

1. Place all actions related to issues in the `issues.yml` file.
1. Place all actions related to pull requests in the `pull-requests.yml` file.

## Scripts

Follow these guidelines when creating or modifying scripts in this directory.

1. All scripts in this directory must be written in python3 for consistency.
1. The python3 scripts must follow the following coding standards. Run these commands against your scripts before submitting PRs that modify or create python3 scripts in this directory.
1. Pycodestyle
1. Pydocstyle
1. Pylint
1. Flake8
1. All scripts must run a main() function.
169 changes: 169 additions & 0 deletions .github/workflows/countline.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""Script to encourage more efficient coding practices.
Methodology:
Analyses the `lib` and `test` directories to find files that exceed a
pre-defined number of lines of code.
This script was created to help improve code quality by encouraging
contributors to create reusable code.
NOTE:
This script complies with our python3 coding and documentation standards
and should be used as a reference guide. It complies with:
1) Pylint
2) Pydocstyle
3) Pycodestyle
4) Flake8
Run these commands from the CLI to ensure the code is compliant for all
your pull requests.
"""

# Standard imports
import os
import sys
import argparse


def _excluded_filepaths(excludes):
"""Create a list of full file paths to exclude from the analysis.
Args:
excludes: List of files to exclude
Returns:
result: A list of full file paths
"""
# Initialize key variables
result = []

if bool(excludes) is True:
for filename in excludes:
# Ignore files that appear to be full paths because they start
# with a '/' or whatever the OS uses to distinguish directories
if filename.startswith(os.sep):
result.append(filename)
continue

# Create a file path
filepath = '{}{}{}'.format(os.getcwd(), os.sep, filename)
if os.path.isfile(filepath) is True:
result.append(filepath)
# Return
return result


def _arg_parser_resolver():
"""Resolve the CLI arguments provided by the user.
Args:
None
Returns:
result: Parsed argument object
"""
# Initialize parser and add the CLI options we should expect
parser = argparse.ArgumentParser()
parser.add_argument('--lines', type=int, required=False, default=300,
help='The maximum number of lines of code to accept.')
parser.add_argument('--directory', type=str, required=False,
default=os.getcwd(),
help='The parent directory of files to analyze.')
parser.add_argument('--exclude', type=str, required=False,
nargs='*',
default=None,
const=None,
help='''\
An optional list of files to exclude from the analysis separated by spaces.''')

# Return parser
result = parser.parse_args()
# print(result.exclude)
# sys.exit(0)
return result


def main():
"""Analyze dart files.
This function finds, and prints the files that exceed the CLI
defined defaults.
Args:
None
Returns:
None
"""
# Initialize key variables
lookup = {}
errors_found = False
file_count = 0
excluded_filepaths = []

# Get the CLI arguments
args = _arg_parser_resolver()

# Define the directories of interest
directories = [
os.path.expanduser(os.path.join(args.directory, 'lib')),
os.path.expanduser(os.path.join(args.directory, 'test'))
]

# Get a corrected list of filenames to exclude
excluded_filepaths = _excluded_filepaths(args.exclude)

# Iterate and analyze each directory
for directory in directories:
for root, _, files in os.walk(directory, topdown=False):
for name in files:
# Read each file and count the lines found
filepath = os.path.join(root, name)

# Skip excluded files
if bool(args.exclude) is True:
if filepath in excluded_filepaths:
continue

# Process the rest
with open(filepath) as code:
line_count = sum(
1 for line in code
if line.strip() and not line.startswith('#')
)
lookup[filepath] = line_count

# If the line rule is voilated then the value is changed to 1
for filepath, line_count in lookup.items():
if line_count > args.lines:
errors_found = True
file_count += 1
if file_count == 1:
print('''
LINE COUNT ERROR: Files with excessive lines of code have been found\n''')

print(' Line count: {:>5} File: {}'.format(line_count, filepath))

# Evaluate and exit
if bool(errors_found) is True:
print('''
The {} files listed above have more than {} lines of code.
Please fix this. It is a pre-requisite for pull request approval.
'''.format(file_count, args.lines))
sys.exit(1)
else:
sys.exit(0)


if __name__ == '__main__':
main()
23 changes: 23 additions & 0 deletions .github/workflows/issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Issues Workflow
on:
issues:
types: ['opened']
jobs:
Opened-issue-label:
name: Adding Issue Label
runs-on: ubuntu-latest
steps:
- uses: Renato66/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
ignore-comments: true
default-labels: '["unapproved"]'

Issue-Greeting:
name: Greeting Message to User
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: "Congratulations on making your first Issue! :confetti_ball: If you haven't already, check out our [Contributing Guidelines](https://github.com/PalisadoesFoundation/talawa/blob/master/CONTRIBUTING.md) and [Issue Reporting Guidelines](https://github.com/PalisadoesFoundation/talawa/blob/master/issue-guidelines.md) to ensure that you are following our guidelines for contributing and making issues."
Loading

0 comments on commit 384d69f

Please sign in to comment.