-
Notifications
You must be signed in to change notification settings - Fork 247
Yake Refactored .2 #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
119 commits
Select commit
Hold shift + click to select a range
5f28658
Create super-linter.yml
tiagolv 0e13bc5
Create pylint.yml
tiagolv ceef896
atualização das imagens das dockers
tiagolv e35fb82
yake.py 60%
tiagolv f678242
Create resultados.yml
tiagolv 729d101
Update resultados.yml
tiagolv de7bd0f
Update resultados.yml
tiagolv d179ba3
pyint espaços + atualização de status
tiagolv 522d95a
link code testes
tiagolv bb9c340
Levenshtein refatorização inicial
tiagolv 79315a7
clip.py - initial refactoring
tiagolv ecddac4
removidos ficheiros originais
tiagolv 3d7c317
cli.py atualizado
tiagolv 956bb97
trailing whitespaces
tiagolv cf3ef99
highlight refatorização inicial
tiagolv 2aadc64
highlight.py lines
tiagolv 56b48b2
highlight.py docstrings
tiagolv 9a13e29
datarepresentation.py formatação inicial
tiagolv d4cfd88
datarepresentatio 40%
tiagolv 8755e64
datarepresentation linting
tiagolv df183c7
datarepresentation 70%
tiagolv cf59a6b
variaveis
tiagolv b8cdb5c
+ variables
tiagolv f8672e3
25/02/2025 acabado
tiagolv f4bd1ed
teste yake.py métodos
tiagolv 0a3a482
yake.py métodos e atributos distribuidos
tiagolv 116a82e
yake.py 100% Refactored and optimized
tiagolv 36b4a08
separação de métodos highlight.py
tiagolv 33d692f
documentação beta highlight.py
tiagolv b25cc10
+ documentação
tiagolv 86149c4
highlights.py 90% + documentação
tiagolv 1baf343
highlight.py criação de dicioários
tiagolv c13a7e4
07/03/2025 fim
tiagolv 75288ef
Update yakenew.md
tiagolv c56b001
actions files
tiagolv 8130fdc
Create Makefile
tiagolv 68b0e94
Update requirements.txt
tiagolv 245407e
actions mais abrangentes
tiagolv 80b2a4e
Update requirements.txt
tiagolv ef22f31
Update Makefile
tiagolv d935bd1
Update Makefile
tiagolv bfa5191
dicionários e sesepararção final de argumentos e métodos
tiagolv 9cfe7bf
continuação do ultimo commit
tiagolv 12f2789
dicionarios compativeis e teste de novas classes
tiagolv f2bf058
Update Makefile
tiagolv a1c4d8d
datarepresentation lint
tiagolv c530cac
extensão das novas classes de contexto
tiagolv 226003d
teste de nova classes de contexto
tiagolv 98b5907
datarep new approach
tiagolv 28a08d7
datarep
tiagolv 7f175c7
estruta mais simples
tiagolv 463276b
voltada a usar datarep com menos complexidade temporal
tiagolv 60a1824
datarepresentation refactored 100%
tiagolv 78f947b
-DOCCKER files - rest api expirada
tiagolv c678e9c
updated ymls
tiagolv 4d3fec2
docs-sites inicio
tiagolv dab8c21
data-site setup finished
tiagolv 044e726
Adiciona versão estática para GitHub Pages
tiagolv 46b62f1
docs site estatico
tiagolv b01fa15
style
tiagolv 771f4ca
cortes e organização de repositório
tiagolv 6c2c99b
workflow para atualização do site
tiagolv b89da6b
Update deploy.yml
tiagolv 345ed66
Update deploy.yml
tiagolv 825ec76
ccs do site
tiagolv d52b8b7
updated layout
tiagolv 21a8883
Update README.md
tiagolv dc56966
added search back to page
tiagolv dad527a
updated mdx for cleaner look
tiagolv c153ec0
updated gitignore
tiagolv aaa590d
Update package.json
tiagolv 5e430f5
Update layout.tsx
tiagolv 19d27db
Update layout.config.tsx
tiagolv 88be423
cleaned pke and updated logo layout
tiagolv fc8cf81
Update config.ts
tiagolv 954feca
Update layout.config.tsx
tiagolv f536633
Update layout.config.tsx
tiagolv 019c9bd
updated documentation
tiagolv 57dda5d
moved core files to core folder
tiagolv e374152
Update README.md
tiagolv 6d85a05
cleaning repository and read-me tests
tiagolv 0491657
Update README.md
tiagolv c510de0
updated homepage and readme
tiagolv 0df5032
updated homepage doc site
tiagolv ae0828d
Update README.md
tiagolv b758a7f
updating homepage and doc site links
tiagolv 6b01aa9
homepage final form
tiagolv f903ca2
cleaning up and link redirection working
tiagolv b7565b5
doc site update
tiagolv b996543
updated index
tiagolv 6a25334
Update yake.mdx
tiagolv 07dd952
updated home.mdx
tiagolv 963687a
final docs website structure
tiagolv cd1b375
Update about.mdx
tiagolv d1800c8
Update about.mdx
tiagolv b3fd211
compatibility error
tiagolv 00230a2
index
tiagolv 0ada57f
updated formattting
tiagolv 7c11fb4
icon test
tiagolv 8ce7ca4
docs
tiagolv fb72306
added notebook
tiagolv 921fbd3
updated collab redirections and notebook
tiagolv 44446e9
Create meta.json
tiagolv d1fef97
updated order
tiagolv 7343b3e
Delete meta.json
tiagolv fb3a3cf
Update getting-started.mdx
tiagolv ab73131
Update README.md
tiagolv 75a81d7
sidebar test
tiagolv b0fd520
teste sidebar
tiagolv ce9fc5f
_meta
tiagolv d538819
updated sidebar
tiagolv 9b99efe
sidebar final config
tiagolv b96f10a
updated utils and homepage
tiagolv 31d32e6
Update README.md
tiagolv 807453a
updated main class documentation
tiagolv dac7781
changed to uv
tiagolv a4f7027
finishing touches
tiagolv 2e2fa6c
updated workflows for uv
tiagolv 2e463b8
v envs for workflows
tiagolv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,104 @@ | ||
| name: Create Release on PR Merge | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: | ||
| - closed | ||
| branches: | ||
| - master # Change to your default branch if different (e.g., master) | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| create_release: | ||
| # Only run when PR is merged (not when just closed) | ||
| if: github.event.pull_request.merged == true | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write # Needed for creating releases | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| fetch-depth: 0 # Fetch all history for proper versioning and commit messages | ||
|
|
||
| - name: Get latest release version | ||
| id: get_version | ||
| run: | | ||
| # Get latest tag or set to v0.0.0 if none exists | ||
| LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0") | ||
| echo "LATEST_TAG=${LATEST_TAG}" >> $GITHUB_ENV | ||
|
|
||
| # Extract version numbers | ||
| MAJOR=$(echo $LATEST_TAG | sed 's/v\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/') | ||
| MINOR=$(echo $LATEST_TAG | sed 's/v\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/') | ||
| PATCH=$(echo $LATEST_TAG | sed 's/v\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/') | ||
|
|
||
| # Check PR labels to determine which version to increment | ||
| if [[ "${{ contains(github.event.pull_request.labels.*.name, 'major') }}" == "true" ]]; then | ||
| echo "Incrementing MAJOR version due to 'major' label" | ||
| MAJOR=$((MAJOR + 1)) | ||
| MINOR=0 | ||
| PATCH=0 | ||
| elif [[ "${{ contains(github.event.pull_request.labels.*.name, 'minor') }}" == "true" ]]; then | ||
| echo "Incrementing MINOR version due to 'minor' label" | ||
| MINOR=$((MINOR + 1)) | ||
| PATCH=0 | ||
| else | ||
| echo "Incrementing PATCH version (default)" | ||
| PATCH=$((PATCH + 1)) | ||
| fi | ||
|
|
||
| NEW_TAG="v$MAJOR.$MINOR.$PATCH" | ||
| echo "Bumping version from $LATEST_TAG to $NEW_TAG" | ||
| echo "NEW_TAG=${NEW_TAG}" >> $GITHUB_ENV | ||
|
|
||
| - name: Generate Release Notes | ||
| id: release_notes | ||
| run: | | ||
| # Get commits since last tag | ||
| echo "Generating commit list since $LATEST_TAG" | ||
| COMMITS=$(git log --pretty=format:"- %s (%h)" ${{ env.LATEST_TAG }}..HEAD) | ||
|
|
||
| # Extract PR details | ||
| PR_TITLE="${{ github.event.pull_request.title }}" | ||
| PR_NUMBER="${{ github.event.pull_request.number }}" | ||
| PR_BODY="${{ github.event.pull_request.body }}" | ||
| PR_USER="${{ github.event.pull_request.merged_by.login }}" | ||
|
|
||
| # Save release notes to environment variable | ||
| echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV | ||
| echo "## Release ${{ env.NEW_TAG }}" >> $GITHUB_ENV | ||
| echo "" >> $GITHUB_ENV | ||
| echo "### 🔄 Pull Request" >> $GITHUB_ENV | ||
| echo "- #$PR_NUMBER: $PR_TITLE" >> $GITHUB_ENV | ||
| echo "- Merged by @$PR_USER" >> $GITHUB_ENV | ||
| echo "" >> $GITHUB_ENV | ||
|
|
||
| if [[ -n "$PR_BODY" ]]; then | ||
| echo "### 📝 Description" >> $GITHUB_ENV | ||
| echo "$PR_BODY" >> $GITHUB_ENV | ||
| echo "" >> $GITHUB_ENV | ||
| fi | ||
|
|
||
| echo "### 📦 Changes" >> $GITHUB_ENV | ||
| echo "$COMMITS" >> $GITHUB_ENV | ||
| echo "EOF" >> $GITHUB_ENV | ||
|
|
||
| - name: Create Release | ||
| uses: softprops/action-gh-release@v1 | ||
| with: | ||
| tag_name: ${{ env.NEW_TAG }} | ||
| name: Release ${{ env.NEW_TAG }} | ||
| body: ${{ env.RELEASE_NOTES }} | ||
| draft: false # Set to true if you want to review before publishing | ||
| prerelease: false # Set to true for pre-releases | ||
| # If you have build artifacts to include, uncomment and modify this: | ||
| # files: | | ||
| # dist/*.zip | ||
| # dist/*.tar.gz | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Output Results | ||
| run: | | ||
| echo "::notice::🎉 Created release ${{ env.NEW_TAG }} from PR #${{ github.event.pull_request.number }}" |
This file contains hidden or 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,41 @@ | ||
| "name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI | ||
|
|
||
| on: push | ||
|
|
||
| jobs: | ||
| build-n-publish: | ||
| name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - name: Set up Python 3.9 | ||
| uses: actions/setup-python@v1 | ||
| with: | ||
| python-version: 3.9 | ||
| - name: Install pypa/build | ||
| run: >- | ||
| python -m | ||
| pip install | ||
| build | ||
| --user | ||
| - name: Build a binary wheel and a source tarball | ||
| run: >- | ||
| python -m | ||
| build | ||
| --sdist | ||
| --wheel | ||
| --outdir dist/ | ||
| . | ||
| - name: Publish distribution 📦 to Test PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
| repository_url: https://test.pypi.org/legacy/ | ||
| skip_existing: true | ||
| - name: Publish distribution 📦 to PyPI | ||
| if: startsWith(github.ref, 'refs/tags') | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| password: ${{ secrets.PYPI_API_TOKEN }}" | ||
|
|
||
| #Não funciona pq não tenho secret keys |
This file contains hidden or 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,38 @@ | ||
| name: Deploy to GitHub Pages | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - core-seperation # ou master, dependendo da sua branch principal | ||
|
|
||
| jobs: | ||
| build-and-deploy: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: '18' | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| cd docs-site | ||
| npm ci | ||
|
|
||
| - name: Build | ||
| run: | | ||
| cd docs-site | ||
| npm run build | ||
|
|
||
| - name: Create .nojekyll file | ||
| run: | | ||
| touch docs-site/out/.nojekyll | ||
|
|
||
| - name: Deploy | ||
| uses: JamesIves/github-pages-deploy-action@v4 | ||
| with: | ||
| folder: docs-site/out | ||
| branch: gh-pages | ||
This file contains hidden or 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,26 @@ | ||
| name: Format | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "master" ] | ||
| pull_request: | ||
| branches: [ "master" ] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.10' | ||
| - name: Install uv | ||
| run: pip install uv | ||
| - name: Create virtual environment | ||
| run: uv venv | ||
| - name: Install dependencies | ||
| run: uv pip install -e ".[dev]" | ||
| - name: format | ||
| run: uv run black . |
This file contains hidden or 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,23 @@ | ||
| name: Install | ||
| on: | ||
| push: | ||
| branches: [ "master" ] | ||
| pull_request: | ||
| branches: [ "master" ] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.10' | ||
| - name: Install uv | ||
| run: pip install uv | ||
| - name: Create virtual environment | ||
| run: uv venv | ||
| - name: Install package | ||
| run: uv pip install -e . |
This file contains hidden or 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,28 @@ | ||
| name: Lint | ||
| on: | ||
| push: | ||
| branches: [ "master" ] | ||
| pull_request: | ||
| branches: [ "master" ] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.10' | ||
| - name: Install uv | ||
| run: pip install uv | ||
| - name: Create virtual environment | ||
| run: uv venv | ||
| - name: Install dependencies | ||
| run: uv pip install -e ".[dev]" | ||
| - name: lint | ||
| run: | | ||
| uv run ruff check --fix . | ||
| uv run ruff check . | ||
| uv run flake8 yake/ |
This file contains hidden or 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,42 @@ | ||||||
| "name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI | ||||||
|
|
||||||
| on: push | ||||||
|
|
||||||
| jobs: | ||||||
| build-n-publish: | ||||||
| name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | ||||||
| runs-on: ubuntu-latest | ||||||
| steps: | ||||||
| - uses: actions/checkout@master | ||||||
|
||||||
| - uses: actions/checkout@master | |
| - uses: actions/checkout@v4 |
This file contains hidden or 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,23 @@ | ||
| name: Pylint | ||
|
|
||
| on: [push] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: ["3.8", "3.9", "3.10"] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install pylint | ||
| - name: Analysing the code with pylint | ||
| run: | | ||
| pylint $(git ls-files '*.py') |
This file contains hidden or 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,56 @@ | ||
| name: Run YAKE Tests | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| pull_request: | ||
| branches: | ||
| - master | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| test: | ||
| 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.10' | ||
|
|
||
| - name: Install uv | ||
| run: pip install uv | ||
|
|
||
| - name: Create virtual environment | ||
| run: uv venv | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| uv pip install -e ".[dev]" | ||
| uv pip install pytest | ||
|
|
||
| - name: Run tests | ||
| id: run-tests | ||
| run: | | ||
| uv run pytest -v tests/test_yake.py | tee test_output.log | ||
|
|
||
| - name: Verify test results | ||
| run: | | ||
| if grep -q '6 passed' test_output.log; then | ||
| echo "✅ Todos os testes passaram com sucesso!" | ||
| exit 0 | ||
| else | ||
| echo "❌ Alguns testes falharam! Verifique o log para mais detalhes." | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Upload test results (em caso de falha) | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: test-logs | ||
| path: test_output.log |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Ensure that the branch naming is consistent across all workflows to avoid deployment confusion—consider aligning this with the main branch used in other workflows (e.g., 'master').