-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(workflows): Add Required Workflows for Build, Code Quality and C…
…ompatibility Signed-off-by: Kaushlendra Pratap <[email protected]>
- Loading branch information
1 parent
70d0624
commit a069b2e
Showing
7 changed files
with
169 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# SPDX-FileCopyrightText: © 2021 Siemens AG | ||
# SPDX-FileCopyrightText: © Kaushlendra Pratap Singh <[email protected]> | ||
# | ||
#SPDX-License-Identifier: LGPL-2.1-only | ||
|
||
name: Build Tests | ||
|
||
on: | ||
pull_request: | ||
branches:[main] | ||
|
||
jobs: | ||
build: | ||
name: Build Test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install build tools | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel | ||
- name: Build package | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
working-directory: ./Safaa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# SPDX-FileCopyrightText: © 2021 Siemens AG | ||
# SPDX-FileCopyrightText: © Kaushlendra Pratap Singh <[email protected]> | ||
# | ||
#SPDX-License-Identifier: LGPL-2.1-only | ||
name: Code Quality | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
lint: | ||
name: Run flake8 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
architecture: 'x64' | ||
|
||
- name: Install flake8 | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 | ||
- name: Run flake8 | ||
run: | | ||
flake8 --max-line-length=120 . | ||
working-directory: ./Safaa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# SPDX-FileCopyrightText: © 2021 Siemens AG | ||
# SPDX-FileCopyrightText: © Kaushlendra Pratap Singh <[email protected]> | ||
# | ||
#SPDX-License-Identifier: LGPL-2.1-only | ||
|
||
name: Compatibility Tests | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
name: Test on Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
## Allowed Python versions https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md#python | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' # caching pip dependencies | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python setup.py install | ||
working-directory: ./Safaa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,37 +7,44 @@ | |
|
||
here = path.dirname(path.abspath(path.dirname(__file__))) | ||
# fetch the long description from the README.md | ||
with open(path.join(here, 'README.md'), encoding='utf-8') as f: | ||
with open(path.join(here, "README.md"), encoding="utf-8") as f: | ||
long_description = f.read() | ||
|
||
setup( | ||
name='safaa', | ||
version='0.0.1', | ||
url='https://github.com/fossology/safaa', | ||
author='Abdelrahman Jamal', | ||
author_email='[email protected]', | ||
name="safaa", | ||
version="0.0.1", | ||
url="https://github.com/fossology/safaa", | ||
author="Abdelrahman Jamal", | ||
author_email="[email protected]", | ||
description="""Created as a part of the 2023 Google Summer of Code project: | ||
Reducing Fossology\'s False Positive Copyrights, the purpose is to be able | ||
to predict whether a given copyright output from the Fossology software | ||
is a false positive or not. It is also able to remove extra | ||
text from a copyright notice.""", | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
packages=find_packages(where='src', ), | ||
long_description_content_type="text/markdown", | ||
packages=find_packages( | ||
where="src", | ||
), | ||
package_dir={"": "src"}, | ||
install_requires=[ | ||
'spacy>=3.0.0', | ||
'joblib>=1.0.0', | ||
'pandas>=1.1.0', | ||
'scikit-learn>=1.3.0', | ||
"spacy>=3.0.0", | ||
"joblib>=1.0.0", | ||
"pandas>=1.1.0", | ||
"scikit-learn>=1.3.0", | ||
], | ||
classifiers=[ | ||
'Programming Language :: Python :: 3', | ||
'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)', | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)", | ||
], | ||
include_package_data=True, | ||
include_dirs=[], | ||
package_data={'': ['src/safaa/models/*.pkl', 'src/safaa/models/*.', | ||
'src/safaa/configs/*']}, | ||
python_requires='>=3.6', | ||
package_data={ | ||
"": [ | ||
"src/safaa/models/*.pkl", | ||
"src/safaa/models/*.", | ||
"src/safaa/configs/*", | ||
] | ||
}, | ||
python_requires=">=3.6", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
Safaa/src/safaa/models/false_positive_detection_model_sgd.pkl.license
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# SPDX-FileCopyrightText: © 2021 Siemens AG | ||
# SPDX-FileCopyrightText: © Kaushlendra Pratap Singh <[email protected]> | ||
# | ||
#SPDX-License-Identifier: LGPL-2.1-only |