From 9180e1975e54af9fffa1cdb0d4124d6b52c92b61 Mon Sep 17 00:00:00 2001 From: Jamie Nutter <64031696+jamienutter@users.noreply.github.com> Date: Mon, 2 Oct 2023 12:37:52 +0100 Subject: [PATCH] TRIVIAL - added req files and fix bug --- .idea/.gitignore | 8 ++++++++ CODEOWNERS | 32 ++++++++++++++++++++++++++++++++ Dockerfile | 13 +++++++++++++ README.md | 2 +- asm2vec/version.py | 2 ++ catalog-info.yaml | 15 +++++++++++++++ setup.py | 30 +++++++++++++++++++++++------- 7 files changed, 94 insertions(+), 8 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 CODEOWNERS create mode 100644 Dockerfile create mode 100644 asm2vec/version.py create mode 100644 catalog-info.yaml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..446aa21 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,32 @@ +# This is a comment. +# Each line is a file pattern followed by one or more owners. + +# These owners will be the default owners for everything in +# the repo. Unless a later match takes precedence, +# @global-owner1 and @global-owner2 will be requested for +# review when someone opens a pull request. +* @wandera/datascience + +# Order is important; the last matching pattern takes the most +# precedence. When someone opens a pull request that only +# modifies JS files, only @js-owner and not the global +# owner(s) will be requested for a review. +# *.js @js-owner + +# You can also use email addresses if you prefer. They'll be +# used to look up users just like we do for commit author +# emails. +#*.go docs@example.com + +# The `docs/*` pattern will match files like +# `docs/getting-started.md` but not further nested files like +# `docs/build-app/troubleshooting.md`. +# docs/* docs@example.com + +# In this example, @octocat owns any file in an apps directory +# anywhere in your repository. +# apps/ @octocat + +# In this example, @doctocat owns any file in the `/docs` +# directory in the root of your repository. +# /docs/ @doctocat \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cb6efa5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3.10.11-slim + +ADD . /asm2vec-pytorch +WORKDIR asm2vec-pytorch + +RUN apt-get update && apt-get install -y --no-install-recommends \ + unixodbc-dev \ + unixodbc \ + libpq-dev && \ + pip install -r requirements.txt && \ + python setup.py install + +CMD ["/bin/sh"] diff --git a/README.md b/README.md index 7a2043b..c5fc4ae 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The details of the model can be found in the original paper: [(sp'19) Asm2Vec: B ## Requirements -python >= 3.6 +python >= 3.10 | packages | for | | --- | --- | diff --git a/asm2vec/version.py b/asm2vec/version.py new file mode 100644 index 0000000..f8e7582 --- /dev/null +++ b/asm2vec/version.py @@ -0,0 +1,2 @@ +VERSION = '1.0.0' +DEV_VERSION = '0' diff --git a/catalog-info.yaml b/catalog-info.yaml new file mode 100644 index 0000000..378ab88 --- /dev/null +++ b/catalog-info.yaml @@ -0,0 +1,15 @@ +apiVersion: backstage.io/v1alpha1 +kind: Component +metadata: + name: asm2vec-pytorch + description: All code running ASM2VEC using PyTorch + labels: + - jira-key: DATASCI + - language: Python + annotations: + backstage.io/source-location: url:https://github.com/wandera/asm2vec-pytorch +spec: + type: service + lifecycle: production + owner: datascience + system: datascience diff --git a/setup.py b/setup.py index 62ff843..be492bc 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,30 @@ from setuptools import setup, find_packages +from asm2vec.version import VERSION + + +def readme(): + with open('README.md') as f: + return f.read() + + +def read_requirements(): + with open('requirements.txt') as f: + return [s for s in f.read().split('\n') if not ('--index-url' in s)] + + setup( name='asm2vec', - version='1.0.0', - description='Unofficial implementation of asm2vec using pytorch', - install_requires=['torch>=1.7,<2' - 'click>=7.1,<8' - 'r2pipe>=1.5,<2'], - author='oalieno', - author_email='jeffrey6910@gmail.com', + version=VERSION, + description="Jamf's implementation of asm2vec using pytorch", + long_description=readme(), + author='oalieno/jamf', + author_email='jamie.nutter@jamf.com', license='MIT License', + install_requires=read_requirements(), packages = find_packages(), + zip_safe=False, + include_package_data=True, + test_suite='nose.collector', + tests_require=['nose'] )