Skip to content
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 code for extraction #8

Merged
merged 79 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
f0d0fad
Citation extractions by Vishal for code review
venvis Feb 8, 2024
7868c30
cellar
venvis Feb 8, 2024
905d223
Updated code for extraction
venvis Feb 27, 2024
36cc239
Updated code
venvis Mar 6, 2024
c42ca98
Update Testing_file.py
venvis Mar 21, 2024
7cb83e4
Delete cellar/cellar_extractor/operative_extraction.py
venvis Mar 21, 2024
d5e1aa3
Add files via upload
venvis Mar 21, 2024
8d754a7
Delete cellar/cellar_extractor/Testing_file.py
venvis Mar 21, 2024
a6fd5b8
Add files via upload
venvis Mar 21, 2024
3664a9c
Added doc string to method extra_cellar
Mar 28, 2024
16af4bb
Added doc string and linted code for cellar_queries file
Mar 28, 2024
4e07a79
Linted code, added encoding for opening files, and removed unused lib…
Mar 28, 2024
5243673
Linted code and moved doc strings under methods rather than above for…
Mar 28, 2024
7db0f6a
Linted code for csv_extractor.py
Mar 28, 2024
2ddf0a6
Linted code, changed conditional statements for PEP8 conformity, and …
Mar 28, 2024
c355d00
Linted code, corrected variable names that are similar to inbuilt ref…
Mar 28, 2024
acd033e
Linted code for json_to_csv file
Mar 28, 2024
f541100
Linted code, changed for loop to use enumerate rather than range and …
Mar 28, 2024
14ffecc
Linted code, changed conditions from != None to is not None for code …
Mar 28, 2024
2886aef
code linting for sparql file
Mar 28, 2024
6ad2cab
Code linting for Testing file
Mar 28, 2024
db86889
Update gitignore file to not consider DS_Store files and venv directo…
Mar 28, 2024
c33835a
Merge branch 'extraction_operative_keywords' into 'cellar'
Mar 28, 2024
b1f24ee
Unittests for operative part
venvis Apr 10, 2024
e88255c
Update operative_extractions.py
venvis Apr 11, 2024
09865ff
Update __init__.py
venvis Apr 11, 2024
0d7c77c
Update tests.py
venvis Apr 11, 2024
01f7d84
Update tests.py
venvis Apr 11, 2024
642dbe3
Delete cellar/cellar_extractor/Testing_file.py
venvis Apr 11, 2024
8db810d
Update operative_extractions.py
venvis Apr 11, 2024
3c32aaa
Update tests.py
venvis Apr 11, 2024
28858a6
Update tests.py
venvis Apr 11, 2024
98ea00c
Update tests.py
venvis Apr 11, 2024
8cae2fa
Update tests.py
venvis Apr 11, 2024
8503d8d
Update tests.py
venvis Apr 11, 2024
87271b8
Update tests.py
venvis Apr 11, 2024
c3daf22
Update tests.py
venvis Apr 11, 2024
428f466
Update tests.py
venvis Apr 11, 2024
b75fe86
Updated variable name from current to current_dir
Apr 17, 2024
2537752
Removed conditional statements and updated assert False statements
Apr 17, 2024
f82a23f
Removed unnecessary colon
Apr 17, 2024
106675f
Removed duplicate __init__ method, reordered import libraries
Apr 17, 2024
0dfd386
Corrected methods being called, extra import from operative_extractions
Apr 17, 2024
55b1178
Changed from enumerate to range and len
Apr 17, 2024
abcd5ef
Updated setup.py file for finding operative_extractions
Apr 17, 2024
25cdcf1
Correcting path to include everything under cellar_extractor in setup…
Apr 17, 2024
cd6e55e
F string changes and url changes for eurex website
venvis Apr 17, 2024
d22849e
Removed import cellar_extractor.operative_extractions
Apr 17, 2024
d89aaec
os module for tests.py
venvis Apr 24, 2024
9aaf2e3
Include json & csv directory for outputs
venvis Apr 24, 2024
e33cc9c
os configuration to include cellar/ for tests.py
venvis Apr 24, 2024
483c419
Update tests.py
shashankmc Apr 24, 2024
f8887d7
Update setup.py
shashankmc Apr 24, 2024
56f7845
Change to len(celex_store)-1 to avoid index out of range error.
shashankmc Apr 24, 2024
19fccdc
Added additional import to test.py file
shashankmc Apr 24, 2024
d57f015
Create __init__.py
venvis May 1, 2024
8045e9c
Shorten imports after adding __init__.py to cellar folder
venvis May 1, 2024
26d305d
Add extra import command
venvis May 1, 2024
5334381
Update tests.py
venvis May 1, 2024
e56d328
Update __init__.py
venvis May 1, 2024
dc9aba3
Update __init__.py
venvis May 1, 2024
1ca331b
Update __init__.py
venvis May 1, 2024
75b2978
Update tests.py
venvis May 1, 2024
e4c7236
Update __init__.py
venvis May 1, 2024
a7455ee
Update tests.py
venvis May 1, 2024
78b7140
add pip install -e
venvis May 1, 2024
8da60dc
Update github-actions.yml
venvis May 1, 2024
25caaf8
Add pip install -e cellar/
venvis May 1, 2024
c7bac51
Update README.md
venvis May 1, 2024
7548054
Update README.md
venvis May 1, 2024
f15870c
Update README.md
venvis May 1, 2024
15b7b04
Update README.md
venvis May 1, 2024
44bf4b8
Update README.md
venvis May 1, 2024
aa09b6f
Update README.md
venvis May 1, 2024
908d5e6
Update README.md
venvis May 1, 2024
3f00adb
Add for Analyzer and Writing Classes
venvis May 1, 2024
c92fbef
Add code for Analyzer class
venvis May 1, 2024
868b14c
Update README.md
venvis May 1, 2024
6368651
Update README.md
venvis May 1, 2024
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
50 changes: 50 additions & 0 deletions cellar/cellar_extractor/Testing_file.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the class methods for operative part actually being called for testing? For the previous tests, methods are called under main ; Not sure what's happening here?

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,56 @@
from eurlex_scraping import *
from cellar import *
from sparql import *
import unittest
from operative_extraction import Analyzer
# from test import testing
import random
import csv
file=open("gijs_202310_node_list.tsv","r")
reader=csv.reader(file)
no_of_test_cases=30
testing=[]
for row in reader:
for rows in row:
if "Id" not in rows:
testing.append(rows.split("\t")[0])
class Test(unittest.TestCase):
"""
class for unittesing operative part , it checks whether the list returns null value or has some value.
"""
ids:list
def __init__(self,ids):
self.ids=ids

def test_for_celex_id(self):
"""
Main function which runs the unittest Testcase .
"""
count_fail:int
count_pass=0
for id in self.ids:
test_output=Analyzer(id)
test_instance=test_output()

# self.assertFalse(len(test_instance)<=1)

try:
self.assertTrue(test_instance[0],f"{id} is not empty and has operative part")
count_pass+=1
print(f"{id} ---> PASSED.")
except:
print(f"{id} ---> FAILED.")
print(f"Passed {count_pass}/{len(self.ids)} times")
# print(len(self.ids)-count,"were passed successfully")

new_list=[]
for w in range(no_of_test_cases):
randomized=random.randint(0,len(testing)-1)
new_list.append(testing[randomized])


instance=Test(new_list)
instance.test_for_celex_id()



Expand Down
Loading
Loading