Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fd2cf97
Create plan.md
Durga71 Oct 8, 2020
2576b88
Update plan.md
Durga71 Oct 8, 2020
391bf90
Update plan.md
Durga71 Oct 8, 2020
6682e4e
Update plan.md
Durga71 Oct 8, 2020
4b85c19
Update plan.md
Durga71 Oct 8, 2020
299cba9
Update plan.md
Durga71 Oct 8, 2020
6a74750
Update plan.md
Durga71 Oct 8, 2020
a442c17
Update plan.md
Durga71 Oct 8, 2020
195c55d
Update plan.md
Durga71 Oct 8, 2020
16c145c
Update plan.md
Durga71 Oct 8, 2020
95deeb4
Update plan.md
Durga71 Oct 8, 2020
83dda6d
Update plan.md
Durga71 Oct 8, 2020
d5262e1
git_status feature added
stevemenezes Oct 25, 2020
fb32e0f
gits diff feature added
stevemenezes Oct 25, 2020
49644bf
Update README.md
Durga71 Oct 26, 2020
680b65c
update readme
aadilk97 Oct 26, 2020
480f0a2
MagicMock/parse_args.m/4554289560
stevemenezes Oct 25, 2020
68609af
MagicMock/parse_args.m/4439160704
aadilk97 Oct 26, 2020
d493fa6
gits diff success test
aadilk97 Oct 26, 2020
2608afd
MagicMock/parse_args.m/140329914256496
aadilk97 Oct 26, 2020
5fddd63
MagicMock/parse_args.m/4459526072
aadilk97 Oct 26, 2020
be71226
Code Coverage Added
bhavesh242 Oct 26, 2020
3dc3422
Code Coverage changes for Travis
bhavesh242 Oct 26, 2020
ddc7a4a
Merge pull request #19 from bhavesh242/code_coverage
bhavesh242 Oct 26, 2020
2da8826
MagicMock/parse_args.m/4483061576
aadilk97 Oct 26, 2020
71c7896
Update README.md
bhavesh242 Oct 26, 2020
6377ba5
Update README.md
bhavesh242 Oct 26, 2020
a2c7bc0
Update README.md
bhavesh242 Oct 26, 2020
17437bc
Merge remote-tracking branch 'origin/master' into gits_diff
aadilk97 Oct 26, 2020
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
Binary file added .coverage
Binary file not shown.
24 changes: 17 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
language: python
language:
python
python:
- "3.8" # current default Python on Travis CI
# command to install dependencies
#install:
# - pip install -r requirements.txt
# command to run tests
- "3.5"
install:
- pip install -U pip
- pip install -r requirements.txt
- pip install coverage
- pip install codecov
git:
depth: 50
jobs:
include:
- name: "project-1"
python: "3.8"
script:
- python3 -m pytest
- coverage run -m pytest -q code/
after_success:
- bash <(curl -s https://codecov.io/bash) -t 5c58df4e-d27a-405b-887b-498b8c62abc9
39 changes: 25 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@
### GIT Simplified

![GitHub](https://img.shields.io/github/license/amolgautam25/GITS)
[![Build Status](https://travis-ci.com/amolgautam25/GITS.svg?branch=master)](https://travis-ci.com/amolgautam25/GITS)
[![Build Status](https://travis-ci.com/amolgautam25/GITS.svg?branch=master)](https://travis-ci.com/bhavesh242/GITS)
![GitHub](https://img.shields.io/badge/language-python-blue.svg)
![GitHub](https://img.shields.io/badge/language-shell-orange.svg)
![YouTube Video Views](https://img.shields.io/youtube/views/cMcftHMtIZ4?style=social)

[![DOI](https://zenodo.org/badge/295480790.svg)](https://zenodo.org/badge/latestdoi/295480790)

![GitHub issues](https://img.shields.io/github/issues/amolgautam25/GITS)
![GitHub closed issues](https://img.shields.io/github/issues-closed/amolgautam25/GITS)
![GitHub issues](https://img.shields.io/github/issues/bhavesh242/GITS)
![GitHub closed issues](https://img.shields.io/github/issues-closed/bhavesh242/GITS)

![GitHub pull requests](https://img.shields.io/github/issues-pr/amolgautam25/GITS)
![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/amolgautam25/GITS)
![GitHub pull requests](https://img.shields.io/github/issues-pr/bhavesh242/GITS)
![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/bhavesh242/GITS)

[![](https://img.youtube.com/vi/cMcftHMtIZ4/0.jpg)](https://youtu.be/cMcftHMtIZ4 "GITS demo")


### Supported functionality
Expand Down Expand Up @@ -51,9 +48,23 @@ It is a highly simplified version of git commit command. We are actively working
#### gits create_branch
This automatically checks out a new branch from local master , after pulling all the changes from the remote master to local master. The idea behind this is that this new branch should have all the latest commits before a developer starts working on them.

#### gits all-branch
This command lists all the branches on both local and remote repositories.


#### gits remote-branch
This command lists all the branches on remote repository.


#### gits init
This command initializes the local repository.

#### gits logging
This logs all the commands executed by the user, and also stores the output of each command

#### gits push
This pushes all the local changes of origin to the branch specified.

Note: More functionality are being added to this project. Please refer to the 'issues' tab for more information. In case you want to contribute to this project , please refer to 'Contributing.md' file.


Expand All @@ -68,10 +79,10 @@ This will open up a browser and you can see all the files. You can click on a pa

This repository is made for CSC 510 Software Engineering Course at NC State University.

Group 17 Team Members:
Group 15 Team Members:

Amol Gautam
Sneha Kumar
Sreeraksha Mavinhally Sreekantha
Srujana Rachakonda
Tanay Agarwal
Steve Victor Menezes
Durga Devi Mummadi
Bhavesh Shailesh Agrawal
Nikitha Thotireddy
Aadil Anwar Khan
10 changes: 9 additions & 1 deletion code/gits.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

from gits_profile import gits_set_profile
from gits_pr_update import gits_pr_update_func

from gits_status import gits_status
from gits_diff import gits_diff

logger_status = init_gits_logger()
if not logger_status:
Expand All @@ -41,6 +42,7 @@
help='all file names')
gits_add_subparser.set_defaults(func=gits_add_func)


gits_commit_subparser = subparsers.add_parser('commit')
gits_commit_subparser.add_argument('-m',
required=True,
Expand Down Expand Up @@ -88,6 +90,12 @@
gits_reset_subparser.set_defaults(func=gits_reset)
gits_reset_subparser.add_argument('--branch', required=True, help='branch to be used')

gits_status_subparser=subparsers.add_parser('status')
gits_status_subparser.set_defaults(func=gits_status)

gits_diff_subparser=subparsers.add_parser('diff')
gits_diff_subparser.set_defaults(func=gits_diff)


args = parser.parse_args()
args.func(args)
21 changes: 21 additions & 0 deletions code/gits_diff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import gits_logging
from subprocess import Popen, PIPE

def gits_diff(args):
print("Welcome to git diff")
try:
subprocess_command = list()
subprocess_command.append("git")
subprocess_command.append("diff")
process=Popen(subprocess_command, stdout=PIPE, stderr=PIPE)
stdout,stderr=process.communicate()
stdout=stdout.decode("utf-8")
print(stdout)

except Exception as e:
print("ERROR: gits diff did not run correctly")
print("ERROR: {}".format(str(e)))

return False

return True
21 changes: 21 additions & 0 deletions code/gits_status.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import gits_logging
from subprocess import Popen, PIPE

def gits_status(args):
print("Welcome to gits status")
try:
subprocess_command = list()
subprocess_command.append("git")
subprocess_command.append("status")
process=Popen(subprocess_command, stdout=PIPE, stderr=PIPE)
stdout,stderr=process.communicate()
stdout=stdout.decode("utf-8")

final=stdout.split("\n")
final = list(filter(None, final))
for f in final:
print(f)

except Exception as e:
print("ERROR: gits status did not run correctly")
print("ERROR: {}".format(str(e)))
16 changes: 16 additions & 0 deletions code/test_gits_diff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import argparse
import gits_diff
from mock import patch, Mock


@patch("argparse.ArgumentParser.parse_args",
return_value=argparse.Namespace(m="test_commit", amend=True))
@patch("subprocess.Popen", return_value="anything")

def test_gits_diff(mock_var, mock_args):
"""
Function to test gits_diff, success case
"""

test_result = gits_diff.gits_diff(mock_args)
assert True == test_result, "Normal case"
41 changes: 41 additions & 0 deletions plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## Phase 1
### Supported functionalities
- gits pr_update
- gits profile
- gits rebase
- gits reset
- gits set
- gits upstream
- gits super reset
- gits add
- gits commit
- gits create_branch
- gits logging

The above implemented functionalities are supported only on Linux/Mac operating systems.

## Phase 2
### Tasks:
1. Improvise the documentation to remove ambiguity.
2. Write clear documentation for all the phase 2 functionalities.
3. Write stepwise instructions to setup the environment.
4. Write unit tests for all the GITS commands.
5. Manually test the functionalities on a dummy repository.
6. Provide code coverage solution to the project.
7. Implement functionalities listed in Functionalities section.
8. Deliver a good repository.

### Functionalities:
- gits push
- gits sync
- gits init
- gits status
- gits diff
- gits checkout
- gits branch
- gits unstage

### Deliverables:
1. Good testing setup with unit tests and code coverage.
2. Clear and complete documentation
3. Implementation of new functionalities.