From 152d1aa90170803fd9f22a0be75512f7da258f05 Mon Sep 17 00:00:00 2001 From: BennyWestsyde Date: Wed, 31 Mar 2021 18:51:56 -0400 Subject: [PATCH 01/30] Dockerfile working --- Dockerfile | 60 ++++++++++++++++++++++++++++++++++++++++++++ docker_build_mac.sh | 3 +++ docker_build_win.bat | 2 ++ docker_run_mac.sh | 3 +++ docker_run_win.bat | 2 ++ readme_docker.md | 13 ++++++++++ 6 files changed, 83 insertions(+) create mode 100644 Dockerfile create mode 100644 docker_build_mac.sh create mode 100644 docker_build_win.bat create mode 100644 docker_run_mac.sh create mode 100644 docker_run_win.bat create mode 100644 readme_docker.md diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..152d883c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,60 @@ +#This is how you do comments +FROM ubuntu:20.04 +LABEL version="0.1" +LABEL description="An automated text-mining tool written in Python to measure \ + the technical responsibility of students in computer science courses, being \ + used to analyze students' markdown reflection documents and five questions \ + survey based on Natural Language Processing in the Department of Computer \ + Science at Allegheny College." +LABEL maintainer="Group 5" + +ENV LANG C.UTF-8 +ENV LANGUAGE C.UTF-8 +ENV LC_ALL C.UTF-8 +RUN groupadd -r student && \ + useradd -m -r -g student -d /home/student -s /usr/sbin/nologin -c "student User" student && \ + mkdir -p /home/student/workdir && \ + chown -R student:student /home/student +COPY . /home/student/GATORMINER/ + + +USER root +RUN apt-get -y -qq update +RUN apt-get install -y make build-essential python3-distutils libssl-dev zlib1g-dev \ + libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \ + libncursesw5-dev xz-utils libffi-dev liblzma-dev python-openssl git + + + +ENV HOME /home/student +WORKDIR /home/student/GATORMINER +VOLUME ["/home/student/GATORMINER"] +RUN curl https://pyenv.run | bash +ENV PATH="$HOME/.pyenv/bin:${PATH}" +RUN echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc +RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc +RUN echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc +SHELL ["/bin/bash", "--login", "-c"] +RUN pyenv install 3.9.2 +RUN pyenv global 3.9.2 +RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py +RUN python3 get-pip.py +RUN python3 -m pip install pipenv +RUN pipenv run python -m pip install Cython wheel setuptools +#==========This is where the issues start=========== +RUN pipenv install --dev +#^^^Last Build Time > 1003.9s before crash +RUN pipenv run spacy download en_core_web_sm +USER student +ENV USER student +CMD pipenv run streamlit run streamlit_web.py + + + + + +#TODO: +#break into subprocesses +#figure out why program fails on pipenv install +#add full comments so that docker file is readable +#push v1 of Docker image!! \ No newline at end of file diff --git a/docker_build_mac.sh b/docker_build_mac.sh new file mode 100644 index 00000000..965ee0d7 --- /dev/null +++ b/docker_build_mac.sh @@ -0,0 +1,3 @@ +#!/bin/bash +printf "\n[+] (Mac) Building Docker Container" +docker build -t devi . diff --git a/docker_build_win.bat b/docker_build_win.bat new file mode 100644 index 00000000..88136422 --- /dev/null +++ b/docker_build_win.bat @@ -0,0 +1,2 @@ +@echo [+] (Win_OS) Building Docker Container. +docker build -t devi . diff --git a/docker_run_mac.sh b/docker_run_mac.sh new file mode 100644 index 00000000..57e21039 --- /dev/null +++ b/docker_run_mac.sh @@ -0,0 +1,3 @@ +#!/bin/bash +printf "\n[+] (Mac) Running Docker Container" +docker run --rm -it -v "$PWD:/root" devi diff --git a/docker_run_win.bat b/docker_run_win.bat new file mode 100644 index 00000000..6a76f031 --- /dev/null +++ b/docker_run_win.bat @@ -0,0 +1,2 @@ +@echo [+] (Win_OS) Running Docker Container. +docker run --rm -it -v "%cd%:/root" devi diff --git a/readme_docker.md b/readme_docker.md new file mode 100644 index 00000000..97c1ea39 --- /dev/null +++ b/readme_docker.md @@ -0,0 +1,13 @@ +README File For Running Docker Container + +### Mac: +##### Building: +##### Running: + +### Windows: +##### Building: +##### Running: + +### Linux: +##### Building: +##### Running: From 3f3a412ac4e0f4f0e39051a564c972616cb1e814 Mon Sep 17 00:00:00 2001 From: BennyWestsyde Date: Wed, 31 Mar 2021 18:57:43 -0400 Subject: [PATCH 02/30] Comment --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 152d883c..336d56f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,11 +50,12 @@ ENV USER student CMD pipenv run streamlit run streamlit_web.py - +#BUILD WITH: docker build -t gatorminerv1.0 Documents/COMPSCI203/Labs/GatorMiner && docker container run --name myminer -d -p 8501:8501 gatorminerv0.1 && echo "Please open 'localhost:80' on your browser of choice" #TODO: #break into subprocesses + #figure out why program fails on pipenv install #add full comments so that docker file is readable #push v1 of Docker image!! \ No newline at end of file From c6d12c1dd8314b695b2046c3f3d85cb491421b48 Mon Sep 17 00:00:00 2001 From: BennyWestsyde Date: Wed, 31 Mar 2021 19:00:55 -0400 Subject: [PATCH 03/30] One more comment --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 336d56f2..b5b3fce8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -50,7 +50,8 @@ ENV USER student CMD pipenv run streamlit run streamlit_web.py -#BUILD WITH: docker build -t gatorminerv1.0 Documents/COMPSCI203/Labs/GatorMiner && docker container run --name myminer -d -p 8501:8501 gatorminerv0.1 && echo "Please open 'localhost:80' on your browser of choice" +#BUILD WITH: docker build -t gatorminerv1.0 Documents/COMPSCI203/Labs/GatorMiner +#RUN WITH: docker container run --name myminer -d -p 8501:8501 gatorminerv0.1 && echo "Please open 'localhost:80' on your browser of choice" #TODO: From c947e1ac507c14911a4462bec4e0af311927e027 Mon Sep 17 00:00:00 2001 From: BennyWestsyde Date: Sun, 4 Apr 2021 14:00:20 -0400 Subject: [PATCH 04/30] Debugging --- Dockerfile | 11 ++++++----- docker_build_mac.sh | 2 +- docker_build_win.bat | 2 +- docker_run_mac.sh | 2 +- docker_run_win.bat | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index b5b3fce8..d7e814f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ COPY . /home/student/GATORMINER/ USER root RUN apt-get -y -qq update -RUN apt-get install -y make build-essential python3-distutils libssl-dev zlib1g-dev \ +RUN apt-get install -y make build-essential python3-distutils python3-dev libssl-dev zlib1g-dev \ libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \ libncursesw5-dev xz-utils libffi-dev liblzma-dev python-openssl git @@ -31,6 +31,7 @@ WORKDIR /home/student/GATORMINER VOLUME ["/home/student/GATORMINER"] RUN curl https://pyenv.run | bash ENV PATH="$HOME/.pyenv/bin:${PATH}" +RUN echo 'alias python="python3"' >>~/.bashrc RUN echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc RUN echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc @@ -38,8 +39,8 @@ SHELL ["/bin/bash", "--login", "-c"] RUN pyenv install 3.9.2 RUN pyenv global 3.9.2 RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py -RUN python3 get-pip.py -RUN python3 -m pip install pipenv +RUN python get-pip.py +RUN python -m pip install pipenv RUN pipenv run python -m pip install Cython wheel setuptools #==========This is where the issues start=========== RUN pipenv install --dev @@ -50,8 +51,8 @@ ENV USER student CMD pipenv run streamlit run streamlit_web.py -#BUILD WITH: docker build -t gatorminerv1.0 Documents/COMPSCI203/Labs/GatorMiner -#RUN WITH: docker container run --name myminer -d -p 8501:8501 gatorminerv0.1 && echo "Please open 'localhost:80' on your browser of choice" +#BUILD WITH: docker build -t gatorminer . +#RUN WITH: docker container run --name myminer -d -p 8501:8501 benwest66/gatorminer:latest && echo "Please open 'localhost:80' on your browser of choice" #TODO: diff --git a/docker_build_mac.sh b/docker_build_mac.sh index 965ee0d7..71399d50 100644 --- a/docker_build_mac.sh +++ b/docker_build_mac.sh @@ -1,3 +1,3 @@ #!/bin/bash printf "\n[+] (Mac) Building Docker Container" -docker build -t devi . +docker build -t gatorminer . diff --git a/docker_build_win.bat b/docker_build_win.bat index 88136422..af175b8e 100644 --- a/docker_build_win.bat +++ b/docker_build_win.bat @@ -1,2 +1,2 @@ @echo [+] (Win_OS) Building Docker Container. -docker build -t devi . +docker build -t gatorminer . diff --git a/docker_run_mac.sh b/docker_run_mac.sh index 57e21039..d58d120d 100644 --- a/docker_run_mac.sh +++ b/docker_run_mac.sh @@ -1,3 +1,3 @@ #!/bin/bash printf "\n[+] (Mac) Running Docker Container" -docker run --rm -it -v "$PWD:/root" devi +docker container run --name devi -d -p 8501:8501 benwest66/gatorminer && echo "Please open \x1B]8;;URI\x1B\\localhost:80\x1B]8;;\x1B\\ on your browser of choice" diff --git a/docker_run_win.bat b/docker_run_win.bat index 6a76f031..3d865164 100644 --- a/docker_run_win.bat +++ b/docker_run_win.bat @@ -1,2 +1,2 @@ @echo [+] (Win_OS) Running Docker Container. -docker run --rm -it -v "%cd%:/root" devi +docker container run --name devi -d -p 8501:8501 benwest66/gatorminer && echo "Please open \x1B]8;;URI\x1B\\localhost:80\x1B]8;;\x1B\\ on your browser of choice" From 5734687f15a7c45539b1c3c1c94a45ecca09653a Mon Sep 17 00:00:00 2001 From: BennyWestsyde Date: Sun, 4 Apr 2021 22:17:15 -0400 Subject: [PATCH 05/30] Fixed bug, docker working again (4/4/21) --- Dockerfile | 52 ++++++++++++++++++++-------------------------- Pipfile | 6 ++++-- docker_run_mac.sh | 2 +- docker_run_win.bat | 2 +- 4 files changed, 29 insertions(+), 33 deletions(-) diff --git a/Dockerfile b/Dockerfile index d7e814f8..bf40d760 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -#This is how you do comments -FROM ubuntu:20.04 +FROM ubuntu:20.04 +SHELL ["/bin/bash", "--login", "-c"] LABEL version="0.1" LABEL description="An automated text-mining tool written in Python to measure \ the technical responsibility of students in computer science courses, being \ @@ -7,7 +7,6 @@ LABEL description="An automated text-mining tool written in Python to measure \ survey based on Natural Language Processing in the Department of Computer \ Science at Allegheny College." LABEL maintainer="Group 5" - ENV LANG C.UTF-8 ENV LANGUAGE C.UTF-8 ENV LC_ALL C.UTF-8 @@ -16,48 +15,43 @@ RUN groupadd -r student && \ mkdir -p /home/student/workdir && \ chown -R student:student /home/student COPY . /home/student/GATORMINER/ - - USER root RUN apt-get -y -qq update RUN apt-get install -y make build-essential python3-distutils python3-dev libssl-dev zlib1g-dev \ libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \ - libncursesw5-dev xz-utils libffi-dev liblzma-dev python-openssl git - - - + libncursesw5-dev xz-utils libffi-dev liblzma-dev python-openssl git curl file ENV HOME /home/student WORKDIR /home/student/GATORMINER VOLUME ["/home/student/GATORMINER"] RUN curl https://pyenv.run | bash ENV PATH="$HOME/.pyenv/bin:${PATH}" -RUN echo 'alias python="python3"' >>~/.bashrc +RUN export PATH="$HOME/.pyenv/bin:${PATH}" +RUN echo 'alias python="python3.9"' >> ~/.profile RUN echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc RUN echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc -SHELL ["/bin/bash", "--login", "-c"] +RUN /bin/bash -c "source ~/.bashrc" +RUN /bin/bash -c "source ~/.profile" RUN pyenv install 3.9.2 RUN pyenv global 3.9.2 RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py -RUN python get-pip.py -RUN python -m pip install pipenv -RUN pipenv run python -m pip install Cython wheel setuptools +SHELL ["/bin/bash", "--login", "-c"] +LABEL version="0.1" +LABEL description="An automated text-mining tool written in Python to measure \ + the technical responsibility of students in computer science courses, being \ + used to analyze students' markdown reflection documents and five questions \ + survey based on Natural Language Processing in the Department of Computer \ + Science at Allegheny College." +LABEL maintainer="Group 5" +RUN /bin/bash --login +RUN pyenv local 3.9.2 +RUN pyenv exec python get-pip.py +RUN pyenv exec python -m pip install pipenv +RUN pyenv exec pipenv run python -m pip install Cython wheel setuptools #==========This is where the issues start=========== -RUN pipenv install --dev +RUN pyenv exec pipenv install --skip-lock --dev #^^^Last Build Time > 1003.9s before crash -RUN pipenv run spacy download en_core_web_sm +RUN pyenv exec pipenv run spacy download en_core_web_sm USER student ENV USER student -CMD pipenv run streamlit run streamlit_web.py - - -#BUILD WITH: docker build -t gatorminer . -#RUN WITH: docker container run --name myminer -d -p 8501:8501 benwest66/gatorminer:latest && echo "Please open 'localhost:80' on your browser of choice" - - -#TODO: -#break into subprocesses - -#figure out why program fails on pipenv install -#add full comments so that docker file is readable -#push v1 of Docker image!! \ No newline at end of file +CMD pyenv exec pipenv run streamlit run streamlit_web.py \ No newline at end of file diff --git a/Pipfile b/Pipfile index b0aa1717..175ed3f0 100644 --- a/Pipfile +++ b/Pipfile @@ -10,19 +10,21 @@ pytest = "*" pytest-cov = "*" [packages] +numpy = "~=1.20.2" matplotlib = "*" -gensim = '*' +gensim = "~=3.8.3" spacy = "~=2.3" sklearn = "*" pytest = "*" requests = "*" commonmark = "*" codecov = "*" -streamlit = "*" +streamlit = "~=0.78.0" altair = "*" textblob = "*" scipy = "*" pylint = "*" +importlib-metadata = "*" [pipenv] allow_prereleases = true diff --git a/docker_run_mac.sh b/docker_run_mac.sh index d58d120d..9f6239a7 100644 --- a/docker_run_mac.sh +++ b/docker_run_mac.sh @@ -1,3 +1,3 @@ #!/bin/bash printf "\n[+] (Mac) Running Docker Container" -docker container run --name devi -d -p 8501:8501 benwest66/gatorminer && echo "Please open \x1B]8;;URI\x1B\\localhost:80\x1B]8;;\x1B\\ on your browser of choice" +docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "Please open \x1B]8;;URI\x1B\\localhost:8501\x1B]8;;\x1B\\ on your browser of choice" diff --git a/docker_run_win.bat b/docker_run_win.bat index 3d865164..575ff4b1 100644 --- a/docker_run_win.bat +++ b/docker_run_win.bat @@ -1,2 +1,2 @@ @echo [+] (Win_OS) Running Docker Container. -docker container run --name devi -d -p 8501:8501 benwest66/gatorminer && echo "Please open \x1B]8;;URI\x1B\\localhost:80\x1B]8;;\x1B\\ on your browser of choice" +docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "Please open \x1B]8;;URI\x1B\\localhost:8501\x1B]8;;\x1B\\ on your browser of choice" From 0c0723c789d295953cb4f67f0a7b4c280fc9aac2 Mon Sep 17 00:00:00 2001 From: BennyWestsyde Date: Sun, 4 Apr 2021 22:40:29 -0400 Subject: [PATCH 06/30] Formatting --- docker_run_mac.sh | 2 +- docker_run_win.bat | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker_run_mac.sh b/docker_run_mac.sh index 9f6239a7..300e6b05 100644 --- a/docker_run_mac.sh +++ b/docker_run_mac.sh @@ -1,3 +1,3 @@ #!/bin/bash printf "\n[+] (Mac) Running Docker Container" -docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "Please open \x1B]8;;URI\x1B\\localhost:8501\x1B]8;;\x1B\\ on your browser of choice" +docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "\n\tYou can now view your Streamlit app in your browser.\n\n\tNetwork URL: http://localhost:8501 \n\tExternal URL: http://141.195.4.17:8501" diff --git a/docker_run_win.bat b/docker_run_win.bat index 575ff4b1..bc565322 100644 --- a/docker_run_win.bat +++ b/docker_run_win.bat @@ -1,2 +1,2 @@ @echo [+] (Win_OS) Running Docker Container. -docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "Please open \x1B]8;;URI\x1B\\localhost:8501\x1B]8;;\x1B\\ on your browser of choice" +docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "\n\tYou can now view your Streamlit app in your browser.\n\n\tNetwork URL: http://localhost:8501 \n\tExternal URL: http://141.195.4.17:8501" \ No newline at end of file From f50beab75459a8c6268f14ca6ac1471c2a5289c5 Mon Sep 17 00:00:00 2001 From: BennyWestsyde Date: Mon, 5 Apr 2021 02:56:59 -0400 Subject: [PATCH 07/30] updating main.yml --- .github/workflows/main.yml | 52 ++++++++++++++++++++++++++++++++++---- README.md | 1 + 2 files changed, 48 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 76fdc75c..4884998b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,19 +9,20 @@ jobs: strategy: matrix: os: [Ubuntu, MacOS] - python-version: [3.6, 3.7, 3.8] + python-version: [3.7, 3.8] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 + id: setup-python with: python-version: ${{ matrix.python-version }} - - name: Install Pipenv - run: | - pip install pipenv --upgrade + - name: Setup Pipenv + uses: dschep/install-pipenv-action@v1 - name: Install dependencies run: | - pipenv install --dev --skip-lock + # install dependencies according to the lock file + pipenv install --dev --ignore-pipfile --python ${{ steps.setup-python.outputs.python-version }} pipenv run python -m spacy download en_core_web_sm - name: Run test with pytest run: | @@ -34,3 +35,44 @@ jobs: run: | pipenv run pylint src pipenv run pylint tests +--- +name: Docker Build + +on: + schedule: + - cron: "* */24 * * *" + push: + branches: + - 'master' + pull_request: + branches: + - master + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - + name: Login to DockerHub + if: github.ref == 'refs/heads/master' + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + version: $(date %Y%m%d%H%M%S).git.$GIT_REVISION + push: true + tags: bennywestsyde/gatorminer:${{ steps.docker_build.version }} + - + name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} \ No newline at end of file diff --git a/README.md b/README.md index cbafb3b0..97c2586e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # GatorMiner [![Build Status](https://travis-ci.com/Allegheny-Ethical-CS/GatorMiner.svg?branch=master)](https://travis-ci.com/Allegheny-Ethical-CS/GatorMiner) + [![codecov](https://codecov.io/gh/Allegheny-Ethical-CS/GatorMiner/branch/master/graph/badge.svg)](https://codecov.io/gh/Allegheny-Ethical-CS/GatorMiner) [![Built with spaCy](https://img.shields.io/badge/built%20with-spaCy-09a3d5.svg)](https://spacy.io) [![Built with Streamlit](https://img.shields.io/badge/built%20with-Streamlit-09a3d5.svg)](https://www.streamlit.io/) From e98e18a4235d94718d2870f51a4ec242772e56f2 Mon Sep 17 00:00:00 2001 From: BennyWestsyde Date: Mon, 5 Apr 2021 04:49:35 -0400 Subject: [PATCH 08/30] Push all edits to new branch. Automatically builds --- .github/workflows/dockerbuild.yml | 37 +++ .github/workflows/{main.yml => test.yml} | 41 ---- .mdlrc | 2 +- .travis.yml | 3 +- CONTRIBUTING.md | 10 +- Dockerfile | 2 +- Pipfile.lock | 300 ++++++++++++----------- README.md | 21 +- readme_docker.md | 1 + src/summarizer.py | 2 +- streamlit_web.py | 31 ++- tests/test_markdown.py | 3 +- 12 files changed, 238 insertions(+), 215 deletions(-) create mode 100644 .github/workflows/dockerbuild.yml rename .github/workflows/{main.yml => test.yml} (52%) diff --git a/.github/workflows/dockerbuild.yml b/.github/workflows/dockerbuild.yml new file mode 100644 index 00000000..1e32aa27 --- /dev/null +++ b/.github/workflows/dockerbuild.yml @@ -0,0 +1,37 @@ +name: Docker Build + +on: + schedule: + - cron: "*/60 */24 * * 0" + push: + branches: + - 'master' + pull_request: + branches: + - master + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%m-%d-%Y')" + - + name: Login to DockerHub + if: github.ref == 'refs/heads/master' + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + version: ${{steps.date.outputs.date}} + push: true + tags: bennywestsyde/gatorminer:${{steps.date.outputs.date}} + - + name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/.github/workflows/main.yml b/.github/workflows/test.yml similarity index 52% rename from .github/workflows/main.yml rename to .github/workflows/test.yml index 4884998b..77790511 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/test.yml @@ -35,44 +35,3 @@ jobs: run: | pipenv run pylint src pipenv run pylint tests ---- -name: Docker Build - -on: - schedule: - - cron: "* */24 * * *" - push: - branches: - - 'master' - pull_request: - branches: - - master - -jobs: - docker: - runs-on: ubuntu-latest - steps: - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - if: github.ref == 'refs/heads/master' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - version: $(date %Y%m%d%H%M%S).git.$GIT_REVISION - push: true - tags: bennywestsyde/gatorminer:${{ steps.docker_build.version }} - - - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} \ No newline at end of file diff --git a/.mdlrc b/.mdlrc index b7e08259..6755fba7 100644 --- a/.mdlrc +++ b/.mdlrc @@ -1 +1 @@ -rules "~MD013" +rules "~MD013, ~MD033" diff --git a/.travis.yml b/.travis.yml index e1ae17bf..f3b56b6b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,8 @@ before_install: # install pyenv with travis-pyenv - wget https://github.com/praekeltfoundation/travis-pyenv/releases/latest/download/setup-pyenv.sh - source setup-pyenv.sh - # install mdl to check markdown + - gem install chef-utils -v 16.6.14 + # install mdl to check markdown beep - gem install mdl notifications: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5769b08c..8f9146ef 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,7 +51,7 @@ code contribution. ### Development Environment In order to contribute code or documentation to the project, the project -maintainers suggest installing the release of Python versions above 3.6. You can +maintainers suggest installing the release of Python versions above 3.7. You can learn more about installing and managing python versions with `pyenv` from [here](https://realpython.com/intro-to-pyenv/). In addition to installing `Git` to access the project's GitHub repository, you should also install `Pipenv` for its @@ -108,9 +108,9 @@ pipenv run streamlit run streamlit_web.py #### Develop GatorMiner on Windows GatorMiner depends on gensim, and gensim requires Microsoft Visual C++ 14.0+. You can check the version you have from -`Control Panel -> Programs and Features`. To download or update this, go to the -[Visual Studio 2019 Downloads](https://visualstudio.microsoft.com/downloads/), scroll down and -expand the `Tools for Visual Studio 2019` and click the download link for `Build tools for Visual Studio 2019`. +`Control Panel -> Programs and Features`. To download or update this, go to the +[Visual Studio 2019 Downloads](https://visualstudio.microsoft.com/downloads/), scroll down and +expand the `Tools for Visual Studio 2019` and click the download link for `Build tools for Visual Studio 2019`. Once the installer is downloaded, launch it and select the `C++ build tools` option under `Desktop and Mobile`. After that select install at the bottom and wait. @@ -120,7 +120,7 @@ installing, the installer will ask to restart the computer to finish the install After your computer has finished installing the C++ build tools, you may need to reinstall the dependencies. To do this, just run the `pipenv install --dev` command as previously instructed. -If you still receive the error, delete the `Pipfile.lock` file in the root of the GatorMiner directory and reinstall +If you still receive the error, delete the `Pipfile.lock` file in the root of the GatorMiner directory and reinstall using the previous command. #### Test GatorMiner with Sample Data diff --git a/Dockerfile b/Dockerfile index bf40d760..fa9bb321 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:20.04 SHELL ["/bin/bash", "--login", "-c"] -LABEL version="0.1" +LABEL version="latest" LABEL description="An automated text-mining tool written in Python to measure \ the technical responsibility of students in computer science courses, being \ used to analyze students' markdown reflection documents and five questions \ diff --git a/Pipfile.lock b/Pipfile.lock index 813a690e..f123ae81 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "c9126e8f69ae7b03d9e1cd82452f258090891c271d491ef0f416107c2cfb68eb" + "sha256": "789c09afdf33e00d8e16fe6d623c8f52136034d7234f35dd57aa58f92a2e4694" }, "pipfile-spec": 6, "requires": {}, @@ -63,11 +63,11 @@ }, "astroid": { "hashes": [ - "sha256:21d735aab248253531bb0f1e1e6d068f0ee23533e18ae8a6171ff892b98297cf", - "sha256:cfc35498ee64017be059ceffab0a25bedf7548ab76f2bea691c5565896e7128d" + "sha256:6b0ed1af831570e500e2437625979eaa3b36011f66ddfc4ce930128610258ca9", + "sha256:cd80bf957c49765dce6d92c43163ff9d2abc43132ce64d4b1b47717c6d2522df" ], "markers": "python_version >= '3.6'", - "version": "==2.5.1" + "version": "==2.5.2" }, "async-generator": { "hashes": [ @@ -285,7 +285,7 @@ "sha256:f0b278ce10936db1a37e6954e15a3730bea96a0997c26d7fee88e6c396c2086d", "sha256:f11642dddbb0253cc8853254301b51390ba0081750a8ac03f20ea8103f0c56b6" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4.0'", "version": "==5.5" }, "cycler": { @@ -372,11 +372,11 @@ }, "gitdb": { "hashes": [ - "sha256:91f36bfb1ab7949b3b40e23736db18231bf7593edada2ba5c3a174a7b23657ac", - "sha256:c9e1f2d0db7ddb9a704c2a0217be31214e91a4fe1dea1efad19ae42ba0c285c9" + "sha256:6c4cc71933456991da20917998acbe6cf4fb41eeaab7d6d67fbc05ecd4c865b0", + "sha256:96bf5c08b157a666fec41129e6d327235284cca4c81e92109260f353ba138005" ], "markers": "python_version >= '3.4'", - "version": "==4.0.5" + "version": "==4.0.7" }, "gitpython": { "hashes": [ @@ -394,6 +394,14 @@ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.10" }, + "importlib-metadata": { + "hashes": [ + "sha256:c9db46394197244adf2f0b08ec5bc3cf16757e9590b02af1fca085c16c0d600a", + "sha256:d2d46ef77ffc85cbf7dac7e81dd663fde71c45326131bea8033b9bad42268ebe" + ], + "index": "pypi", + "version": "==3.10.0" + }, "iniconfig": { "hashes": [ "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3", @@ -411,11 +419,11 @@ }, "ipython": { "hashes": [ - "sha256:04323f72d5b85b606330b6d7e2dc8d2683ad46c3905e955aa96ecc7a99388e70", - "sha256:34207ffb2f653bced2bc8e3756c1db86e7d93e44ed049daae9814fed66d408ec" + "sha256:9c900332d4c5a6de534b4befeeb7de44ad0cc42e8327fa41b7685abde58cec74", + "sha256:c0ce02dfaa5f854809ab7413c601c4543846d9da81010258ecdab299b542d199" ], "markers": "python_version >= '3.3'", - "version": "==7.21.0" + "version": "==7.22.0" }, "ipython-genutils": { "hashes": [ @@ -433,11 +441,11 @@ }, "isort": { "hashes": [ - "sha256:c729845434366216d320e936b8ad6f9d681aab72dc7cbc2d51bedc3582f3ad1e", - "sha256:fff4f0c04e1825522ce6949973e83110a6e907750cd92d128b0d14aaaadbffdc" + "sha256:0a943902919f65c5684ac4e0154b1ad4fac6dcaa5d9f3426b732f1c8b5419be6", + "sha256:2bb1680aad211e3c9944dbce1d4ba09a989f04e238296c87fe2139faa26d655d" ], - "markers": "python_version >= '3.6' and python_version < '4'", - "version": "==5.7.0" + "markers": "python_version >= '3.6' and python_version < '4.0'", + "version": "==5.8.0" }, "jedi": { "hashes": [ @@ -541,33 +549,31 @@ }, "lazy-object-proxy": { "hashes": [ - "sha256:1d33d6f789697f401b75ce08e73b1de567b947740f768376631079290118ad39", - "sha256:2f2de8f8ac0be3e40d17730e0600619d35c78c13a099ea91ef7fb4ad944ce694", - "sha256:3782931963dc89e0e9a0ae4348b44762e868ea280e4f8c233b537852a8996ab9", - "sha256:37d9c34b96cca6787fe014aeb651217944a967a5b165e2cacb6b858d2997ab84", - "sha256:38c3865bd220bd983fcaa9aa11462619e84a71233bafd9c880f7b1cb753ca7fa", - "sha256:429c4d1862f3fc37cd56304d880f2eae5bd0da83bdef889f3bd66458aac49128", - "sha256:522b7c94b524389f4a4094c4bf04c2b02228454ddd17c1a9b2801fac1d754871", - "sha256:57fb5c5504ddd45ed420b5b6461a78f58cbb0c1b0cbd9cd5a43ad30a4a3ee4d0", - "sha256:5944a9b95e97de1980c65f03b79b356f30a43de48682b8bdd90aa5089f0ec1f4", - "sha256:6f4e5e68b7af950ed7fdb594b3f19a0014a3ace0fedb86acb896e140ffb24302", - "sha256:71a1ef23f22fa8437974b2d60fedb947c99a957ad625f83f43fd3de70f77f458", - "sha256:8a44e9901c0555f95ac401377032f6e6af66d8fc1fbfad77a7a8b1a826e0b93c", - "sha256:b6577f15d5516d7d209c1a8cde23062c0f10625f19e8dc9fb59268859778d7d7", - "sha256:c8fe2d6ff0ff583784039d0255ea7da076efd08507f2be6f68583b0da32e3afb", - "sha256:cadfa2c2cf54d35d13dc8d231253b7985b97d629ab9ca6e7d672c35539d38163", - "sha256:cd1bdace1a8762534e9a36c073cd54e97d517a17d69a17985961265be6d22847", - "sha256:ddbdcd10eb999d7ab292677f588b658372aadb9a52790f82484a37127a390108", - "sha256:e7273c64bccfd9310e9601b8f4511d84730239516bada26a0c9846c9697617ef", - "sha256:e7428977763150b4cf83255625a80a23dfdc94d43be7791ce90799d446b4e26f", - "sha256:e960e8be509e8d6d618300a6c189555c24efde63e85acaf0b14b2cd1ac743315", - "sha256:ecb5dd5990cec6e7f5c9c1124a37cb2c710c6d69b0c1a5c4aa4b35eba0ada068", - "sha256:ef3f5e288aa57b73b034ce9c1f1ac753d968f9069cd0742d1d69c698a0167166", - "sha256:fa5b2dee0e231fa4ad117be114251bdfe6afe39213bd629d43deb117b6a6c40a", - "sha256:fa7fb7973c622b9e725bee1db569d2c2ee64d2f9a089201c5e8185d482c7352d" - ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", - "version": "==1.5.2" + "sha256:17e0967ba374fc24141738c69736da90e94419338fd4c7c7bef01ee26b339653", + "sha256:1fee665d2638491f4d6e55bd483e15ef21f6c8c2095f235fef72601021e64f61", + "sha256:22ddd618cefe54305df49e4c069fa65715be4ad0e78e8d252a33debf00f6ede2", + "sha256:24a5045889cc2729033b3e604d496c2b6f588c754f7a62027ad4437a7ecc4837", + "sha256:410283732af311b51b837894fa2f24f2c0039aa7f220135192b38fcc42bd43d3", + "sha256:4732c765372bd78a2d6b2150a6e99d00a78ec963375f236979c0626b97ed8e43", + "sha256:489000d368377571c6f982fba6497f2aa13c6d1facc40660963da62f5c379726", + "sha256:4f60460e9f1eb632584c9685bccea152f4ac2130e299784dbaf9fae9f49891b3", + "sha256:5743a5ab42ae40caa8421b320ebf3a998f89c85cdc8376d6b2e00bd12bd1b587", + "sha256:85fb7608121fd5621cc4377a8961d0b32ccf84a7285b4f1d21988b2eae2868e8", + "sha256:9698110e36e2df951c7c36b6729e96429c9c32b3331989ef19976592c5f3c77a", + "sha256:9d397bf41caad3f489e10774667310d73cb9c4258e9aed94b9ec734b34b495fd", + "sha256:b579f8acbf2bdd9ea200b1d5dea36abd93cabf56cf626ab9c744a432e15c815f", + "sha256:b865b01a2e7f96db0c5d12cfea590f98d8c5ba64ad222300d93ce6ff9138bcad", + "sha256:bf34e368e8dd976423396555078def5cfc3039ebc6fc06d1ae2c5a65eebbcde4", + "sha256:c6938967f8528b3668622a9ed3b31d145fab161a32f5891ea7b84f6b790be05b", + "sha256:d1c2676e3d840852a2de7c7d5d76407c772927addff8d742b9808fe0afccebdf", + "sha256:d7124f52f3bd259f510651450e18e0fd081ed82f3c08541dffc7b94b883aa981", + "sha256:d900d949b707778696fdf01036f58c9876a0d8bfe116e8d220cfd4b15f14e741", + "sha256:ebfd274dcd5133e0afae738e6d9da4323c3eb021b3e13052d8cbd0e457b1256e", + "sha256:ed361bb83436f117f9917d282a456f9e5009ea12fd6de8742d1a4752c3017e93", + "sha256:f5144c75445ae3ca2057faac03fda5a902eff196702b0a24daf1d6ce0650514b" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", + "version": "==1.6.0" }, "markupsafe": { "hashes": [ @@ -629,34 +635,28 @@ }, "matplotlib": { "hashes": [ - "sha256:1de0bb6cbfe460725f0e97b88daa8643bcf9571c18ba90bb8e41432aaeca91d6", - "sha256:1e850163579a8936eede29fad41e202b25923a0a8d5ffd08ce50fc0a97dcdc93", - "sha256:215e2a30a2090221a9481db58b770ce56b8ef46f13224ae33afe221b14b24dc1", - "sha256:348e6032f666ffd151b323342f9278b16b95d4a75dfacae84a11d2829a7816ae", - "sha256:3d2eb9c1cc254d0ffa90bc96fde4b6005d09c2228f99dfd493a4219c1af99644", - "sha256:3e477db76c22929e4c6876c44f88d790aacdf3c3f8f3a90cb1975c0bf37825b0", - "sha256:451cc89cb33d6652c509fc6b588dc51c41d7246afdcc29b8624e256b7663ed1f", - "sha256:46b1a60a04e6d884f0250d5cc8dc7bd21a9a96c584a7acdaab44698a44710bab", - "sha256:5f571b92a536206f7958f7cb2d367ff6c9a1fa8229dc35020006e4cdd1ca0acd", - "sha256:672960dd114e342b7c610bf32fb99d14227f29919894388b41553217457ba7ef", - "sha256:7310e353a4a35477c7f032409966920197d7df3e757c7624fd842f3eeb307d3d", - "sha256:746a1df55749629e26af7f977ea426817ca9370ad1569436608dc48d1069b87c", - "sha256:7c155437ae4fd366e2700e2716564d1787700687443de46bcb895fe0f84b761d", - "sha256:9265ae0fb35e29f9b8cc86c2ab0a2e3dcddc4dd9de4b85bf26c0f63fe5c1c2ca", - "sha256:94bdd1d55c20e764d8aea9d471d2ae7a7b2c84445e0fa463f02e20f9730783e1", - "sha256:9a79e5dd7bb797aa611048f5b70588b23c5be05b63eefd8a0d152ac77c4243db", - "sha256:a17f0a10604fac7627ec82820439e7db611722e80c408a726cd00d8c974c2fb3", - "sha256:a1acb72f095f1d58ecc2538ed1b8bca0b57df313b13db36ed34b8cdf1868e674", - "sha256:aa49571d8030ad0b9ac39708ee77bd2a22f87815e12bdee52ecaffece9313ed8", - "sha256:c24c05f645aef776e8b8931cb81e0f1632d229b42b6d216e30836e2e145a2b40", - "sha256:cf3a7e54eff792f0815dbbe9b85df2f13d739289c93d346925554f71d484be78", - "sha256:d738acfdfb65da34c91acbdb56abed46803db39af259b7f194dc96920360dbe4", - "sha256:e15fa23d844d54e7b3b7243afd53b7567ee71c721f592deb0727ee85e668f96a", - "sha256:ed4a9e6dcacba56b17a0a9ac22ae2c72a35b7f0ef0693aa68574f0b2df607a89", - "sha256:f44149a0ef5b4991aaef12a93b8e8d66d6412e762745fea1faa61d98524e0ba9" + "sha256:133469eb5d54a0a963d08a07356d03f6de41b6789f2a9d15aed0e6f3aabbf502", + "sha256:2b54bbce73115f6f95912f57348b2e0fc03cc86a09c73191f1216d79c16cda3c", + "sha256:36e2f68b7d2f22eacc4d9d4dfdf3a975c9db31fa6e36e16a2d60bf4c1ff5a35c", + "sha256:3847ce29a01e1d1f0aa691263e510ce8504a20d158a811ed3a45c4c1d9e708e7", + "sha256:3bcee5685afb76d2a31f8a6b190caf2e52be250d214155b91830110416767de3", + "sha256:3c617fc6f7d6ac0c6142e34f3066520273195c75fb5371eabfddb3da04a75174", + "sha256:4002b0928bcd695eb7f23bf18c52e3cf23501a9c06a1de596079d74932aa4068", + "sha256:424ddb3422c65b284a38a97eb48f5cb64b66a44a773e0c71281a347f1738f146", + "sha256:7571d470cd5df2d6c27ee0e6dabbebd130eae91da19c3749c6946918f8bcad49", + "sha256:7e76956b8dd4bd8a6be71e401e4a24d975e57d5849a80c24a35551040ff82df0", + "sha256:85388289b356f5f19464b84eaa7532cd10d3f701505ae8d988b3dfb1332d785f", + "sha256:85d7b8da66bb71054f3d73210b4fe24cca8afc6f92f00569b2ad24ca32438034", + "sha256:8b046715f710b58dc89241eb3c8e907a30b269e915df6a134bb419f05a6507bf", + "sha256:966a1bb53ce56dcd542b4edb667166aac14c8eaf2a3acd68f403eccedf0d21a7", + "sha256:a2828982c5329cceea67bae0af49e2bfae3471499d6d6aa4359efa0ef491b0f7", + "sha256:a960ee5a139011e1d203df75eafc4e98013927f36ab69510313bc7d9d4641e38", + "sha256:e879b5915f0c8e765d0e1ae4ecf93fafbde4a1dee88409427ac0ca55d31a41a9", + "sha256:fa0f7f3b2a0067ee5806264478f39fa52d7ddf8ee9b3012e5257b2ff39a15e0b", + "sha256:fe4676d7f25d2915562aa551996843e97e7d25aefc54617a3b0fe74a967bc2c8" ], "index": "pypi", - "version": "==3.3.4" + "version": "==3.4.0" }, "mccabe": { "hashes": [ @@ -734,41 +734,41 @@ }, "notebook": { "hashes": [ - "sha256:0464b28e18e7a06cec37e6177546c2322739be07962dd13bf712bcb88361f013", - "sha256:25ad93c982b623441b491e693ef400598d1a46cdf11b8c9c0b3be6c61ebbb6cd" + "sha256:cb271af1e8134e3d6fc6d458bdc79c40cbfc84c1eb036a493f216d58f0880e92", + "sha256:cbc9398d6c81473e9cdb891d2cae9c0d3718fca289dda6d26df5cb660fcadc7d" ], - "markers": "python_version >= '3.5'", - "version": "==6.2.0" + "markers": "python_version >= '3.6'", + "version": "==6.3.0" }, "numpy": { "hashes": [ - "sha256:032be656d89bbf786d743fee11d01ef318b0781281241997558fa7950028dd29", - "sha256:104f5e90b143dbf298361a99ac1af4cf59131218a045ebf4ee5990b83cff5fab", - "sha256:125a0e10ddd99a874fd357bfa1b636cd58deb78ba4a30b5ddb09f645c3512e04", - "sha256:12e4ba5c6420917571f1a5becc9338abbde71dd811ce40b37ba62dec7b39af6d", - "sha256:13adf545732bb23a796914fe5f891a12bd74cf3d2986eed7b7eba2941eea1590", - "sha256:2d7e27442599104ee08f4faed56bb87c55f8b10a5494ac2ead5c98a4b289e61f", - "sha256:3bc63486a870294683980d76ec1e3efc786295ae00128f9ea38e2c6e74d5a60a", - "sha256:3d3087e24e354c18fb35c454026af3ed8997cfd4997765266897c68d724e4845", - "sha256:4ed8e96dc146e12c1c5cdd6fb9fd0757f2ba66048bf94c5126b7efebd12d0090", - "sha256:60759ab15c94dd0e1ed88241fd4fa3312db4e91d2c8f5a2d4cf3863fad83d65b", - "sha256:65410c7f4398a0047eea5cca9b74009ea61178efd78d1be9847fac1d6716ec1e", - "sha256:66b467adfcf628f66ea4ac6430ded0614f5cc06ba530d09571ea404789064adc", - "sha256:7199109fa46277be503393be9250b983f325880766f847885607d9b13848f257", - "sha256:72251e43ac426ff98ea802a931922c79b8d7596480300eb9f1b1e45e0543571e", - "sha256:89e5336f2bec0c726ac7e7cdae181b325a9c0ee24e604704ed830d241c5e47ff", - "sha256:89f937b13b8dd17b0099c7c2e22066883c86ca1575a975f754babc8fbf8d69a9", - "sha256:9c94cab5054bad82a70b2e77741271790304651d584e2cdfe2041488e753863b", - "sha256:9eb551d122fadca7774b97db8a112b77231dcccda8e91a5bc99e79890797175e", - "sha256:a1d7995d1023335e67fb070b2fae6f5968f5be3802b15ad6d79d81ecaa014fe0", - "sha256:ae61f02b84a0211abb56462a3b6cd1e7ec39d466d3160eb4e1da8bf6717cdbeb", - "sha256:b9410c0b6fed4a22554f072a86c361e417f0258838957b78bd063bde2c7f841f", - "sha256:c26287dfc888cf1e65181f39ea75e11f42ffc4f4529e5bd19add57ad458996e2", - "sha256:c91ec9569facd4757ade0888371eced2ecf49e7982ce5634cc2cf4e7331a4b14", - "sha256:ecb5b74c702358cdc21268ff4c37f7466357871f53a30e6f84c686952bef16a9" + "sha256:2428b109306075d89d21135bdd6b785f132a1f5a3260c371cee1fae427e12727", + "sha256:377751954da04d4a6950191b20539066b4e19e3b559d4695399c5e8e3e683bf6", + "sha256:4703b9e937df83f5b6b7447ca5912b5f5f297aba45f91dbbbc63ff9278c7aa98", + "sha256:471c0571d0895c68da309dacee4e95a0811d0a9f9f532a48dc1bea5f3b7ad2b7", + "sha256:61d5b4cf73622e4d0c6b83408a16631b670fc045afd6540679aa35591a17fe6d", + "sha256:6c915ee7dba1071554e70a3664a839fbc033e1d6528199d4621eeaaa5487ccd2", + "sha256:6e51e417d9ae2e7848314994e6fc3832c9d426abce9328cf7571eefceb43e6c9", + "sha256:719656636c48be22c23641859ff2419b27b6bdf844b36a2447cb39caceb00935", + "sha256:780ae5284cb770ade51d4b4a7dce4faa554eb1d88a56d0e8b9f35fca9b0270ff", + "sha256:878922bf5ad7550aa044aa9301d417e2d3ae50f0f577de92051d739ac6096cee", + "sha256:924dc3f83de20437de95a73516f36e09918e9c9c18d5eac520062c49191025fb", + "sha256:97ce8b8ace7d3b9288d88177e66ee75480fb79b9cf745e91ecfe65d91a856042", + "sha256:9c0fab855ae790ca74b27e55240fe4f2a36a364a3f1ebcfd1fb5ac4088f1cec3", + "sha256:9cab23439eb1ebfed1aaec9cd42b7dc50fc96d5cd3147da348d9161f0501ada5", + "sha256:a8e6859913ec8eeef3dbe9aed3bf475347642d1cdd6217c30f28dee8903528e6", + "sha256:aa046527c04688af680217fffac61eec2350ef3f3d7320c07fd33f5c6e7b4d5f", + "sha256:abc81829c4039e7e4c30f7897938fa5d4916a09c2c7eb9b244b7a35ddc9656f4", + "sha256:bad70051de2c50b1a6259a6df1daaafe8c480ca98132da98976d8591c412e737", + "sha256:c73a7975d77f15f7f68dacfb2bca3d3f479f158313642e8ea9058eea06637931", + "sha256:d15007f857d6995db15195217afdbddfcd203dfaa0ba6878a2f580eaf810ecd6", + "sha256:d76061ae5cab49b83a8cf3feacefc2053fac672728802ac137dd8c4123397677", + "sha256:e8e4fbbb7e7634f263c5b0150a629342cc19b47c5eba8d1cd4363ab3455ab576", + "sha256:e9459f40244bb02b2f14f6af0cd0732791d72232bbb0dc4bab57ef88e75f6935", + "sha256:edb1f041a9146dcf02cd7df7187db46ab524b9af2515f392f337c7cbbf5b52cd" ], "markers": "python_version >= '3.7'", - "version": "==1.20.1" + "version": "==1.20.2" }, "packaging": { "hashes": [ @@ -914,11 +914,11 @@ }, "prompt-toolkit": { "hashes": [ - "sha256:4cea7d09e46723885cb8bc54678175453e5071e9449821dce6f017b1d1fbfc1a", - "sha256:9397a7162cf45449147ad6042fa37983a081b8a73363a5253dd4072666333137" + "sha256:bf00f22079f5fadc949f42ae8ff7f05702826a97059ffcc6281036ad40ac6f04", + "sha256:e1b4f11b9336a28fa11810bc623c357420f69dfdb6d2dac41ca2c21a55c033bc" ], "markers": "python_full_version >= '3.6.1'", - "version": "==3.0.17" + "version": "==3.0.18" }, "protobuf": { "hashes": [ @@ -1013,18 +1013,18 @@ }, "pylint": { "hashes": [ - "sha256:0e21d3b80b96740909d77206d741aa3ce0b06b41be375d92e1f3244a274c1f8a", - "sha256:d09b0b07ba06bcdff463958f53f23df25e740ecd81895f7d2699ec04bbd8dc3b" + "sha256:466e067526b609c1f22b97895e2a64e5fc3d897016b91ef0f4f80480e89a1ef9", + "sha256:d29e1140d96362eb0b68fa0fb1a6192532f586886d6c52db79872a906a50be58" ], "index": "pypi", - "version": "==2.7.2" + "version": "==2.7.3" }, "pyparsing": { "hashes": [ "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" ], - "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'", + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.4.7" }, "pyrsistent": { @@ -1047,7 +1047,7 @@ "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.8.1" }, "pytz": { @@ -1158,12 +1158,15 @@ "sha256:3c4f07f47c04e81b134424d53c3f5e16dfd7f494e44fd7584ba9ce9de2c5e6c1", "sha256:4562dcf4793e61c5d0f89836d07bc37521c3a1889da8f651e2c326463c4bd697", "sha256:4ddd2b6f7449a5d539ff754fa92d75da22de261fd8fdcfb3596799fadf255101", + "sha256:54be0a60a5a35005ad69c75902e0f5c9f699db4547ead427e97ef881c3242e6f", + "sha256:5580eba7345a4d3b097be2f067cc71a306c44bab19e8717a30361f279c929bea", "sha256:7b04691eb2f41d2c68dbda8d1bd3cb4ef421bdc43aaa56aeb6c762224552dfb6", "sha256:826b92bf45b8ad80444814e5f4ac032156dd481e48d7da33d611f8fe96d5f08b", "sha256:83b21ff053b1ff1c018a2d24db6dd3ea339b1acfbaa4d9c881731f43748d8b3b", "sha256:8772b99d683be8f67fcc04789032f1b949022a0e6880ee7b75a7ec97dbbb5d0b", "sha256:895dbf2030aa7337649e36a83a007df3c9811396b4e2fa672a851160f36ce90c", "sha256:8aa1b3ac46b80eaa552b637eeadbbce3be5931e4b5002b964698e33a1b589e1e", + "sha256:9599a3f3bf33f73fed0fe06d1dfa4e6081365a58c1c807acb07271be0dce9733", "sha256:99349d77f54e11f962d608d94dfda08f0c9e5720d97132233ebdf35be2858b2d", "sha256:9a24d1ccec2a34d4cd3f2a1f86409f3f5954cc23d4d2270ba0d03cf018aa4780", "sha256:9bed8a1ef133c8e2f13966a542cb8125eac7f4b67dcd234197c827ba9c7dd3e0", @@ -1172,6 +1175,7 @@ "sha256:a0334a1802e64d656022c3bfab56a73fbd6bf4b1298343f3688af2151810bbdf", "sha256:a29460499c1e62b7a830bb57ca42e615375a6ab1bcad053cd25b493588348ea8", "sha256:a36e159a0521e13bbe15ca8c8d038b3a1dd4c7dad18d276d76992e03b92cf643", + "sha256:abe835a851610f87201819cb315f8d554e1a3e8128912783a31e87264ba5ffb7", "sha256:c13ebac42236b1c46397162471ea1c46af68413000e28b9309f8c05722c65a09", "sha256:c3deb3b19dd9806acf00cf0d400e84562c227723013c33abefbbc3cf906596e9", "sha256:c658432d8a20e95398f6bb95ff9731ce9dfa343fdf21eea7ec6a7edfacd4b4d9", @@ -1186,28 +1190,28 @@ }, "scipy": { "hashes": [ - "sha256:0c8a51d33556bf70367452d4d601d1742c0e806cd0194785914daf19775f0e67", - "sha256:0e5b0ccf63155d90da576edd2768b66fb276446c371b73841e3503be1d63fb5d", - "sha256:2481efbb3740977e3c831edfd0bd9867be26387cacf24eb5e366a6a374d3d00d", - "sha256:33d6b7df40d197bdd3049d64e8e680227151673465e5d85723b3b8f6b15a6ced", - "sha256:5da5471aed911fe7e52b86bf9ea32fb55ae93e2f0fac66c32e58897cfb02fa07", - "sha256:5f331eeed0297232d2e6eea51b54e8278ed8bb10b099f69c44e2558c090d06bf", - "sha256:5fa9c6530b1661f1370bcd332a1e62ca7881785cc0f80c0d559b636567fab63c", - "sha256:6725e3fbb47da428794f243864f2297462e9ee448297c93ed1dcbc44335feb78", - "sha256:68cb4c424112cd4be886b4d979c5497fba190714085f46b8ae67a5e4416c32b4", - "sha256:794e768cc5f779736593046c9714e0f3a5940bc6dcc1dba885ad64cbfb28e9f0", - "sha256:83bf7c16245c15bc58ee76c5418e46ea1811edcc2e2b03041b804e46084ab627", - "sha256:8e403a337749ed40af60e537cc4d4c03febddcc56cd26e774c9b1b600a70d3e4", - "sha256:a15a1f3fc0abff33e792d6049161b7795909b40b97c6cc2934ed54384017ab76", - "sha256:a423533c55fec61456dedee7b6ee7dce0bb6bfa395424ea374d25afa262be261", - "sha256:a5193a098ae9f29af283dcf0041f762601faf2e595c0db1da929875b7570353f", - "sha256:bd50daf727f7c195e26f27467c85ce653d41df4358a25b32434a50d8870fc519", - "sha256:c4fceb864890b6168e79b0e714c585dbe2fd4222768ee90bc1aa0f8218691b11", - "sha256:e79570979ccdc3d165456dd62041d9556fb9733b86b4b6d818af7a0afc15f092", - "sha256:f46dd15335e8a320b0fb4685f58b7471702234cba8bb3442b69a3e1dc329c345" + "sha256:03f1fd3574d544456325dae502facdf5c9f81cbfe12808a5e67a737613b7ba8c", + "sha256:0c81ea1a95b4c9e0a8424cf9484b7b8fa7ef57169d7bcc0dfcfc23e3d7c81a12", + "sha256:1fba8a214c89b995e3721670e66f7053da82e7e5d0fe6b31d8e4b19922a9315e", + "sha256:37f4c2fb904c0ba54163e03993ce3544c9c5cde104bcf90614f17d85bdfbb431", + "sha256:50e5bcd9d45262725e652611bb104ac0919fd25ecb78c22f5282afabd0b2e189", + "sha256:6ca1058cb5bd45388041a7c3c11c4b2bd58867ac9db71db912501df77be2c4a4", + "sha256:77f7a057724545b7e097bfdca5c6006bed8580768cd6621bb1330aedf49afba5", + "sha256:816951e73d253a41fa2fd5f956f8e8d9ac94148a9a2039e7db56994520582bf2", + "sha256:96620240b393d155097618bcd6935d7578e85959e55e3105490bbbf2f594c7ad", + "sha256:993c86513272bc84c451349b10ee4376652ab21f312b0554fdee831d593b6c02", + "sha256:adf7cee8e5c92b05f2252af498f77c7214a2296d009fc5478fc432c2f8fb953b", + "sha256:bc52d4d70863141bb7e2f8fd4d98e41d77375606cde50af65f1243ce2d7853e8", + "sha256:c1d3f771c19af00e1a36f749bd0a0690cc64632783383bc68f77587358feb5a4", + "sha256:d744657c27c128e357de2f0fd532c09c84cd6e4933e8232895a872e67059ac37", + "sha256:e3e9742bad925c421d39e699daa8d396c57535582cba90017d17f926b61c1552", + "sha256:e547f84cd52343ac2d56df0ab08d3e9cc202338e7d09fafe286d6c069ddacb31", + "sha256:e89091e6a8e211269e23f049473b2fde0c0e5ae0dd5bd276c3fc91b97da83480", + "sha256:e9da33e21c9bc1b92c20b5328adb13e5f193b924c9b969cd700c8908f315aa59", + "sha256:ffdfb09315896c6e9ac739bb6e13a19255b698c24e6b28314426fd40a1180822" ], "index": "pypi", - "version": "==1.6.1" + "version": "==1.6.2" }, "send2trash": { "hashes": [ @@ -1221,7 +1225,7 @@ "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.15.0" }, "sklearn": { @@ -1240,11 +1244,11 @@ }, "smmap": { "hashes": [ - "sha256:7bfcf367828031dc893530a29cb35eb8c8f2d7c8f2d0989354d75d24c8573714", - "sha256:84c2751ef3072d4f6b2785ec7ee40244c6f45eb934d9e543e2c51f1bd3d54c50" + "sha256:7e65386bd122d45405ddf795637b7f7d2b532e7e401d46bbe3fb49b9986d5182", + "sha256:a9a7479e4c572e2e775c404dcd3080c8dc49f39918c2cf74913d30c4c478e3c2" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==3.0.5" + "markers": "python_version >= '3.5'", + "version": "==4.0.0" }, "spacy": { "hashes": [ @@ -1285,19 +1289,19 @@ }, "streamlit": { "hashes": [ - "sha256:bfe5532d28596e6801de7c5a9ccbbafc55121dca30cd37bd08d3348fda084123", - "sha256:f74b8cfda27a2201a704b54bae39f25cc6c751c442aa5d4700440b1f1e42c71d" + "sha256:35c2c901b5fee15174a0cc03e465e9b13a10f8f411d925c2ca9dd012bdc8ab20", + "sha256:8532aad5a05af08dd48e955fa64bc9fe9e3fb99a4c95514215a597ba56e05121" ], "index": "pypi", - "version": "==0.78.0" + "version": "==0.79.0" }, "terminado": { "hashes": [ - "sha256:261c0b7825fecf629666e1820b484a5380f7e54d6b8bd889fa482e99dcf9bde4", - "sha256:430e876ec9d4d93a4fd8a49e82dcfae0c25f846540d0c5ca774b397533e237e8" + "sha256:9a7dbcfbc2778830eeb70261bf7aa9d98a3eac8631a3afe3febeb57c12f798be", + "sha256:daed77f9fad7b32558fa84b226a76f45a02242c20813502f36c4e1ade6d8f1ad" ], "markers": "python_version >= '3.6'", - "version": "==0.9.3" + "version": "==0.9.4" }, "testpath": { "hashes": [ @@ -1345,7 +1349,7 @@ "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b", "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" ], - "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'", + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==0.10.2" }, "toolz": { @@ -1431,7 +1435,7 @@ "sha256:2f4da4594db7e1e110a944bb1b551fdf4e6c136ad42e4234131391e21eb5b0df", "sha256:e7b021f7241115872f92f43c6508082facffbd1c048e3c6e2bb9c2a157e28937" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4.0'", "version": "==1.26.4" }, "validators": { @@ -1475,6 +1479,14 @@ "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7" ], "version": "==1.12.1" + }, + "zipp": { + "hashes": [ + "sha256:3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76", + "sha256:51cb66cc54621609dd593d1787f286ee42a5c0adbb4b29abea5a63edc3e03098" + ], + "markers": "python_version >= '3.6'", + "version": "==3.4.1" } }, "develop": { @@ -1563,7 +1575,7 @@ "sha256:f0b278ce10936db1a37e6954e15a3730bea96a0997c26d7fee88e6c396c2086d", "sha256:f11642dddbb0253cc8853254301b51390ba0081750a8ac03f20ea8103f0c56b6" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4' and python_version < '4.0'", "version": "==5.5" }, "flake8": { @@ -1636,18 +1648,18 @@ }, "pyflakes": { "hashes": [ - "sha256:910208209dcea632721cb58363d0f72913d9e8cf64dc6f8ae2e02a3609aba40d", - "sha256:e59fd8e750e588358f1b8885e5a4751203a0516e0ee6d34811089ac294c8806f" + "sha256:7893783d01b8a89811dd72d7dfd4d84ff098e5eed95cfa8905b22bbffe52efc3", + "sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==2.3.0" + "version": "==2.3.1" }, "pyparsing": { "hashes": [ "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" ], - "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'", + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.4.7" }, "pytest": { @@ -1717,7 +1729,7 @@ "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b", "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f" ], - "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'", + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==0.10.2" }, "typed-ast": { diff --git a/README.md b/README.md index 97c2586e..b13ba624 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ # GatorMiner [![Build Status](https://travis-ci.com/Allegheny-Ethical-CS/GatorMiner.svg?branch=master)](https://travis-ci.com/Allegheny-Ethical-CS/GatorMiner) - [![codecov](https://codecov.io/gh/Allegheny-Ethical-CS/GatorMiner/branch/master/graph/badge.svg)](https://codecov.io/gh/Allegheny-Ethical-CS/GatorMiner) [![Built with spaCy](https://img.shields.io/badge/built%20with-spaCy-09a3d5.svg)](https://spacy.io) [![Built with Streamlit](https://img.shields.io/badge/built%20with-Streamlit-09a3d5.svg)](https://www.streamlit.io/) +[![Docker Build](https://github.com/BennyWestsyde/GatorMiner/actions/workflows/dockerbuild.yml/badge.svg)](https://github.com/BennyWestsyde/GatorMiner/actions/workflows/dockerbuild.yml) +![Docker Image Version (latest by date)](https://img.shields.io/docker/v/bennywestsyde/gatorminer?label=Last%20Built%20and%20Pushed) An automated text-mining tool written in Python to measure the technical responsibility of students in computer science courses, being used to analyze @@ -74,7 +75,7 @@ Network URL: http://xxx.xxx.x.x:8501 The web interface will be automatically opened in your browser: -![browser](resources/images/landing_page.png) +browser ### Data Retreiving @@ -114,14 +115,14 @@ with GatorGrader [here](https://github.com/enpuyou/script-api-lambda-dynamodb). Once the documents are successfully imported, you can then navigate through the select box in the sidebar to view the text analysis: -![select box](resources/images/select_box.png) +select box ##### Reflection Documents We are using markdown format for the student reflection documents. -Its organized structure allows us to parse and perform text analysis easily. With that -said, there are few requirements for the reflection document before it could be -seamlessly processed and analyzed with GatorMiner. A +Its organized structure allows us to parse and perform text analysis easily. +With that said, there are few requirements for the reflection document before it +could be seamlessly processed and analyzed with GatorMiner. A [template](resources/reflection_template.md) is provided within the repo. Note that the headers with the assignment's and student's ID/name are required. GatorMiner is set in default to take the first header as assignment name and the @@ -133,10 +134,10 @@ format of json reports GatorMiner gathers from AWS. ### Analysis -![frequency](resources/images/frequency.png) -![sentiment](resources/images/sentiment.png) -![similarity](resources/images/similarity.png) -![topic](resources/images/topic.png) +frequency +sentiment +similarity +topic ### Contribution diff --git a/readme_docker.md b/readme_docker.md index 97c1ea39..47f7b222 100644 --- a/readme_docker.md +++ b/readme_docker.md @@ -2,6 +2,7 @@ README File For Running Docker Container ### Mac: ##### Building: +Run ```sh docker_build_mac.sh``` for mac ##### Running: ### Windows: diff --git a/src/summarizer.py b/src/summarizer.py index 8009860a..512d759a 100644 --- a/src/summarizer.py +++ b/src/summarizer.py @@ -1,7 +1,7 @@ """Text summary""" import logging from typing import Dict, List -from gensim.summarization import summarize +from gensim.summarization.summarizer import summarize from . import markdown as md # pylint: disable=logging-fstring-interpolation diff --git a/streamlit_web.py b/streamlit_web.py index 02f207c3..41720487 100644 --- a/streamlit_web.py +++ b/streamlit_web.py @@ -2,7 +2,9 @@ import re +import base64 import numpy as np +import os import pandas as pd from sklearn.manifold import TSNE import spacy @@ -60,8 +62,7 @@ def main(): if debug_mode: st.write(main_df) if analysis_mode == "Home": - with open("README.md") as readme_file: - st.markdown(readme_file.read()) + readme() else: if analysis_mode == "Frequency Analysis": st.title(analysis_mode) @@ -83,13 +84,26 @@ def main(): interactive() success_msg.empty() +def readme(): + """function to load and configurate readme source""" + + with open("README.md") as readme_file: + readme_src = readme_file.read() + for file in os.listdir("resources/images"): + if file.endswith(".png"): + img_path = f"resources/images/{file}" + with open(img_path, "rb") as f: + img_bin = base64.b64encode(f.read()).decode() + readme_src = readme_src.replace(img_path, f"data:image/png;base64,{img_bin}") + + st.markdown(readme_src, unsafe_allow_html=True) def landing_pg(): """landing page""" landing = st.sidebar.selectbox("Welcome", ["Home", "Interactive"]) + if landing == "Home": - with open("README.md") as readme_file: - st.markdown(readme_file.read()) + readme() else: interactive() @@ -120,8 +134,7 @@ def retreive_data(data_retreive): except TypeError: st.sidebar.warning( "No data imported. Please check the reflection document input") - with open("README.md") as readme_file: - st.markdown(readme_file.read()) + readme() else: global success_msg success_msg = None @@ -157,8 +170,7 @@ def import_data(data_retreive_method, paths): json_lst.append(md.collect_md(path)) except FileNotFoundError as err: st.sidebar.text(err) - with open("README.md") as readme_file: - st.markdown(readme_file.read()) + readme() else: passbuild = st.sidebar.checkbox( "Only retreive build success records", value=True) @@ -169,8 +181,7 @@ def import_data(data_retreive_method, paths): json_lst.append(ju.clean_report(response)) except (EnvironmentError, Exception) as err: st.sidebar.error(err) - with open("README.md") as readme_file: - st.markdown(readme_file.read()) + readme() # when data is retreived if json_lst: raw_df = pd.DataFrame() diff --git a/tests/test_markdown.py b/tests/test_markdown.py index 361735a0..547203c1 100644 --- a/tests/test_markdown.py +++ b/tests/test_markdown.py @@ -22,7 +22,8 @@ def test_get_file_names(tmp_path): para_2.write_text("text") output = md.get_file_names(directory) expected = [f"{directory}/hello.md", f"{directory}/world.md"] - assert expected == output + assert expected[0] in output + assert expected[1] in output def test_md_parser(): From 9a8bfeb96e02ebf8fc91fcea7aebb6da0eaaed35 Mon Sep 17 00:00:00 2001 From: Tommy Antle Date: Tue, 6 Apr 2021 22:40:16 -0400 Subject: [PATCH 09/30] Add documentation for docker run commands in main README --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index b13ba624..6151095b 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,20 @@ pipenv run python -m spacy download en_core_web_sm pipenv run python -m spacy download en_core_web_md ``` +Alternatively, run a Docker container with all necessary dependencies and Spacy models installed. + +Run the Docker container for Mac: + +```bash +sh docker_run_mac.sh +``` + +Run the Docker container for Windows: + +```bash +sh docker_run_win.sh +``` + ## Web Interface GatorMiner is mainly developed on its web interface with [Streamlit](https://www.streamlit.io) From c41fb002483ca521b2955589aa519e86b9d69e2a Mon Sep 17 00:00:00 2001 From: Baileymatrascia Date: Wed, 7 Apr 2021 00:59:42 -0400 Subject: [PATCH 10/30] docker.readme --- readme_docker.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/readme_docker.md b/readme_docker.md index 47f7b222..409f3e7a 100644 --- a/readme_docker.md +++ b/readme_docker.md @@ -1,14 +1,16 @@ README File For Running Docker Container +The Docker Container contains all of the necessary dependencies and Spacey models already installed +therefore Gator Miner can be run without downloading everything locally on your machine. + +Run the code below to utilize the Docker Container + ### Mac: -##### Building: +##### Building: Run ```sh docker_build_mac.sh``` for mac ##### Running: ### Windows: ##### Building: -##### Running: - -### Linux: -##### Building: +Run ``` sh docker_run_win.sh ``` for windows ##### Running: From 8cf6ab69f7315a594e631706e0553d78ef9fca91 Mon Sep 17 00:00:00 2001 From: enpuyou Date: Wed, 7 Apr 2021 04:08:36 -0400 Subject: [PATCH 11/30] Merge docker fork to docker branch (#81) * Edited README.md and streamlit_web.py to include images that are located in README in streamlit website * Replaced with open(README.md) methods with landing_pg() * Change to summarizer * Change pipenv command to only install from lock * Specify with Python in Github Action * Specify python verson in pipenv command * Add id to setup python and remove manual pipenv install * Specify gensim to 3.8.3 * Modify test to clarify what to compare * Remove python 3.6 * Update the recommend version to 3.7 * Fixed error with multiple sidebars * Use landing page if no input found * Show readme in the home page * pushing to check something * pushing again to check if it passes on travis * another push to check if build works :) * amother push change line 41 * editing html like 76 * different img format * fixing image links in readme.md * didnt work because imgs were gone * fixing mdl rules * edited readme file line length (121) * fixed .mdlrc * Changed the streamlit version in Pipfile * Update main.yml * testing * Update main.yml * test 3 * Delete main.yml * Create main.yml * Update main.yml * Update main.yml * Update main.yml * Update README.md * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Update main.yml * Add files via upload * Delete main.yml * Uodated README file * Fixed Readme * Update README.md * Update README.md * Update dockerbuild.yml * Update dockerbuild.yml * Update dockerbuild.yml * Cleaned up Dockerfile * Possible fix * Possible fix pt.2 * Changing OS from 20.04 to latest * Change get-pip.py location * added watchdog to pip install * Move docker script to scripts * Update dockerfile with python image * Add development command * Update action script * Fix reference bug * Use gatorminer as image name * Replace image name with repo name * Replace with repo owner + gatorminer * Convert organization name to lowercase * Change set-env to GITHUB_ENV * Remove redundant repo name Co-authored-by: Nathan Loria Co-authored-by: zoe Co-authored-by: Michael Ceccarelli Co-authored-by: Noor Buchi <55197145+noorbuchi@users.noreply.github.com> Co-authored-by: Bennett Westfall <54713181+BennyWestsyde@users.noreply.github.com> Co-authored-by: BennyWestsyde --- .github/workflows/docker-build.yml | 37 ++++++ Dockerfile | 116 ++++++++++-------- docker_run_mac.sh | 3 - readme_docker.md | 8 ++ .../docker_build.bat | 0 .../docker_build.sh | 0 docker_run_win.bat => scripts/docker_run.bat | 0 scripts/docker_run.sh | 4 + 8 files changed, 115 insertions(+), 53 deletions(-) create mode 100644 .github/workflows/docker-build.yml delete mode 100644 docker_run_mac.sh rename docker_build_win.bat => scripts/docker_build.bat (100%) rename docker_build_mac.sh => scripts/docker_build.sh (100%) rename docker_run_win.bat => scripts/docker_run.bat (100%) create mode 100644 scripts/docker_run.sh diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 00000000..c18477af --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,37 @@ +name: Docker Build + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%m-%d-%Y')" + + - name: Login to DockerHub + if: github.ref == 'refs/heads/master' + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Convert Github Organization to Lowercase + run: echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: true + tags: ${{ env.IMAGE_REPOSITORY }}:${{steps.date.outputs.date}} + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/Dockerfile b/Dockerfile index fa9bb321..c6196612 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,57 +1,73 @@ -FROM ubuntu:20.04 +# Python 3.8 +FROM python:3.8 + +EXPOSE 8501 + SHELL ["/bin/bash", "--login", "-c"] -LABEL version="latest" + +LABEL version="0.1.0" + LABEL description="An automated text-mining tool written in Python to measure \ the technical responsibility of students in computer science courses, being \ used to analyze students' markdown reflection documents and five questions \ survey based on Natural Language Processing in the Department of Computer \ Science at Allegheny College." + LABEL maintainer="Group 5" -ENV LANG C.UTF-8 -ENV LANGUAGE C.UTF-8 -ENV LC_ALL C.UTF-8 -RUN groupadd -r student && \ - useradd -m -r -g student -d /home/student -s /usr/sbin/nologin -c "student User" student && \ - mkdir -p /home/student/workdir && \ - chown -R student:student /home/student -COPY . /home/student/GATORMINER/ -USER root -RUN apt-get -y -qq update -RUN apt-get install -y make build-essential python3-distutils python3-dev libssl-dev zlib1g-dev \ - libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \ - libncursesw5-dev xz-utils libffi-dev liblzma-dev python-openssl git curl file -ENV HOME /home/student -WORKDIR /home/student/GATORMINER -VOLUME ["/home/student/GATORMINER"] -RUN curl https://pyenv.run | bash -ENV PATH="$HOME/.pyenv/bin:${PATH}" -RUN export PATH="$HOME/.pyenv/bin:${PATH}" -RUN echo 'alias python="python3.9"' >> ~/.profile -RUN echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc -RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc -RUN echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc -RUN /bin/bash -c "source ~/.bashrc" -RUN /bin/bash -c "source ~/.profile" -RUN pyenv install 3.9.2 -RUN pyenv global 3.9.2 -RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py -SHELL ["/bin/bash", "--login", "-c"] -LABEL version="0.1" -LABEL description="An automated text-mining tool written in Python to measure \ - the technical responsibility of students in computer science courses, being \ - used to analyze students' markdown reflection documents and five questions \ - survey based on Natural Language Processing in the Department of Computer \ - Science at Allegheny College." -LABEL maintainer="Group 5" -RUN /bin/bash --login -RUN pyenv local 3.9.2 -RUN pyenv exec python get-pip.py -RUN pyenv exec python -m pip install pipenv -RUN pyenv exec pipenv run python -m pip install Cython wheel setuptools -#==========This is where the issues start=========== -RUN pyenv exec pipenv install --skip-lock --dev -#^^^Last Build Time > 1003.9s before crash -RUN pyenv exec pipenv run spacy download en_core_web_sm -USER student -ENV USER student -CMD pyenv exec pipenv run streamlit run streamlit_web.py \ No newline at end of file + +# ENV LANG C.UTF-8 +# ENV LANGUAGE C.UTF-8 +# # ENV LC_ALL C.UTF-8 +# RUN groupadd -r student && \ +# useradd -m -r -g student -d /home/student -s /usr/sbin/nologin -c "student User" student && \ +# mkdir -p /home/student/workdir && \ +# chown -R student:student /home/student +# COPY . /home/student/GATORMINER/ + +COPY . /gatorminer + +WORKDIR /gatorminer + +RUN set -e && echo "Installing Pipenv..." \ + && pip install pipenv \ + && echo "Installing dependencies..." \ + && pipenv install --dev --skip-lock \ + && echo "Installing SpaCy models..." \ + && pipenv run python -m spacy download en_core_web_sm \ + && pipenv run python -m spacy download en_core_web_md + +# USER root + +# RUN apt-get -y -qq update +# RUN apt-get install -y make build-essential python3-distutils python3-dev libssl-dev zlib1g-dev \ +# libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \ +# libncursesw5-dev xz-utils libffi-dev liblzma-dev python-openssl git curl file +# ENV HOME /home/student +# WORKDIR /home/student/GATORMINER +# VOLUME ["/home/student/GATORMINER"] + +# VOLUME = /src/ +# RUN curl https://pyenv.run | bash +# ENV PATH="$HOME/.pyenv/bin:${PATH}" +# RUN export PATH="$HOME/.pyenv/bin:${PATH}" +# RUN echo 'alias python="python3.9"' >> ~/.profile +# RUN echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc +# RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc +# RUN echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc +# RUN /bin/bash -c "source ~/.bashrc" +# RUN /bin/bash -c "source ~/.profile" +# RUN pyenv install 3.9.2 +# RUN pyenv global 3.9.2 +# RUN pyenv local 3.9.2 +# RUN /bin/bash --login +# RUN curl https://bootstrap.pypa.io/get-pip.py -o ~/get-pip.py +# RUN pyenv exec python ~/get-pip.py +# RUN pyenv exec python -m pip install pipenv +# RUN pyenv exec pipenv run python -m pip install Cython wheel setuptools watchdog +# RUN pyenv exec pipenv install --skip-lock --dev +# RUN pyenv exec pipenv run spacy download en_core_web_sm +# USER student +# ENV USER student +# CMD pyenv exec pipenv run streamlit run streamlit_web.py + +CMD ["pipenv", "run", "streamlit", "run", "streamlit_web.py"] diff --git a/docker_run_mac.sh b/docker_run_mac.sh deleted file mode 100644 index 300e6b05..00000000 --- a/docker_run_mac.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -printf "\n[+] (Mac) Running Docker Container" -docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "\n\tYou can now view your Streamlit app in your browser.\n\n\tNetwork URL: http://localhost:8501 \n\tExternal URL: http://141.195.4.17:8501" diff --git a/readme_docker.md b/readme_docker.md index 409f3e7a..fa10e33c 100644 --- a/readme_docker.md +++ b/readme_docker.md @@ -6,11 +6,19 @@ therefore Gator Miner can be run without downloading everything locally on your Run the code below to utilize the Docker Container ### Mac: + ##### Building: Run ```sh docker_build_mac.sh``` for mac ##### Running: +##### Development command + +```sh +docker run -it -v "$(pwd):/gatorminer" -d -p 8080:8501 gatorminer +``` + ### Windows: + ##### Building: Run ``` sh docker_run_win.sh ``` for windows ##### Running: diff --git a/docker_build_win.bat b/scripts/docker_build.bat similarity index 100% rename from docker_build_win.bat rename to scripts/docker_build.bat diff --git a/docker_build_mac.sh b/scripts/docker_build.sh similarity index 100% rename from docker_build_mac.sh rename to scripts/docker_build.sh diff --git a/docker_run_win.bat b/scripts/docker_run.bat similarity index 100% rename from docker_run_win.bat rename to scripts/docker_run.bat diff --git a/scripts/docker_run.sh b/scripts/docker_run.sh new file mode 100644 index 00000000..5e372d07 --- /dev/null +++ b/scripts/docker_run.sh @@ -0,0 +1,4 @@ +#!/bin/bash +# printf "\n[+] (Mac) Running Docker Container" +# docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "\n\tYou can now view your Streamlit app in your browser.\n\n\tNetwork URL: http://localhost:8501 \n\tExternal URL: http://141.195.4.17:8501" +docker run -it -d -p 8080:8501 gatorminer From bb723ac60300e40e59565431856f169a6c732d64 Mon Sep 17 00:00:00 2001 From: hancea <54713697+ahance27@users.noreply.github.com> Date: Wed, 7 Apr 2021 12:06:46 -0400 Subject: [PATCH 12/30] Correction to readme docker windows build --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6151095b..733f13c7 100644 --- a/README.md +++ b/README.md @@ -62,8 +62,8 @@ sh docker_run_mac.sh Run the Docker container for Windows: -```bash -sh docker_run_win.sh +``` +docker_run_win.bat ``` ## Web Interface From 3fc1413e6a0293c5a62576b61067ef0c947af42a Mon Sep 17 00:00:00 2001 From: Tommy Antle Date: Wed, 7 Apr 2021 15:41:11 -0400 Subject: [PATCH 13/30] Delete dockerbuild file --- .github/workflows/dockerbuild.yml | 37 ------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 .github/workflows/dockerbuild.yml diff --git a/.github/workflows/dockerbuild.yml b/.github/workflows/dockerbuild.yml deleted file mode 100644 index 1e32aa27..00000000 --- a/.github/workflows/dockerbuild.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Docker Build - -on: - schedule: - - cron: "*/60 */24 * * 0" - push: - branches: - - 'master' - pull_request: - branches: - - master - -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Get current date - id: date - run: echo "::set-output name=date::$(date +'%m-%d-%Y')" - - - name: Login to DockerHub - if: github.ref == 'refs/heads/master' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - version: ${{steps.date.outputs.date}} - push: true - tags: bennywestsyde/gatorminer:${{steps.date.outputs.date}} - - - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} From 266579471bf6b6dfb2930286f4d38b1731e53e1a Mon Sep 17 00:00:00 2001 From: Tommy Antle Date: Wed, 7 Apr 2021 15:47:01 -0400 Subject: [PATCH 14/30] Change test.yml to main.yml --- .github/workflows/{test.yml => main.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{test.yml => main.yml} (100%) diff --git a/.github/workflows/test.yml b/.github/workflows/main.yml similarity index 100% rename from .github/workflows/test.yml rename to .github/workflows/main.yml From b17c006564535765ce8ce661850f99726ef990c7 Mon Sep 17 00:00:00 2001 From: BennyWestsyde Date: Thu, 8 Apr 2021 14:08:40 -0400 Subject: [PATCH 15/30] Fixed Dockerfile from fork --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c6196612..3a95aecd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ # Python 3.8 -FROM python:3.8 +FROM python:3.9 EXPOSE 8501 -SHELL ["/bin/bash", "--login", "-c"] +# SHELL ["/bin/bash", "--login", "-c"] LABEL version="0.1.0" From 5f79d587c1ac0407fc4abd15f45aa5b8e1256ed0 Mon Sep 17 00:00:00 2001 From: enpuyou Date: Wed, 14 Apr 2021 02:44:23 -0400 Subject: [PATCH 16/30] Fix path cuased by change of scipt names --- readme_docker.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/readme_docker.md b/readme_docker.md index fa10e33c..f8534f35 100644 --- a/readme_docker.md +++ b/readme_docker.md @@ -8,9 +8,13 @@ Run the code below to utilize the Docker Container ### Mac: ##### Building: -Run ```sh docker_build_mac.sh``` for mac + +Run ```sh scripts/docker_build.sh``` for mac + ##### Running: +Run ```sh scripts/docker_run.sh``` for mac + ##### Development command ```sh @@ -20,5 +24,9 @@ docker run -it -v "$(pwd):/gatorminer" -d -p 8080:8501 gatorminer ### Windows: ##### Building: -Run ``` sh docker_run_win.sh ``` for windows + +Run ``` sh scripts/docker_build.bat``` for windows + ##### Running: + +Run ``` sh scripts/docker_run.bat``` for windows From 2bf6c8b8ae60ae6974e6cd9838ee28882556892b Mon Sep 17 00:00:00 2001 From: enpuyou Date: Wed, 14 Apr 2021 02:46:16 -0400 Subject: [PATCH 17/30] Fix path in README due to file name changed --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 733f13c7..19557748 100644 --- a/README.md +++ b/README.md @@ -57,13 +57,13 @@ Alternatively, run a Docker container with all necessary dependencies and Spacy Run the Docker container for Mac: ```bash -sh docker_run_mac.sh +sh scripts/docker_run.sh ``` Run the Docker container for Windows: -``` -docker_run_win.bat +```bash +sh scripts/docker_run.bat ``` ## Web Interface From 8afb1276498ee7bdfa25e08f8d896584b09190ca Mon Sep 17 00:00:00 2001 From: enpuyou Date: Wed, 14 Apr 2021 02:46:27 -0400 Subject: [PATCH 18/30] Comment out the local image run commad --- scripts/docker_run.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/docker_run.sh b/scripts/docker_run.sh index 5e372d07..496cb7f7 100644 --- a/scripts/docker_run.sh +++ b/scripts/docker_run.sh @@ -1,4 +1,6 @@ #!/bin/bash -# printf "\n[+] (Mac) Running Docker Container" -# docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "\n\tYou can now view your Streamlit app in your browser.\n\n\tNetwork URL: http://localhost:8501 \n\tExternal URL: http://141.195.4.17:8501" -docker run -it -d -p 8080:8501 gatorminer +printf "\n[+] (Mac) Running Docker Container" +docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "\n\tYou can now view your Streamlit app in your browser.\n\n\tNetwork URL: http://localhost:8501 \n\tExternal URL: http://141.195.4.17:8501" + +# Run gatorminer container from the local image +# docker run -it -d -p 8080:8501 gatorminer From 75e210084cebb0cf2ee73cf7318badffe1f5ee9f Mon Sep 17 00:00:00 2001 From: enpuyou Date: Wed, 14 Apr 2021 03:03:48 -0400 Subject: [PATCH 19/30] Change port to 8501 --- scripts/docker_run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docker_run.sh b/scripts/docker_run.sh index 496cb7f7..d3aecb91 100644 --- a/scripts/docker_run.sh +++ b/scripts/docker_run.sh @@ -3,4 +3,4 @@ printf "\n[+] (Mac) Running Docker Container" docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "\n\tYou can now view your Streamlit app in your browser.\n\n\tNetwork URL: http://localhost:8501 \n\tExternal URL: http://141.195.4.17:8501" # Run gatorminer container from the local image -# docker run -it -d -p 8080:8501 gatorminer +# docker run -it -d -p 8501:8501 gatorminer From 5c4ad249b9af9c10c75fcd0ac5e9c110c131ff1b Mon Sep 17 00:00:00 2001 From: ahance27 Date: Wed, 14 Apr 2021 15:53:21 -0400 Subject: [PATCH 20/30] Correction to Python Version Comment --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3a95aecd..53d91b82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# Python 3.8 +# Python Version 3.9 FROM python:3.9 EXPOSE 8501 From e627698086054c01f8a4a7e266ea9c8aa9304774 Mon Sep 17 00:00:00 2001 From: ahance27 Date: Wed, 14 Apr 2021 15:54:51 -0400 Subject: [PATCH 21/30] Removed unnecessary comment --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 53d91b82..b547e712 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,6 @@ FROM python:3.9 EXPOSE 8501 -# SHELL ["/bin/bash", "--login", "-c"] - LABEL version="0.1.0" LABEL description="An automated text-mining tool written in Python to measure \ From b1fbce88213386af81a1902a9652d48349e1c88f Mon Sep 17 00:00:00 2001 From: Tommy Antle Date: Wed, 14 Apr 2021 15:55:46 -0400 Subject: [PATCH 22/30] Change maintainer names --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b547e712..2688ca9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ LABEL description="An automated text-mining tool written in Python to measure \ survey based on Natural Language Processing in the Department of Computer \ Science at Allegheny College." -LABEL maintainer="Group 5" +LABEL maintainer="Bennett Westfall, Andre Hance, Thomas Antle, Bailey Mastrascia" # ENV LANG C.UTF-8 # ENV LANGUAGE C.UTF-8 From 209193125df3a8c9cbc6579b7b66ab95c779e5ba Mon Sep 17 00:00:00 2001 From: ahance27 Date: Wed, 14 Apr 2021 16:00:52 -0400 Subject: [PATCH 23/30] Corrections and Deletions to dockerfile --- Dockerfile | 9 --------- 1 file changed, 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2688ca9e..cf59f90e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,15 +13,6 @@ LABEL description="An automated text-mining tool written in Python to measure \ LABEL maintainer="Bennett Westfall, Andre Hance, Thomas Antle, Bailey Mastrascia" -# ENV LANG C.UTF-8 -# ENV LANGUAGE C.UTF-8 -# # ENV LC_ALL C.UTF-8 -# RUN groupadd -r student && \ -# useradd -m -r -g student -d /home/student -s /usr/sbin/nologin -c "student User" student && \ -# mkdir -p /home/student/workdir && \ -# chown -R student:student /home/student -# COPY . /home/student/GATORMINER/ - COPY . /gatorminer WORKDIR /gatorminer From 1dfddc0d85db3206928a61b61d240d3a98d9bfbf Mon Sep 17 00:00:00 2001 From: Tommy Antle Date: Wed, 14 Apr 2021 16:02:04 -0400 Subject: [PATCH 24/30] Delete comment --- Dockerfile | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/Dockerfile b/Dockerfile index cf59f90e..98f9fd8a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,38 +25,4 @@ RUN set -e && echo "Installing Pipenv..." \ && pipenv run python -m spacy download en_core_web_sm \ && pipenv run python -m spacy download en_core_web_md -# USER root - -# RUN apt-get -y -qq update -# RUN apt-get install -y make build-essential python3-distutils python3-dev libssl-dev zlib1g-dev \ -# libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \ -# libncursesw5-dev xz-utils libffi-dev liblzma-dev python-openssl git curl file -# ENV HOME /home/student -# WORKDIR /home/student/GATORMINER -# VOLUME ["/home/student/GATORMINER"] - -# VOLUME = /src/ -# RUN curl https://pyenv.run | bash -# ENV PATH="$HOME/.pyenv/bin:${PATH}" -# RUN export PATH="$HOME/.pyenv/bin:${PATH}" -# RUN echo 'alias python="python3.9"' >> ~/.profile -# RUN echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc -# RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc -# RUN echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc -# RUN /bin/bash -c "source ~/.bashrc" -# RUN /bin/bash -c "source ~/.profile" -# RUN pyenv install 3.9.2 -# RUN pyenv global 3.9.2 -# RUN pyenv local 3.9.2 -# RUN /bin/bash --login -# RUN curl https://bootstrap.pypa.io/get-pip.py -o ~/get-pip.py -# RUN pyenv exec python ~/get-pip.py -# RUN pyenv exec python -m pip install pipenv -# RUN pyenv exec pipenv run python -m pip install Cython wheel setuptools watchdog -# RUN pyenv exec pipenv install --skip-lock --dev -# RUN pyenv exec pipenv run spacy download en_core_web_sm -# USER student -# ENV USER student -# CMD pyenv exec pipenv run streamlit run streamlit_web.py - CMD ["pipenv", "run", "streamlit", "run", "streamlit_web.py"] From 20eb7533e50f69f9ffac726bd71038fed6b6d64c Mon Sep 17 00:00:00 2001 From: ahance27 Date: Wed, 14 Apr 2021 16:05:37 -0400 Subject: [PATCH 25/30] Changes made regarding "EXPOSE 8501" Command --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 98f9fd8a..40af1f62 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,6 @@ # Python Version 3.9 FROM python:3.9 -EXPOSE 8501 - LABEL version="0.1.0" LABEL description="An automated text-mining tool written in Python to measure \ @@ -26,3 +24,5 @@ RUN set -e && echo "Installing Pipenv..." \ && pipenv run python -m spacy download en_core_web_md CMD ["pipenv", "run", "streamlit", "run", "streamlit_web.py"] + +EXPOSE 8501 From 7a1576787abd188035256b15765bc34b1f715dc4 Mon Sep 17 00:00:00 2001 From: ahance27 Date: Wed, 14 Apr 2021 16:32:05 -0400 Subject: [PATCH 26/30] Numpy deletion in pipfile --- Pipfile | 1 - docker_build.bat | 2 ++ docker_run.bat | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 docker_build.bat create mode 100644 docker_run.bat diff --git a/Pipfile b/Pipfile index 175ed3f0..b6031dff 100644 --- a/Pipfile +++ b/Pipfile @@ -10,7 +10,6 @@ pytest = "*" pytest-cov = "*" [packages] -numpy = "~=1.20.2" matplotlib = "*" gensim = "~=3.8.3" spacy = "~=2.3" diff --git a/docker_build.bat b/docker_build.bat new file mode 100644 index 00000000..af175b8e --- /dev/null +++ b/docker_build.bat @@ -0,0 +1,2 @@ +@echo [+] (Win_OS) Building Docker Container. +docker build -t gatorminer . diff --git a/docker_run.bat b/docker_run.bat new file mode 100644 index 00000000..bc565322 --- /dev/null +++ b/docker_run.bat @@ -0,0 +1,2 @@ +@echo [+] (Win_OS) Running Docker Container. +docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "\n\tYou can now view your Streamlit app in your browser.\n\n\tNetwork URL: http://localhost:8501 \n\tExternal URL: http://141.195.4.17:8501" \ No newline at end of file From ac3c45a42fa545cb704dd9882e15c5de93ab073a Mon Sep 17 00:00:00 2001 From: ahance27 Date: Wed, 14 Apr 2021 16:35:49 -0400 Subject: [PATCH 27/30] Added mac scripts to main folder --- docker_build.sh | 3 +++ docker_run.sh | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 docker_build.sh create mode 100644 docker_run.sh diff --git a/docker_build.sh b/docker_build.sh new file mode 100644 index 00000000..71399d50 --- /dev/null +++ b/docker_build.sh @@ -0,0 +1,3 @@ +#!/bin/bash +printf "\n[+] (Mac) Building Docker Container" +docker build -t gatorminer . diff --git a/docker_run.sh b/docker_run.sh new file mode 100644 index 00000000..d3aecb91 --- /dev/null +++ b/docker_run.sh @@ -0,0 +1,6 @@ +#!/bin/bash +printf "\n[+] (Mac) Running Docker Container" +docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "\n\tYou can now view your Streamlit app in your browser.\n\n\tNetwork URL: http://localhost:8501 \n\tExternal URL: http://141.195.4.17:8501" + +# Run gatorminer container from the local image +# docker run -it -d -p 8501:8501 gatorminer From ee5bd899bfb966f659b68644b9a73c5eaf84024f Mon Sep 17 00:00:00 2001 From: ahance27 Date: Wed, 14 Apr 2021 16:39:01 -0400 Subject: [PATCH 28/30] Deleted docker scripts folder, scripts now in main folder --- scripts/docker_build.bat | 2 -- scripts/docker_build.sh | 3 --- scripts/docker_run.bat | 2 -- scripts/docker_run.sh | 6 ------ 4 files changed, 13 deletions(-) delete mode 100644 scripts/docker_build.bat delete mode 100644 scripts/docker_build.sh delete mode 100644 scripts/docker_run.bat delete mode 100644 scripts/docker_run.sh diff --git a/scripts/docker_build.bat b/scripts/docker_build.bat deleted file mode 100644 index af175b8e..00000000 --- a/scripts/docker_build.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo [+] (Win_OS) Building Docker Container. -docker build -t gatorminer . diff --git a/scripts/docker_build.sh b/scripts/docker_build.sh deleted file mode 100644 index 71399d50..00000000 --- a/scripts/docker_build.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -printf "\n[+] (Mac) Building Docker Container" -docker build -t gatorminer . diff --git a/scripts/docker_run.bat b/scripts/docker_run.bat deleted file mode 100644 index bc565322..00000000 --- a/scripts/docker_run.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo [+] (Win_OS) Running Docker Container. -docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "\n\tYou can now view your Streamlit app in your browser.\n\n\tNetwork URL: http://localhost:8501 \n\tExternal URL: http://141.195.4.17:8501" \ No newline at end of file diff --git a/scripts/docker_run.sh b/scripts/docker_run.sh deleted file mode 100644 index d3aecb91..00000000 --- a/scripts/docker_run.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -printf "\n[+] (Mac) Running Docker Container" -docker container run --name devi -d -p 8501:8501 bennywestsyde/gatorminer && echo "\n\tYou can now view your Streamlit app in your browser.\n\n\tNetwork URL: http://localhost:8501 \n\tExternal URL: http://141.195.4.17:8501" - -# Run gatorminer container from the local image -# docker run -it -d -p 8501:8501 gatorminer From 21bf78b1e6f244c35939736173f8b3cf0f6323cd Mon Sep 17 00:00:00 2001 From: Tommy Antle <55158626+antlet@users.noreply.github.com> Date: Wed, 21 Apr 2021 11:07:31 -0400 Subject: [PATCH 29/30] Delete readme_docker.md --- readme_docker.md | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 readme_docker.md diff --git a/readme_docker.md b/readme_docker.md deleted file mode 100644 index f8534f35..00000000 --- a/readme_docker.md +++ /dev/null @@ -1,32 +0,0 @@ -README File For Running Docker Container - -The Docker Container contains all of the necessary dependencies and Spacey models already installed -therefore Gator Miner can be run without downloading everything locally on your machine. - -Run the code below to utilize the Docker Container - -### Mac: - -##### Building: - -Run ```sh scripts/docker_build.sh``` for mac - -##### Running: - -Run ```sh scripts/docker_run.sh``` for mac - -##### Development command - -```sh -docker run -it -v "$(pwd):/gatorminer" -d -p 8080:8501 gatorminer -``` - -### Windows: - -##### Building: - -Run ``` sh scripts/docker_build.bat``` for windows - -##### Running: - -Run ``` sh scripts/docker_run.bat``` for windows From 01ed6463efc0d667add0386c83bf52f1414e8f12 Mon Sep 17 00:00:00 2001 From: Bennett Westfall <54713181+BennyWestsyde@users.noreply.github.com> Date: Wed, 28 Apr 2021 09:33:22 -0400 Subject: [PATCH 30/30] Delete docker-build.yml This GitHub Build Action required that the Repository's owner add two secrets to the secrets tab of the security section. These secrets were never added so the workflow would always fail. So it is being removed in order to make sure that our grade for GitHub Actions CI Build Status is maximized. --- .github/workflows/docker-build.yml | 37 ------------------------------ 1 file changed, 37 deletions(-) delete mode 100644 .github/workflows/docker-build.yml diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml deleted file mode 100644 index c18477af..00000000 --- a/.github/workflows/docker-build.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Docker Build - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Get current date - id: date - run: echo "::set-output name=date::$(date +'%m-%d-%Y')" - - - name: Login to DockerHub - if: github.ref == 'refs/heads/master' - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Convert Github Organization to Lowercase - run: echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV - - - name: Build and push - id: docker_build - uses: docker/build-push-action@v2 - with: - push: true - tags: ${{ env.IMAGE_REPOSITORY }}:${{steps.date.outputs.date}} - - - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }}