Skip to content

Conversation

@tiagolv
Copy link
Collaborator

@tiagolv tiagolv commented May 22, 2025

Refactored code, added documentation ,updated readme, better CI/CD pipelin, new webpage with documentation and new links

Teste de linting nos ficheiros atuais do yake
testes gerais
refatorização inicial do programa principal
criado workflow para verificar resultados
atualização resultados.yml
atualizado resultados.yml
atualizado status
adicionados ficheiros originais para comparações
Removidos ficheiros originais, pois estavam a interferir com o score do teste pylint
só falta refatorar variáveis, reconstruir métodos e documentação
@tiagolv tiagolv requested review from Copilot and rncampos May 22, 2025 20:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the repository by removing legacy Docker setups and demos, and introduces improved documentation, a Makefile for common tasks, and enhanced CI/CD pipelines.

  • Removed outdated Dockerfiles, REST API example, and demo application
  • Overhauled README with new installation and usage instructions
  • Added Makefile and GitHub Actions workflows for install, lint, test, format, and deployment

Reviewed Changes

Copilot reviewed 155 out of 155 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
docker/Dockerfiles/yake/Dockerfile Removed legacy YAKE CLI Dockerfile
demo/streamlit_app.py Deleted demo Streamlit application
README.md Revamped installation, usage, and documentation
Makefile Added Makefile for build/test/format/lint tasks
.github/workflows/deploy.yml New deployment workflow for GitHub Pages

Comment on lines +17 to +23
uv pip install git+https://github.com/LIAAD/yake
```
*Example text from Wikipedia*

<a name="rest-api-image"></a>
### Option 2. REST API Server in a Docker container

This install will provide you a mirror of the original REST API of YAKE! available [here](https://boiling-castle-88317.herokuapp.com).
or

```bash
docker run -p 5000:5000 -d liaad/yake-server:latest
```

After it starts up, the container will run in the background, at http://127.0.0.1:5000. To access the YAKE! API documentation, go to http://127.0.0.1:5000/apidocs/.

You can test the RESTful API using `curl`:

```bash
curl -X POST "http://localhost:5000/yake/" -H "accept: application/json" -H "Content-Type: application/json" \
-d @- <<'EOF'
{
"language": "en",
"max_ngram_size": 3,
"number_of_keywords": 10,
"text": "Sources tell us that Google is acquiring Kaggle, a platform that hosts data science and machine learning competitions. Details about the transaction remain somewhat vague , but given that Google is hosting its Cloud Next conference in San Francisco this week, the official announcement could come as early as tomorrow. Reached by phone, Kaggle co-founder CEO Anthony Goldbloom declined to deny that the acquisition is happening. Google itself declined 'to comment on rumors'. Kaggle, which has about half a million data scientists on its platform, was founded by Goldbloom and Ben Hamner in 2010. The service got an early start and even though it has a few competitors like DrivenData, TopCoder and HackerRank, it has managed to stay well ahead of them by focusing on its specific niche. The service is basically the de facto home for running data science and machine learning competitions. With Kaggle, Google is buying one of the largest and most active communities for data scientists ..."
}
EOF
```
*Example text from Wikipedia*

<a name="standalone-installation"></a>
### Option 3. Standalone Installation (for development or integration)

#### Requirements

Python3

#### Installation

To install Yake using pip:

``` bash
pip install git+https://github.com/LIAAD/yake
uv pip install yake
Copy link

Copilot AI May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command prefix uv is unclear. If this is not an alias defined elsewhere, consider replacing it with a standard pip install invocation or documenting the alias.

