Giter VIP home page Giter VIP logo

automating-slr's Introduction

Acknowledgement

This work is an extention of the work of Yunhai Zhang that resides on https://github.com/zsf520/Automating_SLR. The code there is used in this repo for educational&research purposes only.

Remark

Queries that are generated for scopus and ebsco libraries are quick prototypes and they haven't been tested during Yunhai Zhang's research.

Quick showcase

Video

Introducing the application(with voice-over)

Video

Installing dependencies:

  1. Install git, python3 and pip (Even if it is already installed, it is strongly recommended to upgrade to at leastpython 3.12) and make sure that they on your PATH or in Windows jargon they are added to the environment variables(meaning that you can execute python and pip related commands from your bash terminal or powershell(in case of Windows))

  2. For next steps use Git Bash(already installed with git, you can paste commands via right clicking and clicking on paste, ctrl+v wouldn't work) in Windows and your standard bash terminal in Linux&MacOS

  3. Clone the repository(via git clone https://github.com/halildgn/automating-slr.git)

  4. Navigate to automating-slr/src-python via cd automating-slr/src-python

  5. Copy and run the following command to install the dependencies:

  • Important Note: Sometimes using eduroam causes problems while cloning a git repository or installing python packages. If you encounter such problem, please execute following commands while using your private network.

Windows:

py -m pip install -r requirements.txt && py -m playwright install --with-deps chrome

MacOS and Linux:

python3 -m pip install -r requirements.txt && python3 -m playwright install --with-deps chrome

Running the App

After installing the dependencies, in automating-slr/src-python run via py automating-slr.py on Windows and via python3 automating-slr.py on MacOS&Linux

Configuration

  • Your theme preference and build configurations are managed by pickledDB and stored in automating-slr/src-python/config.db. In case of switching over to other machines in the future, you can still enjoy your existing builds by placing this config.db file from old computer in the new computer's automating-slr/src-python directory.

Backup Option/Last Resort

If you had problems while running the GUI with webui2 or you would like to launch the GUI inside your webbrowser, you import the webbrowser module(it is included in python by default, no need to install) and change the main of src-python/automating-slr.py as following:

import webbrowser
if __name__ == '__main__':
#   needed when freezing the app:
#   multiprocessing.freeze_support()
    frontend = cast(str,resource_path("index.html"))
    server_process = multiprocessing.Process(target=spin_up_server) 
    server_process.start()
    webbrowser.open(frontend, new=1 , autoraise=True )

To make the app deployable

  1. Adjust the content of main with the following and in the python modules, instead of directly saving files to the remote server(since the server is going to run on another computer, we don't want to save files to that computer but we would like retrieve them instead), send those back to the client as response.
  2. Adjust the content of the frontend, so that the response from the server(the file) is saved, also instead of making use of server to manage the builds&theme-preference, use localStorage instead(since we don't want to save our configs to the remote server) -> see the commit here
  3. Either move caching to frontend, change caching strategy in backend(src-python/automating-slr.py), or revoke caching strategy between the boundariesForFilterParameters and filter route handlers.
  4. Deploy the server via vm or container and deploy the frontend(static html) to some static site hosting service like "github pages".
if __name__ == '__main__':
    server_process = multiprocessing.Process(target=spin_up_server) 
    server_process.start()

For possible development cycles in the future

  • Install NVM(node version manager): Windows Linux and MacOS
  • Install node version 21.7.1 by using nvm install 21.7.1 and set the version by nvm use 21.7.1
  • In automating-slr, install the packages via npm install --legacy-peer-deps
  • To build, in automating-slr: npm run build(generates the standalone html in automating-slr/src-python which is going to be used while generating the binary)
  • To spin up a frontend development server, in automating-slr: npm run dev
  • To spin up the flask server, comment out the following lines before running the automating-slr.py script with py automating-slr.py on Windows and python3 automating-slr.py on MacOS&Linux:
if __name__ == '__main__':
#   needed when freezing the app:
#   multiprocessing.freeze_support()
#   frontend = cast(str,resource_path("index.html"))
    server_process = multiprocessing.Process(target=spin_up_server) 
    server_process.start()
#   app_window = webui.window()
#   app_window.show(frontend)

automating-slr's People

Contributors

halildgn avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.