Skip to content

Commit

Permalink
🔖Release 0.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
EhsanBitaraf committed Oct 16, 2023
1 parent 5c5c3f6 commit a85390f
Show file tree
Hide file tree
Showing 64 changed files with 1,347 additions and 925 deletions.
1 change: 1 addition & 0 deletions .github/workflows/python-flake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
pip install flake8
- name: Lint with flake8
run: |
flake8 ./triplea/ --count --no-show-source --statistics
flake8 ./triplea/ --count --exit-zero --max-complexity=20 --max-line-length=90 --no-show-source --statistics
- name: Fail if there are linting errors
if: ${{ failure() }}
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Changelog
All notable changes to this project will be documented in this file.


## v0.0.4 2023-10-14
### Improvements
- Add FlagAffiliationMining_TITIPATA from Api
- Add ParseMethod field in Affiliation


### Bug Fixes
- Fix GitHub Action `pyhton-flake`


## v0.0.3 - 2023-09-27
### Improvements
- Add micro version
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ https://badge.fury.io/for/py/Triple-a -->
- Dynamic citations deep definition for meta data fetch
- Network Analysis (Per Node/Overall Graph)
- Import bibliography file
- Use for [Bibliometric Analysis](https://researchguides.uic.edu/bibliometrics)



# How to use

## Setup
Expand Down Expand Up @@ -268,8 +272,8 @@ List of Custom Pipeline
|------|--------|-----------|
|Triple extraction from article abstract|FlagExtractKG||
|Topic extraction from article abstract|FlagExtractTopic||
|Convert Affiliation text to structural data|FlagAffiliationMining| |

|Convert Affiliation text to structural data|FlagAffiliationMining|This is simple way for parse Affiliation text |
|Convert Affiliation text to structural data|FlagAffiliationMining_Titipata|use [Titipat Achakulvisut Repo](https://github.com/titipata/affiliation_parser) for parsing Affiliation text|

#### NER Article Title
You can try the NER method to extract the major topic of the article's title by using the following command. This command is independent and is used for testing and is not stored in the Arepo.
Expand Down
200 changes: 198 additions & 2 deletions docs/code-quality.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Flake8 Rules

https://www.flake8rules.com/

Sample command:
## Sample command:

```
flake8 --show-source .\triplea\cli\main.py
Expand Down Expand Up @@ -158,4 +158,200 @@ flake8 --config=.flake8 --output-file out-flake8.txt .\triplea\cli\

```
black .\triplea\cli\
```
```


## History

### All

```sh
flake8 --config=.flake8 --count --output-file out-flake8.txt .\triplea\ --no-show-source --statistics
```


2023-10-15
```
4 C901 'export_rayyan_csv' is too complex (21)
24 E116 unexpected indentation (comment)
6 E117 over-indented
3 E122 continuation line missing indentation or outdented
3 E125 continuation line with same indent as next logical line
14 E127 continuation line over-indented for visual indent
8 E128 continuation line under-indented for visual indent
1 E131 continuation line unaligned for hanging indent
17 E201 whitespace after '('
14 E202 whitespace before ')'
38 E203 whitespace before ':'
1 E211 whitespace before '('
6 E221 multiple spaces before operator
7 E222 multiple spaces after operator
24 E225 missing whitespace around operator
43 E231 missing whitespace after ','
4 E251 unexpected spaces around keyword / parameter equals
4 E252 missing whitespace around parameter equals
15 E261 at least two spaces before inline comment
5 E262 inline comment should start with '# '
24 E265 block comment should start with '# '
1 E271 multiple spaces after keyword
1 E301 expected 1 blank line, found 0
32 E302 expected 2 blank lines, found 1
84 E303 too many blank lines (3)
1 E402 module level import not at top of file
143 E501 line too long (112 > 90 characters)
1 E711 comparison to None should be 'if cond is None:'
4 E712 comparison to False should be 'if cond is False:' or 'if not cond:'
11 E722 do not use bare 'except'
1 E741 ambiguous variable name 'l'
78 F401 'json' imported but unused
1 F821 undefined name 'topics'
29 F841 local variable 'output_data' is assigned to but never used
63 W291 trailing whitespace
13 W292 no newline at end of file
84 W293 blank line contains whitespace
11 W391 blank line at end of file
```

select
```sh
flake8 --config=.flake8 --count --output-file out-flake8.txt .\triplea\ --no-show-source --statistics --select E501
```

ignore
```sh
flake8 --config=.flake8 --count --output-file out-flake8.txt .\triplea\ --no-show-source --statistics --ignore E501,W503,E722
```


```sh
black .\triplea\the_private_backyard.py

black .\triplea\the_private_backyard1.py

black .\triplea\the_private_backyard2.py

black .\triplea\the_private_backyard3.py

black .\triplea\the_private_backyard3.py

black .\triplea\the_private_backyard_mongodb.py

```

2023-10-16
```
4 C901 'export_rayyan_csv' is too complex (21)
1 E303 too many blank lines (3)
82 E501 line too long (110 > 90 characters)
10 E722 do not use bare 'except'
1 E741 ambiguous variable name 'l'
1 F821 undefined name 'topics'
5 F841 local variable 'city' is assigned to but never used
104
```
104

### cli

```sh
black .\triplea\cli\
```

```sh
flake8 --config=.flake8 --output-file out-flake8.txt .\triplea\cli\ --no-show-source --statistics
```

0

### client

```sh
black .\triplea\client\
```

```sh
flake8 --config=.flake8 --output-file out-flake8.txt .\triplea\client\ --no-show-source --statistics
```

0

### config


```sh
black .\triplea\config\
```

```sh
flake8 --config=.flake8 --output-file out-flake8.txt .\triplea\config\ --no-show-source --statistics
```

0

### db

```sh
black .\triplea\db\
```

```sh
flake8 --config=.flake8 --output-file out-flake8.txt .\triplea\db\ --no-show-source --statistics
```
0


### schemas


```sh
black .\triplea\schemas\
```

```sh
flake8 --config=.flake8 --output-file out-flake8.txt .\triplea\schemas\ --no-show-source --statistics
```

0

### service

```sh
black .\triplea\service\
```

```sh
flake8 --config=.flake8 --count --output-file out-flake8.txt .\triplea\service\ --no-show-source --statistics --ignore E501,W503,E722

flake8 --config=.flake8 --count --output-file out-flake8.txt .\triplea\service\ --no-show-source --statistics

```

510
137
113

```
4 C901 'export_rayyan_csv' is too complex (21)
1 E303 too many blank lines (3)
1 E402 module level import not at top of file
82 E501 line too long (110 > 90 characters)
2 E712 comparison to False should be 'if cond is False:' or 'if not cond:'
10 E722 do not use bare 'except'
1 E741 ambiguous variable name 'l'
5 F401 'networkx.classes.function.is_directed' imported but unused
1 F821 undefined name 'topics'
6 F841 local variable 'elapsed' is assigned to but never used
```

### utils


```sh
black .\triplea\utils\
```

```sh
flake8 --config=.flake8 --output-file out-flake8.txt .\triplea\utils\ --no-show-source --statistics
```

0
20 changes: 20 additions & 0 deletions docs/related-work.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,26 @@ https://pubmed.ncbi.nlm.nih.gov/30678631/

https://github.com/NeuroMorphoOrg/PaperBot

## Paperfetcher
Paperfetcher: A tool to automate handsearching and citation searching for systematic reviews

https://onlinelibrary.wiley.com/doi/epdf/10.1002/jrsm.1604

https://paperfetcher.github.io/

https://github.com/paperfetcher/paperfetcher-web-app

https://github.com/paperfetcher/paperfetcher


## paperscraper
![Awesome Badges](https://img.shields.io/badge/badges-awesome-green.svg)
Tools to scrape publication metadata from pubmed, arxiv, medrxiv and chemrxiv.

Since v0.2.4 paperscraper also supports scraping PDF files directly! Thanks to @daenuprobst for suggestions!

https://github.com/PhosphorylatedRabbits/paperscraper

## bibliometrix: An R-tool for comprehensive science mapping analysis

https://www.sciencedirect.com/science/article/abs/pii/S1751157717300500
Expand Down
46 changes: 0 additions & 46 deletions out-flake8.txt
Original file line number Diff line number Diff line change
@@ -1,46 +0,0 @@
.\triplea\cli\export_graph.py:121: [E127] continuation line over-indented for visual indent
1 E127 continuation line over-indented for visual indent
.\triplea\cli\export_graph.py:121: [E127] continuation line over-indented for visual indent
"graphjson",
^
1 E127 continuation line over-indented for visual indent
.\triplea\cli\export_graph.py:121: [E128] continuation line under-indented for visual indent
"graphjson",
^
.\triplea\cli\export_graph.py:122: [E128] continuation line under-indented for visual indent
"gson",
^
.\triplea\cli\export_graph.py:123: [E128] continuation line under-indented for visual indent
"gpickle",
^
.\triplea\cli\export_graph.py:124: [E128] continuation line under-indented for visual indent
"graphml",
^
.\triplea\cli\export_graph.py:125: [E128] continuation line under-indented for visual indent
"gexf"]),
^
5 E128 continuation line under-indented for visual indent
.\triplea\cli\export_graph.py:121: [E127] continuation line over-indented for visual indent
"graphjson",
^
1 E127 continuation line over-indented for visual indent
.\triplea\cli\export_graph.py:121: [E128] continuation line under-indented for visual indent
"graphjson",
^
.\triplea\cli\export_graph.py:122: [E128] continuation line under-indented for visual indent
"gson",
^
.\triplea\cli\export_graph.py:123: [E128] continuation line under-indented for visual indent
"gpickle",
^
.\triplea\cli\export_graph.py:124: [E128] continuation line under-indented for visual indent
"graphml",
^
.\triplea\cli\export_graph.py:125: [E128] continuation line under-indented for visual indent
"gexf"]),
^
5 E128 continuation line under-indented for visual indent
.\triplea\cli\export_graph.py:123: [E127] continuation line over-indented for visual indent
"gpickle",
^
1 E127 continuation line over-indented for visual indent
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "triplea"
version = "0.0.3"
version = "0.0.4"
license = "Apache-2.0"
description = "Article Analysis Assistant"
authors = ["Ehsan Bitaraf <bitaraf.e@iums.ac.ir>", "Maryam Jafarpour <maryam.jafarpoor@gmail.com>"]
Expand Down
2 changes: 1 addition & 1 deletion triplea/cli/aaa.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from triplea.cli.export_graph import export_graph # exportgraph # noqa: F401
from triplea.cli.export import export # export # noqa: F401
from triplea.cli.export_pretrain_llm import export_llm # exportllm # noqa: F401
from triplea.cli.export_article import cli_export_article # export_article # noqa: F401
from triplea.cli.export_article import cli_export_article # export_article # noqa: F401
from triplea.cli.visualize import visualize # visualize # noqa: F401
from triplea.cli.visualize import visualize_file # visualize_file # noqa: F401
from triplea.cli.analysis import analysis # analysis # noqa: F401
Expand Down
24 changes: 16 additions & 8 deletions triplea/cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,27 @@ def configuration(command):
f"""AAA_MONGODB_CONNECTION_URL=
{AAA_MONGODB_CONNECTION_URL} \n"""
)
file.writelines(f"""AAA_MONGODB_DB_NAME=
{AAA_MONGODB_DB_NAME} \n""")
file.writelines(
f"""AAA_MONGODB_DB_NAME=
{AAA_MONGODB_DB_NAME} \n"""
)
elif TRIPLEA_DB_TYPE == "TinyDB":
file.writelines(f"""AAA_TINYDB_FILENAME=
{AAA_TINYDB_FILENAME} \n""")
file.writelines(
f"""AAA_TINYDB_FILENAME=
{AAA_TINYDB_FILENAME} \n"""
)

file.writelines(f"AAA_TPS_LIMIT={AAA_TPS_LIMIT} \n")
file.writelines(f"AAA_PROXY_HTTP={AAA_PROXY_HTTP} \n")
file.writelines(f"AAA_PROXY_HTTPS={AAA_PROXY_HTTPS} \n")
file.writelines(f"""AAA_REFF_CRAWLER_DEEP=
{AAA_REFF_CRAWLER_DEEP} \n""")
file.writelines(f"""AAA_CITED_CRAWLER_DEEP=
{AAA_CITED_CRAWLER_DEEP} \n""")
file.writelines(
f"""AAA_REFF_CRAWLER_DEEP=
{AAA_REFF_CRAWLER_DEEP} \n"""
)
file.writelines(
f"""AAA_CITED_CRAWLER_DEEP=
{AAA_CITED_CRAWLER_DEEP} \n"""
)

else:
raise NotImplementedError
Loading

0 comments on commit a85390f

Please sign in to comment.