Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
7538f33
Create CONTRIBUTING.md
BraindeadHermit Aug 14, 2023
f8030af
Update CONTRIBUTING.md
BraindeadHermit Aug 14, 2023
5e64276
add reverse engineering files
xrenegade100 Aug 18, 2023
03f7135
remove .idea
xrenegade100 Aug 18, 2023
ec31d7a
docs: upload reverse engineering document
xrenegade100 Aug 19, 2023
7bc177f
test: add vscode and pytest configs
xrenegade100 Aug 21, 2023
0dabdd9
test: add unit tests for src.nlp.related_terms
xrenegade100 Aug 21, 2023
af817d6
fix: ignore IDEAL input files
BraindeadHermit Aug 22, 2023
8ca43af
fix: ignore IDEAL input files
BraindeadHermit Aug 22, 2023
e0c4347
test: add unit tests for src.common.util
BraindeadHermit Aug 22, 2023
abb8ae3
test: add more unit tests (nlp)
xrenegade100 Aug 22, 2023
480eea3
test: fixed some flakinesses in util test
xrenegade100 Aug 23, 2023
1c270f2
test: add unit tests for src.service.factory
antgioia Aug 23, 2023
17b1550
test: add unit tests for src.common.error_handler
BraindeadHermit Aug 24, 2023
5ac15cd
test: add unit tests for src.service.parser
antgioia Aug 24, 2023
ccb6684
test: fixed some flakinesses in parser test
antgioia Aug 25, 2023
9e5b9f9
test: delete two test case from parser test
antgioia Aug 25, 2023
0bda89a
test: add missing unit tests
xrenegade100 Aug 25, 2023
af9b65e
fix: create better unit tests for src.common.error_handler
BraindeadHermit Aug 26, 2023
b642bd0
Merge branch 'test/unit-testing' of https://github.com/xrenegade100/P…
BraindeadHermit Aug 26, 2023
e06c2ec
test: rework directory structure
xrenegade100 Aug 28, 2023
efdf8aa
test: delete not mocked test cases
xrenegade100 Aug 28, 2023
8744934
test: resolve code smells by SonarCloud
antgioia Aug 29, 2023
5d1bbac
test: add tests for src.common.util_parsing.py
BraindeadHermit Aug 30, 2023
88f6593
doc: add documentation comments to error_handler and util tests files
BraindeadHermit Aug 30, 2023
2686e9b
test: fix minor code issues, adjust documentation
xrenegade100 Aug 30, 2023
0f832dd
test: impl unit tests (#14)
xrenegade100 Aug 30, 2023
6a61b64
test: fix typo in test name
xrenegade100 Aug 31, 2023
d6f2bb3
test: add integration tests for src.nlp
xrenegade100 Sep 1, 2023
3946a17
test: add dockerfile
xrenegade100 Sep 3, 2023
9b29bd1
fix: remove recommended packages installation
xrenegade100 Sep 4, 2023
aa4eded
test: add integration tests for src.common.util.config_setting
BraindeadHermit Sep 4, 2023
adbb943
test: add integration tests for src.nlp
xrenegade100 Sep 1, 2023
783f774
test: add integration tests for src.common.util.config_setting
BraindeadHermit Sep 4, 2023
32c0da9
fix: delete no install recommends tag
antgioia Sep 5, 2023
d88e24b
test: add integration tests for src.common.testing_list.py
BraindeadHermit Sep 6, 2023
a27a913
test: add integration tests for src.common.testing_list.py
BraindeadHermit Sep 6, 2023
c4e2332
test: add integration tests for src.common.util.read_input
BraindeadHermit Sep 6, 2023
6312795
test: resolve code smells by SonarCloud
antgioia Sep 6, 2023
bcc852e
test: add tests for src.nlp.term_list
xrenegade100 Sep 6, 2023
c154b92
test: add more unit tests for src.nlp.pos_tag
antgioia Sep 6, 2023
2621bd6
test: add .coveragerc and conftest.py
xrenegade100 Sep 6, 2023
058eaf2
test: add integration tests for src.common.types_list.py
BraindeadHermit Sep 8, 2023
4656a38
test: add integration tests for src.common.types_list.py
BraindeadHermit Sep 8, 2023
9e0660a
fix: resolve merge conflicts
BraindeadHermit Sep 8, 2023
8b05c85
test: add unit tests for src.common.types_list.py
BraindeadHermit Sep 8, 2023
bb37855
test: add integration tests for external processes
xrenegade100 Sep 8, 2023
9182cb8
test: refactor with autopep8
xrenegade100 Sep 8, 2023
0dd70fa
Merge branch 'master' into test/it-tests
xrenegade100 Sep 8, 2023
6bebc2a
test: fix code smells
xrenegade100 Sep 8, 2023
dcd9a4e
test: fix test_pos_tag import issues
xrenegade100 Sep 8, 2023
5f96c4c
docs: rename docs folder and upload test-report
xrenegade100 Sep 9, 2023
32c8faf
fix: test issues
BraindeadHermit Sep 17, 2023
3b6f813
feat: add test automation
BraindeadHermit Sep 17, 2023
46d8ec8
fix: test that have to fail tag
BraindeadHermit Sep 17, 2023
c60ed77
fix: sonar cloud smells
BraindeadHermit Sep 17, 2023
867612f
docs: add documentation for src.nlp
xrenegade100 Sep 9, 2023
53291ad
docs: add documentation for src.service
antgioia Sep 9, 2023
a4ad835
docs: add documentation for src.common
antgioia Sep 9, 2023
88dd995
docs: fix type of element list in src.common
antgioia Sep 10, 2023
43bbc0e
docs: add documentation for src.common
antgioia Sep 17, 2023
35904bc
[test] resolve test smells (#34)
BraindeadHermit Sep 19, 2023
9d2291b
docs: add workflow status badge to README (#39)
xrenegade100 Sep 19, 2023
8b9d26e
docs: add documentation comments for src.model (#38)
xrenegade100 Sep 19, 2023
62b21b6
ci: codecov action (#36)
BraindeadHermit Sep 22, 2023
4733ec8
ci: update test workflow and README (#46)
xrenegade100 Sep 23, 2023
a369058
fix: update srcml spawn command for linux
xrenegade100 Sep 22, 2023
dbbe6f1
fix: update expected regex from stanford's jar
xrenegade100 Sep 23, 2023
ae404d6
fix: remove unwanted print calls
xrenegade100 Sep 23, 2023
f2da4ea
refactor: remove code smells in nlp.related_terms
xrenegade100 Sep 24, 2023
2268bd9
refactor: src.testing_list.py
BraindeadHermit Sep 24, 2023
b5d7fb3
refactor: src.common.types_list.py
BraindeadHermit Sep 24, 2023
9a682ab
fix: delate no more existing parameter value passing
BraindeadHermit Sep 24, 2023
8b56b29
refactor: src.common.util, src.common.util_parsing
BraindeadHermit Sep 24, 2023
ad45351
fix: raise an axception
BraindeadHermit Sep 24, 2023
6894080
fix: wrong exception
BraindeadHermit Sep 24, 2023
9aacb60
refactor: ereditariety of the linguistic antipattern roules
BraindeadHermit Sep 25, 2023
c8686f4
fix: correct module import
BraindeadHermit Sep 26, 2023
d6a3931
refactor: src.model.issue
BraindeadHermit Sep 26, 2023
593315a
refactor: src.rule
BraindeadHermit Sep 26, 2023
ed4a078
fix: change self to super
BraindeadHermit Sep 26, 2023
0c0e999
refactor: fix minor code smells and type issues
xrenegade100 Sep 26, 2023
0094e99
refactor: fix minor code smells
xrenegade100 Sep 26, 2023
a7e3c22
refactor: not used variable code smell
BraindeadHermit Sep 27, 2023
ed37969
fix: remove override superfluous annotation
BraindeadHermit Sep 27, 2023
236119c
refactor: expecting_not_getting_collection
xrenegade100 Sep 27, 2023
fb35030
refactor: remove unused imports
xrenegade100 Sep 27, 2023
320766c
refactor: fix minor code smells in rules files
xrenegade100 Sep 27, 2023
ee0fd46
fix: remove abstract classes hierarchy
xrenegade100 Sep 28, 2023
1c4a404
refactor: remove commented code
xrenegade100 Sep 28, 2023
08ee2c8
refactor: minor code cleaning
xrenegade100 Sep 30, 2023
3a55a41
feat: python entities models
xrenegade100 Oct 2, 2023
2b7fbdf
feat: download model and make prediction
BraindeadHermit Oct 2, 2023
5b4daa3
feat: add python parser
xrenegade100 Oct 2, 2023
9deb50d
test: src.service.parser
BraindeadHermit Oct 3, 2023
66c47eb
feat: impl python analysis with model
xrenegade100 Oct 3, 2023
887a734
fix: rename method names to predict source code
xrenegade100 Oct 3, 2023
39dd400
refactor: delate reduntant code
BraindeadHermit Oct 3, 2023
3c7da3f
fix: change method name in tests
BraindeadHermit Oct 3, 2023
d280172
fix: method name in test assert
BraindeadHermit Oct 3, 2023
160f291
test: add more test cases for src.service.parser.PythonParser
BraindeadHermit Oct 4, 2023
163f981
fix: src.classifier.Classifier code smells
BraindeadHermit Oct 4, 2023
dc2d670
feat: add dockerfile for run analysis
antgioia Oct 4, 2023
f096a4c
ci: test action changes
BraindeadHermit Oct 5, 2023
3256af9
fix: fix code smells and github action
BraindeadHermit Oct 5, 2023
ed499b1
fix: rule file imports
BraindeadHermit Oct 5, 2023
4521feb
fix: test files
BraindeadHermit Oct 5, 2023
bd8f8f6
fix: delate Parent class extention
BraindeadHermit Oct 5, 2023
048dc24
docs: update README.md
antgioia Oct 5, 2023
a6b8614
fix: constructor call from parent
BraindeadHermit Oct 5, 2023
eef8b34
ci: change testing dir
BraindeadHermit Oct 5, 2023
a0e6da8
docs: fix img url
antgioia Oct 5, 2023
1d97fdb
ci: run tests
BraindeadHermit Oct 5, 2023
0505e94
ci: run tests
BraindeadHermit Oct 5, 2023
5717a27
fix: docker import
BraindeadHermit Oct 5, 2023
8af704c
fix: fix size of model downloading
antgioia Oct 5, 2023
01a3ae3
docs: updated test report
xrenegade100 Oct 6, 2023
d6e5b37
feat: add system testing
BraindeadHermit Oct 6, 2023
0ccc4d2
fix: add delated pytest.ini import in docker the file
BraindeadHermit Oct 6, 2023
22f4e1e
test: add a system test
BraindeadHermit Oct 6, 2023
197dc38
docs: upload project documentation (#71)
xrenegade100 Oct 6, 2023
a5040e9
docs: delete test report from root (#72)
antgioia Oct 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[run]
omit =
src/apps/*
src/rule/*
src/model/*
*/__init__.py
39 changes: 39 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: 🚀 IDEAL | test / cov

on:
push:
branches:
- master
pull_request:
branches:
- master
- dev

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . -t ideal
- name: 🧪 Run Tests in Docker Container
run: docker run -t -w /app ideal pytest
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: coverage.json

cov:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download a single artifact
uses: actions/download-artifact@v3
- name: 📤 Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ coverage.xml
.pytest_cache/
cover/

# IDEAL Input Files
IDEAL_Results.csv
IDEAL_Results.xlsx

# Greet
.greet

# Translations
*.mo
*.pot
Expand Down Expand Up @@ -226,3 +233,4 @@ dmypy.json
# Cython debug symbols
cython_debug/

coverage.json
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

10 changes: 0 additions & 10 deletions .idea/ProjectSunshine.iml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

4 changes: 0 additions & 4 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"[python]": {
"editor.defaultFormatter": "ms-python.autopep8",
"editor.formatOnSave": true
}
}
74 changes: 74 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# IDEAL | CONTRIBUTING

## Commits

We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history
We follow specs described by [Conventional Commits](https://www.conventionalcommits.org/).

The following is taken from https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines

### Commit Message Format

Each commit message consists of a `header`, a `body` and a `footer`. The header has a special format that includes a `type` and a `subject`:
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier to read on GitHub as well as in various git tools.

```
<type>: <summary>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```

### Header

The **header** is mandatory and the **scope** of the header must be omitted if the change is common among the packages, otherwise it's mandatory. Use the summary field to provide a succinct description of the change:

```
<type>: <short summary>
│ │
│ └─⫸ Summary in present tense. Not capitalized. No period at the end.
└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test
```

#### Summary

- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize the first letter
- no dot (.) at the end

#### Type

Must be one of the following:

- build: Changes that affect the build system or external dependencies
- ci: Changes to our CI configuration files and scripts
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- test: Adding missing tests or correcting existing tests

### Body

The **body** is mandatory for all commits except for those of type "docs". When the body is present it must be at least 20 characters long and must conform to the Commit Message Body format.
**Just as in the summary, use the imperative, present tense: "fix" not "fixed" nor "fixes".**
Explain the motivation for the change in the commit message body. This commit message should explain why you are making the change. You can include a comparison of the previous behavior with the new behavior in order to illustrate the impact of the change.

### Footer

The footer is optional. The footer should contain a [closing reference to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) if any. (e.g. Fixes #<issue-number>)

[Samples](https://github.com/angular/angular/commits/master)

## Branches

New branches must follow this format for their names: `<type>/<description>`

- `type` refer to the one described in the Commits section.
- `description` must be a word representing the changes happening in the branch, with less than 10 characters.
71 changes: 51 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,57 @@
# syntax=docker/dockerfile:1

FROM python:3.7

MAINTAINER Anthony Peruma "axp6201@rit.edu"

RUN mkdir app
FROM ubuntu:22.04
COPY --from=openjdk:8-jre-slim /usr/local/openjdk-8 /usr/local/openjdk-8
ENV JAVA_HOME /usr/local/openjdk-8
RUN update-alternatives --install /usr/bin/java java /usr/local/openjdk-8/bin/java 1

# Install dependencies and needed executables
RUN apt-get update && apt-get install -y --no-install-recommends \
software-properties-common gpg gpg-agent git wget unzip \
build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev \
libsqlite3-dev libreadline-dev libffi-dev \
libbz2-dev libarchive13 libcurl4-openssl-dev \
# install python3.7
&& add-apt-repository ppa:deadsnakes/ppa \
&& apt-get install -y python3.7 \
# install srcml and stanford tagger
&& wget --progress=dot:giga http://131.123.42.38/lmcrs/v1.0.0/srcml_1.0.0-1_ubuntu20.04.deb \
&& wget --progress=dot:giga https://nlp.stanford.edu/software/stanford-tagger-4.2.0.zip \
&& unzip stanford-tagger-4.2.0.zip -d stanford \
&& rm stanford-tagger-4.2.0.zip \
# install libssl1.1 for srcml
&& wget --progress=dot:giga http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb \
&& dpkg -i ./libssl1.1_1.1.1f-1ubuntu2_amd64.deb \
&& apt update \
&& apt-get install -y --no-install-recommends libssl1.1 \
&& dpkg -i ./srcml_1.0.0-1_ubuntu20.04.deb \
&& apt install -f --no-install-recommends \
&& rm srcml_1.0.0-1_ubuntu20.04.deb \
# install pip
&& apt-get install -y python3-pip \
&& pip install --upgrade pip \
&& mkdir /app \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# copy source files into container
COPY test /app/test
COPY pytest.ini /app/pytest.ini
COPY src /app/src/
COPY requirements.txt /app/requirements.txt
COPY definitions.py /app/definitions.py

WORKDIR /app

RUN mkdir app

WORKDIR /app/app

COPY requirements.txt .

RUN pip3 install -r requirements.txt

COPY src/ .

WORKDIR /app
#
RUN pip --no-cache-dir install -r requirements.txt \
&& echo "import nltk" > download_nltk.py \
&& echo "nltk.download('wordnet')" >> download_nltk.py \
&& echo "nltk.download('punkt')" >> download_nltk.py \
&& echo "nltk.download('stopwords')" >> download_nltk.py \
&& echo "quit()" >> download_nltk.py \
&& python3 download_nltk.py \
&& rm download_nltk.py

ENV PYTHONPATH /app/
WORKDIR /app/src/apps/IDEAL/

CMD ["python", "app/main.py"]
CMD ["/bin/sh", "/app/src/apps/IDEAL/run.sh"]

Loading