From 8c28c24d60ee00688afdcbb6bb817d4ed213bd0c Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Mon, 14 Mar 2022 01:33:24 +0000 Subject: [PATCH] removed all unessasary files, moved important files to folder "competition" Former-commit-id: 59becb22abc3305a36e2876351e6c7306e3f551e --- .devcontainer/Dockerfile | 6 --- .devcontainer/devcontainer.json | 22 -------- .github/ISSUE_TEMPLATE/bug_report.md | 38 -------------- .github/ISSUE_TEMPLATE/feature_request.md | 20 -------- .github/workflows/build-cli.yml | 35 ------------- .github/workflows/superscript-unit.yml | 34 ------------- build/build-CLI.bat | 5 -- build/build-CLI.sh | 5 -- build/superscript.spec | 50 ------------------- {src => competition}/config.py | 0 {src => competition}/data.py | 0 {src => competition}/dep.py | 0 {src => competition}/exceptions.py | 0 {src => competition}/interface.py | 0 {src => competition}/module.py | 0 {src => competition}/pull.py | 0 .../requirements.txt | 1 - {src => competition}/superscript.py | 0 test/test_superscript.py | 2 - test/test_zmq.py | 14 ------ 20 files changed, 232 deletions(-) delete mode 100644 .devcontainer/Dockerfile delete mode 100644 .devcontainer/devcontainer.json delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .github/workflows/build-cli.yml delete mode 100644 .github/workflows/superscript-unit.yml delete mode 100644 build/build-CLI.bat delete mode 100644 build/build-CLI.sh delete mode 100644 build/superscript.spec rename {src => competition}/config.py (100%) rename {src => competition}/data.py (100%) rename {src => competition}/dep.py (100%) rename {src => competition}/exceptions.py (100%) rename {src => competition}/interface.py (100%) rename {src => competition}/module.py (100%) rename {src => competition}/pull.py (100%) rename {.devcontainer => competition}/requirements.txt (85%) rename {src => competition}/superscript.py (100%) delete mode 100644 test/test_superscript.py delete mode 100644 test/test_zmq.py diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 9992aaa..0000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM python:slim -WORKDIR / -RUN apt-get -y update; apt-get -y upgrade -RUN apt-get -y install git binutils -COPY requirements.txt . -RUN pip install -r requirements.txt \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index e8c7a57..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "TRA Analysis Development Environment", - "build": { - "dockerfile": "Dockerfile", - }, - "settings": { - "terminal.integrated.shell.linux": "/bin/bash", - "python.pythonPath": "/usr/local/bin/python", - "python.linting.enabled": true, - "python.linting.pylintEnabled": true, - "python.linting.pylintPath": "/usr/local/bin/pylint", - "python.testing.pytestPath": "/usr/local/bin/pytest", - "editor.tabSize": 4, - "editor.insertSpaces": false - }, - "extensions": [ - "mhutchie.git-graph", - "ms-python.python", - "waderyan.gitblame" - ], - "postCreateCommand": "" - } \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index dd84ea7..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index bbcbbe7..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/build-cli.yml b/.github/workflows/build-cli.yml deleted file mode 100644 index 7b9f8d7..0000000 --- a/.github/workflows/build-cli.yml +++ /dev/null @@ -1,35 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Build Superscript Linux - -on: - release: - types: [published, edited] - -jobs: - generate: - name: Build Linux - runs-on: ubuntu-latest - steps: - - name: Checkout master - uses: actions/checkout@master - - name: Install Dependencies - run: pip install -r requirements.txt - working-directory: src/ - - name: Give Execute Permission - run: chmod +x build-CLI.sh - working-directory: build/ - - name: Build Binary - run: ./build-CLI.sh - working-directory: build/ - - name: Copy Binary to Root Dir - run: cp superscript .. - working-directory: dist/ - - name: Upload Release Asset - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: superscript - asset_name: superscript - tag: ${{ github.ref }} \ No newline at end of file diff --git a/.github/workflows/superscript-unit.yml b/.github/workflows/superscript-unit.yml deleted file mode 100644 index 3a4e4c5..0000000 --- a/.github/workflows/superscript-unit.yml +++ /dev/null @@ -1,34 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: Superscript Unit Tests - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.7, 3.8] - - - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pytest - if [ -f src/requirements.txt ]; then pip install -r src/requirements.txt; fi - - name: Test with pytest - run: | - pytest test/ diff --git a/build/build-CLI.bat b/build/build-CLI.bat deleted file mode 100644 index d5be7f8..0000000 --- a/build/build-CLI.bat +++ /dev/null @@ -1,5 +0,0 @@ -set pathtospec="../src/superscript.spec" -set pathtodist="../dist/" -set pathtowork="temp/" - -pyinstaller --clean --distpath %pathtodist% --workpath %pathtowork% %pathtospec% \ No newline at end of file diff --git a/build/build-CLI.sh b/build/build-CLI.sh deleted file mode 100644 index 41b2c8b..0000000 --- a/build/build-CLI.sh +++ /dev/null @@ -1,5 +0,0 @@ -pathtospec="superscript.spec" -pathtodist="../dist/" -pathtowork="temp/" - -pyinstaller --clean --distpath ${pathtodist} --workpath ${pathtowork} ${pathtospec} \ No newline at end of file diff --git a/build/superscript.spec b/build/superscript.spec deleted file mode 100644 index 53c3d37..0000000 --- a/build/superscript.spec +++ /dev/null @@ -1,50 +0,0 @@ -# -*- mode: python ; coding: utf-8 -*- - -block_cipher = None - -a = Analysis( - ['../src/superscript.py'], - pathex=[], - binaries=[], - datas=[], - hiddenimports=['dnspython', 'sklearn.utils._weight_vector', 'sklearn.utils._typedefs', 'sklearn.neighbors._partition_nodes', 'requests'], - hookspath=[], - hooksconfig={}, - runtime_hooks=[], - excludes=['matplotlib'], - win_no_prefer_redirects=False, - win_private_assemblies=False, - cipher=block_cipher, - noarchive=False -) -pyz = PYZ( - a.pure, - a.zipped_data, - cipher=block_cipher -) -exe = EXE( - pyz, - a.scripts, - [], - exclude_binaries=True, - name='superscript', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - console=True, - disable_windowed_traceback=False, - target_arch=None, - codesign_identity=None, - entitlements_file=None -) -coll = COLLECT( - exe, - a.binaries, - a.zipfiles, - a.datas, - strip=False, - upx=True, - upx_exclude=[], - name='superscript' -) \ No newline at end of file diff --git a/src/config.py b/competition/config.py similarity index 100% rename from src/config.py rename to competition/config.py diff --git a/src/data.py b/competition/data.py similarity index 100% rename from src/data.py rename to competition/data.py diff --git a/src/dep.py b/competition/dep.py similarity index 100% rename from src/dep.py rename to competition/dep.py diff --git a/src/exceptions.py b/competition/exceptions.py similarity index 100% rename from src/exceptions.py rename to competition/exceptions.py diff --git a/src/interface.py b/competition/interface.py similarity index 100% rename from src/interface.py rename to competition/interface.py diff --git a/src/module.py b/competition/module.py similarity index 100% rename from src/module.py rename to competition/module.py diff --git a/src/pull.py b/competition/pull.py similarity index 100% rename from src/pull.py rename to competition/pull.py diff --git a/.devcontainer/requirements.txt b/competition/requirements.txt similarity index 85% rename from .devcontainer/requirements.txt rename to competition/requirements.txt index 56ec5dc..4f9a9c7 100644 --- a/.devcontainer/requirements.txt +++ b/competition/requirements.txt @@ -5,7 +5,6 @@ pyinstaller pylint pymongo pyparsing -pytest python-daemon pyzmq requests diff --git a/src/superscript.py b/competition/superscript.py similarity index 100% rename from src/superscript.py rename to competition/superscript.py diff --git a/test/test_superscript.py b/test/test_superscript.py deleted file mode 100644 index f670919..0000000 --- a/test/test_superscript.py +++ /dev/null @@ -1,2 +0,0 @@ -def test_(): - assert 1 == 1 \ No newline at end of file diff --git a/test/test_zmq.py b/test/test_zmq.py deleted file mode 100644 index df4c0e4..0000000 --- a/test/test_zmq.py +++ /dev/null @@ -1,14 +0,0 @@ -import signal -import zmq - -signal.signal(signal.SIGINT, signal.SIG_DFL) - -context = zmq.Context() - -socket = context.socket(zmq.SUB) -socket.connect('tcp://localhost:5678') -socket.setsockopt(zmq.SUBSCRIBE, b'status') - -while True: - message = socket.recv_multipart() - print(f'Received: {message}') \ No newline at end of file