-
Notifications
You must be signed in to change notification settings - Fork 1
updated us02, us03, us03test #25
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
Open
gracemiguel
wants to merge
16
commits into
master
Choose a base branch
from
gmiguel
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
59741d3
merge
gracemiguel 9a31044
test cases
gracemiguel 5cd6f6b
Delete sprint1.2
gracemiguel 5b4a225
Add files via upload
gracemiguel f07d5b8
Add files via upload
gracemiguel 4d3ebf7
reorganize
gracemiguel 2125553
Merge branch 'gmiguel' of https://github.com/pdamiano-11/Team-4-Code …
gracemiguel fd178d8
Delete us02.py
gracemiguel 20120e8
Delete us03.py
gracemiguel e22d1c8
Delete user03.py
gracemiguel 9436746
Delete Project03_Output.txt
gracemiguel 6fe933c
Merge branch 'master' into gmiguel
gracemiguel be0d29b
Update user03_test.py
gracemiguel d1df0d5
name change
gracemiguel 62fa195
Merge branch 'master' into gmiguel
gracemiguel 964577a
5:54pm
gracemiguel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,31 @@ | ||
| import Project02 | ||
| import user02 | ||
| import pandas as pd | ||
| import sys | ||
| import unittest | ||
| sys.path.append("C:\\Users\\Stevens User\\Documents\\GitHub\\Team-4-Code\\seeds") | ||
| sys.path.append("C:\\Users\\Stevens User\\Documents\\GitHub\\Team-4-Code\\GMiguel") | ||
| sys.path.append("c:\\Users\\Stevens User\\Documents\\GitHub\\Team-4-Code\\src") | ||
| import user02 | ||
|
|
||
|
|
||
| class Testuser02(unittest.TestCase): | ||
| #all marriages after birth | ||
|
|
||
| def test01(self): | ||
| x = "" | ||
| s = "" | ||
| self.assertEquals(s, user02.user02("seeds/test1.ged")) | ||
|
|
||
| def test02(self): | ||
| s = "" | ||
| self.assertEquals(s, user02.user02("seeds/test2.ged")) | ||
|
|
||
| def test03(self): | ||
| s = "" | ||
| self.assertEquals(s, user02.user02("seeds/test3.ged")) | ||
| def test04(self): | ||
| s = "" | ||
| self.assertEquals(s, user02.user02("seeds/test4.ged")) | ||
| def test05(self): | ||
| s = "" | ||
| self.assertEquals(s, user02.user02("seeds/test5.ged")) | ||
|
|
||
| if __name__ == '__main__': | ||
| unittest.main() |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| ''' | ||
| Author: Samantha Inneo | ||
| Sprint: Sprint 1 | ||
| Use Case: Birth dates of siblings should be more than 8 months apart or less than 2 days apart | ||
| (twins may be born one day apart, e.g. 11:59 PM and 12:02 AM the following calendar day) | ||
| ''' | ||
| import sys | ||
| import copy | ||
| sys.path.append("C:\\Users\\Stevens User\\Documents\\GitHub\\Team-4-Code\\src") | ||
| import Project02 | ||
| sys.path.append("C:\\Users\\Stevens User\\Documents\\GitHub\\Team-4-Code\\seeds") | ||
| import pandas as pd | ||
| import datetime | ||
|
|
||
| def siblingsAgeGap(gedcom_name): | ||
| # I need to gather all the siblings of each family | ||
| # check if their birthdays are more than 8 months apart | ||
| # check if their birthdays are less than 2 days apart | ||
| #return true if they are valid, false if they are not | ||
| eight_months = 240 | ||
| two_days = 2 | ||
|
|
||
| individuals = Project02.createIndividualsDataFrame(gedcom_name) | ||
| families = Project02.createFamiliesDataFrame(gedcom_name) | ||
|
|
||
| child = [] | ||
| children = copy.deepcopy(families[["Children"]]) | ||
| indi = copy.deepcopy(individuals[["ID", "Birthday"]]) | ||
| for index, row in children.iterrows(): | ||
| #indiv = copy.deepcopy(individuals[["Name", "Birthday", "Dead"]]) | ||
| if len(row["Children"]) > 1: | ||
| for i in row["Children"]: | ||
| lst = row["Children"] | ||
| for j in lst: | ||
| for k, rows in indi.iterrows(): | ||
| if lst[j] == rows[individuals["ID"]]: | ||
| child.append(rows[individuals["Birthday"]]) | ||
| for m in range(len(child)): | ||
| child2 = child[:m] + child[m:] | ||
| for l in range(len(child2)): | ||
| if ((pd.to_datetime(child[k]) - pd.to_datetime(child2[l])) > two_days) and ((pd.to_datetime(child[k]) - pd.to_datetime(child[l])) < eight_months ): | ||
| print("invalid: sibling birthdays") | ||
|
|
||
|
|
||
| siblingsAgeGap("seeds/seed.ged") | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.