Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Ildar-Daminov committed Mar 31, 2023
2 parents 7eaac7b + 64f94fd commit c68a93b
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 3 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Publish Docs

# on: workflow_dispatch

on:
push:
branches: [ main ]
# pull_request:
# branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "test"
publish:
# The type of runner that the job will run on
strategy:
matrix:
# os: ["ubuntu-latest", "macos-latest"]
os: ["ubuntu-latest"]
# python-version: ["3.7", "3.8", "3.9"]
python-version: ["3.9"]
runs-on: ${{ matrix.os }}

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout project
uses: actions/checkout@v2

#----------------------------------------------
#------- install & configure Python ---------
#----------------------------------------------
- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

#----------------------------------------------
# ----- install & configure poetry ---------
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1

with:
virtualenvs-create: true
virtualenvs-in-project: true
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install main (non-optional) and dev dependencies
# see [tool.poetry.dependencies] and [tool.poetry.dev-dependencies]
# in pyproject.toml
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-root

#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install package
run: |
poetry install
poetry install --extras "docs"
#----------------------------------------------
# Build documentation
#----------------------------------------------
- name: Build doc
run: |
cd docs
poetry run make clean
poetry run make html
#----------------------------------------------
# deploy documentation
#----------------------------------------------
- name: Create .nojekyll file.
run: |
> docs/_build/html/.nojekyll
- name: Deploy documentation to gh-pages branch
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: gh-pages
FOLDER: docs/_build/html
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

## Documentation
[![Publish Docs](https://github.com/Ildar-Daminov/Python_for_literature_review_in_Scopus/actions/workflows/main.yml/badge.svg)](https://github.com/Ildar-Daminov/Python_for_literature_review_in_Scopus/actions/workflows/main.yml)
[![Check Documentation](docs/docs_badge.svg)](https://ildar-daminov.github.io/Python_for_literature_review_in_Scopus/)


![Python_for_literature_review](https://user-images.githubusercontent.com/73365375/208320965-24fe4441-5ca9-4749-bb73-f17045f511e1.jpg)

Expand All @@ -21,9 +23,9 @@ Output:
<p align="center">Figure 1 - Input and outputs of Python module </p>


## Increased view of a population graph:
## Zoom of a population graph:
Interactive graph (shown above and its increased view below) representing the population of papers on a given topic consists of blue dots and lines.
Each blue dot represents an article and lines between these dots represents their "connection". Here, a connection appears if one of the paper cites another one.
Each blue dot represents an article and lines between these dots represent their "connection". Here, a connection appears if one of the paper cites another one.
![increased_view](https://user-images.githubusercontent.com/73365375/208321127-40c12253-d77d-4fd7-af8c-2f91d962877d.jpg)
<p align="center">Figure 2 - Interactive graph as the output of Python code and its increased view. Blue dots are articles on a given topic and lines are their connections </p>

Expand All @@ -32,8 +34,11 @@ After processing your query, Python generates a excel file with papers correspon
![list](https://user-images.githubusercontent.com/73365375/210182373-5b234e04-1020-4d17-8c8f-2c8be3f59a2c.jpg)
<p align="center">Figure 3 - The example of excel file with the papers on the topic of hosting capacity </p>

Note: In additon to this excel file, Python generates npy files with the list of publications outside Scopus and papers with the error like 404 (such situation happens if paper in Scopus is not correctly filled e.g. empty title, authors names, abstract etc). These npy files can be further processed to doublecheck of relevant papers ( not included in current version of module yet)
Note: In additon to this excel file, Python generates npy files with the list of publications outside Scopus and papers with the error like 404 (such situation happens if paper in Scopus is not correctly filled e.g. empty title, authors names, abstract etc). These npy files can be further processed to doublecheck of relevant papers (this doublechecking is not included in current version of module yet)

## Python workflow: how does it work
![Python_workflow](https://user-images.githubusercontent.com/73365375/212465231-c2ff4e45-8f3d-4970-9d92-caaf4c928145.png)
<p align="center">Figure 4 - Workflow of how a paper population is reconstructed inside of the python tool </p>

# Before getting started:
First of all, you need to ensure an access to Scopus API via pybliometrics:
Expand Down Expand Up @@ -61,3 +66,11 @@ Using a poetry to install all neccesary packages and run a code
8. Run ```main_test.py```
9. After the message <<<< Analysis is finished >>>>, check the resuts in the excel file <name>_outputs.xlsx and/or interactive graph

# Quick start:
Once you installed everything, you can simply change the input data (see Figure 5) and run your case studies. You may find the eid of your reference paper on its Scopus webpage (see example on Figure 6).
![Python code](https://user-images.githubusercontent.com/73365375/211420715-443bd84d-c3ea-468c-965f-fb653241b07f.png)
<p align="center">Figure 5 - The only input data to be changed in order to run your case in main_test.py </p>

![Scopus eid](https://user-images.githubusercontent.com/73365375/212465607-e63baf1f-f51c-4d15-84e7-9dbfbce24346.png)
Figure 6 - The way how you may find the Scopus eid e.g. [2-s2.0-85101235827](https://www.scopus.com/record/display.uri?eid=2-s2.0-85101235827&origin=resultslist&sort=plf-f&src=s&sid=f716326e8305eae7e14603a5323abd22&sot=b&sdt=b&s=TITLE-ABS-KEY%28assessment+AND+dynamic+AND+transformer+AND+rating%29&sl=52&sessionSearchId=f716326e8305eae7e14603a5323abd22#abstract).

20 changes: 20 additions & 0 deletions docs/docs_badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c68a93b

Please sign in to comment.