Giter Site home page Giter Site logo

nju-websoft / pycre Goto Github PK

View Code? Open in Web Editor NEW
13.0 4.0 0.0 9.95 MB

Conflict-aware Inference of Python Compatible Runtime Environments with Domain Knowledge Graph, ICSE 2022

License: GNU General Public License v3.0

Python 98.85% Dockerfile 0.54% Shell 0.61%
ai4se knowledge-graph python

pycre's Introduction

PyCRE

Conflict-aware Inference of Python Compatible Runtime Environments with Domain Knowledge Graph, ICSE 2022

Dependencies

This project is developed using Python 3.6.9 on Ubuntu 18.04 LTS.

Name Version
Docker 20.10.8
Docker Compose 1.23.2

Python Package Knowledge Graph

We have opened our knowledge graphs in releases. If you need to create a new knowledge graph, follow the instructions below:

First, you need to install Neo4j 4.1.1 and its required Java version (Java SE 11).

Install extra Python dependencies:

pip install -r build_KG/requirements.txt

Automatically acquire knowledge and build KG for specific Python packages:

python build_KG/run.py <packages_file> <neo4j_HOME> <Python_version>

Load data from CSV files into an unused Neo4j database and dump the database into a single-file archive:

./build_KG/data/Pythonxxx/csv-data/run.sh

NEO4J_HOME/bin/neo4j-admin dump --database=neo4j --to=neo4j.dump

Inference

Move the dump files to the specific folder:

mv py2.dump py3.dump docker_env/neo4j

Build the docker images and start the deamon service:

cd docker_env

./build_images.sh

docker-compose up --detach

Install extra Python dependencies:

pip install -r bin/requirements.txt

Compile CryptoMiniSat SAT solver.

Now, you can use PyCRE to infer a compatible runtime environment to a Python code:

python bin/run.py <snippet_path> <dependencies_dir>

Citation

If you use this work or code, please kindly cite it as follows:

@inproceedings{PyCRE,
  author    = {Wei Cheng and Xiangrong Zhu and Wei Hu},
  title     = {Conflict-aware Inference of Python Compatible Runtime Environments with
               Domain Knowledge Graph},
  booktitle = {International Conference on Software Engineering (ICSE)},
  year      = {2022}
}

pycre's People

Contributors

njuweicheng avatar whu2015 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pycre's Issues

Docker kill and restarting issue

When I try to run docker-compose I found that py2-neo4j and py3-neo4j can't be started at the same time. When the first starts, the second show this error (and vice versa):
/build-files/load-and-start.sh: line 12: 76 Killed /docker-entrypoint.sh neo4j

No problem when i run docker-compose including only once py2-neo4j or py3-neo4j.

photo_2022-09-14_18-17-09

Any ideas on how to resolve this issue?

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.