-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from kumparan/feature/update-model-and-fix-vul…
…nerabilities-library feature/update model and fix vulnerabilities library
- Loading branch information
Showing
7 changed files
with
1,330 additions
and
42 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,46 @@ | ||
name: python | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install Poetry | ||
run: | | ||
pip install poetry==1.8.2 | ||
- name: Install dependencies | ||
run: | | ||
poetry config virtualenvs.create false && poetry install | ||
python -m nltk.downloader punkt | ||
- name: Vulnerabilities checker | ||
run: | | ||
poetry export --without-hashes --format=requirements.txt > requirements.txt | ||
poetry run pip-audit -r requirements.txt | ||
- name: Build package | ||
run: | | ||
poetry build | ||
- name: Verify dist directory | ||
run: | | ||
ls -l dist | ||
- name: Install built package | ||
run: | | ||
pip install dist/*.whl | ||
- name: Run tests | ||
run: | | ||
make test |
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,9 @@ | ||
run-formatter: | ||
isort . | ||
black . | ||
.PHONY: run-formatter | ||
|
||
# Run test | ||
test: | ||
pytest | ||
.PHONY: test |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,32 @@ | ||
[tool.poetry] | ||
name = "nlp-id" | ||
version = "0.1.16.0" | ||
description = "Kumparan's NLP Services" | ||
authors = ["Zavli Juwantara <[email protected]>"] | ||
repository = "https://github.com/kumparan/NLP-ID" | ||
maintainers = [ | ||
"Frandy Eddy <[email protected]>", | ||
"Dhanang Hadhi Sasmita <[email protected]>", | ||
"Aslam Hadi H<[email protected]>", | ||
"Ghefira Nur Fatimah Widyasari<[email protected]>" | ||
] | ||
license = "MIT" | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.9,<3.12" | ||
scikit-learn = "1.5.1" | ||
nltk = "3.8.1" | ||
wget = "3.2" | ||
huggingface-hub = "0.23.4" | ||
|
||
|
||
[tool.poetry.group.dev.dependencies] | ||
pytest = "8.2.2" | ||
pip-audit = "2.7.3" | ||
black = "24.4.2" | ||
isort = "5.13.2" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" |