Copilot uses AI. Check for mistakes.
Comment on lines +17 to +23
uv pip install git+https://github.com/LIAAD/yake
```
*Example text from Wikipedia*

<a name="rest-api-image"></a>
### Option 2. REST API Server in a Docker container

This install will provide you a mirror of the original REST API of YAKE! available [here](https://boiling-castle-88317.herokuapp.com).
or

```bash
docker run -p 5000:5000 -d liaad/yake-server:latest
```

After it starts up, the container will run in the background, at http://127.0.0.1:5000. To access the YAKE! API documentation, go to http://127.0.0.1:5000/apidocs/.

You can test the RESTful API using `curl`:

```bash
curl -X POST "http://localhost:5000/yake/" -H "accept: application/json" -H "Content-Type: application/json" \
-d @- <<'EOF'
{
"language": "en",
"max_ngram_size": 3,
"number_of_keywords": 10,
"text": "Sources tell us that Google is acquiring Kaggle, a platform that hosts data science and machine learning competitions. Details about the transaction remain somewhat vague , but given that Google is hosting its Cloud Next conference in San Francisco this week, the official announcement could come as early as tomorrow. Reached by phone, Kaggle co-founder CEO Anthony Goldbloom declined to deny that the acquisition is happening. Google itself declined 'to comment on rumors'. Kaggle, which has about half a million data scientists on its platform, was founded by Goldbloom and Ben Hamner in 2010. The service got an early start and even though it has a few competitors like DrivenData, TopCoder and HackerRank, it has managed to stay well ahead of them by focusing on its specific niche. The service is basically the de facto home for running data science and machine learning competitions. With Kaggle, Google is buying one of the largest and most active communities for data scientists ..."
}
EOF
```
*Example text from Wikipedia*

<a name="standalone-installation"></a>
### Option 3. Standalone Installation (for development or integration)

#### Requirements

Python3

#### Installation

To install Yake using pip:

``` bash
pip install git+https://github.com/LIAAD/yake
uv pip install yake
Copy link

Copilot AI May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to above, the uv prefix is ambiguous to users. Update to pip install yake or explain what uv refers to in this context.

Copilot uses AI. Check for mistakes.
--help Show this message and exit.
```
Dont know which Deduplication function to use, see more [here](https://tiagolv.github.io/yakerf/docs/-getting-started#keyword-deduplication-methods)
Copy link

Copilot AI May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: Dont should be Don't (with an apostrophe).

Suggested change
Dont know which Deduplication function to use, see more [here](https://tiagolv.github.io/yakerf/docs/-getting-started#keyword-deduplication-methods)
Don't know which Deduplication function to use, see more [here](https://tiagolv.github.io/yakerf/docs/-getting-started#keyword-deduplication-methods)

Copilot uses AI. Check for mistakes.
on:
push:
branches:
- core-seperation # ou master, dependendo da sua branch principal
Copy link

Copilot AI May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misspelling: core-seperation should be core-separation.

Suggested change
- core-seperation # ou master, dependendo da sua branch principal
- core-separation # ou master, dependendo da sua branch principal

Copilot uses AI. Check for mistakes.
Comment on lines +2 to +18
uv pip install --upgrade pip
uv pip install -e .

install-dev:
uv pip install --upgrade pip
uv pip install -e ".[dev]"

test:
uv run pytest -vv --cov=yake test_*.py

format:
uv run black .

lint:
uv run ruff check --fix .
uv run ruff check .
uv run flake8 yake/
Copy link

Copilot AI May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The uv prefix is not a standard command; consider using python -m pip install --upgrade pip or explain uv if it's an alias.

Suggested change
uv pip install --upgrade pip
uv pip install -e .
install-dev:
uv pip install --upgrade pip
uv pip install -e ".[dev]"
test:
uv run pytest -vv --cov=yake test_*.py
format:
uv run black .
lint:
uv run ruff check --fix .
uv run ruff check .
uv run flake8 yake/
python -m pip install --upgrade pip
python -m pip install -e .
install-dev:
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
test:
pytest -vv --cov=yake test_*.py
format:
black .
lint:
ruff check --fix .
ruff check .
flake8 yake/

Copilot uses AI. Check for mistakes.
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
Copy link

Copilot AI May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Referencing the master branch in an action version is unstable. It’s recommended to pin to a specific version or tag (e.g., actions/checkout@v3).

Suggested change
- uses: actions/checkout@master
- uses: actions/checkout@v3

Copilot uses AI. Check for mistakes.
@tiagolv tiagolv closed this May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant