Skip to content

Commit 815999b

Browse files
Merge pull request #177 from fazedordecodigo/release/v3.0.0
Release v3.0.0
2 parents 0232e85 + f6dc426 commit 815999b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2754
-7075
lines changed

.devcontainer/Dockerfile

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
FROM mcr.microsoft.com/devcontainers/base:ubuntu
2+
3+
# Instalar dependências do sistema
4+
RUN apt update && \
5+
apt install -y software-properties-common && \
6+
add-apt-repository -y ppa:neovim-ppa/unstable && \
7+
apt update && \
8+
apt upgrade -y && \
9+
apt -y install --no-install-recommends \
10+
build-essential \
11+
curl \
12+
git \
13+
tmux \
14+
zsh \
15+
libssl-dev \
16+
libffi-dev \
17+
python3-dev \
18+
pkg-config \
19+
gcc \
20+
g++ \
21+
make \
22+
cmake \
23+
libcurl4-openssl-dev \
24+
libsqlite3-dev \
25+
default-libmysqlclient-dev && \
26+
apt install -y neovim && \
27+
apt clean -y && \
28+
rm -rf /var/lib/apt/lists/* && \
29+
chsh -s /bin/zsh
30+
31+
# Configurar o usuário vscode
32+
USER vscode
33+
WORKDIR /home/vscode
34+
35+
# Instalar uv e ferramentas Python
36+
RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
37+
export PATH="/home/vscode/.local/bin:$PATH" && \
38+
. "/home/vscode/.local/bin/env" && \
39+
echo 'export PATH="/home/vscode/.local/bin:$PATH"' >> ~/.zshrc && \
40+
echo 'source "/home/vscode/.local/bin/env"' >> ~/.zshrc
41+
42+
# Instalar versões do Python e ferramentas
43+
RUN export PATH="/home/vscode/.local/bin:$PATH" && \
44+
. "/home/vscode/.local/bin/env" && \
45+
uv python install 3.11 3.12 3.13 && \
46+
uv tool install ruff && \
47+
uv tool install tox --with tox-uv
48+
49+
# Configurar Git
50+
RUN git config --global user.name "Emerson Delatorre" && \
51+
git config --global user.email "[email protected]"
52+
53+
# Instalar fontes Nerd Fonts
54+
RUN git clone --depth 1 https://github.com/ryanoasis/nerd-fonts.git && \
55+
cd nerd-fonts && \
56+
./install.sh FiraCode && \
57+
./install.sh JetBrainsMono && \
58+
cd .. && \
59+
rm -rf nerd-fonts
60+
61+
# Instalar e configurar fzf
62+
RUN git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && \
63+
~/.fzf/install --all
64+
65+
# Install Rust
66+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
67+
68+
# Adicionar binários Rust ao PATH
69+
ENV PATH="/home/vscode/.cargo/bin:${PATH}"
70+
ENV RUSTUP_HOME=/home/vscode/.rustup
71+
ENV CARGO_HOME=/home/vscode/.cargo
72+
73+
# Instalar EZA
74+
RUN . "$HOME/.cargo/env" && cargo install eza
75+
76+
# Instalar plugins do ZSH
77+
RUN mkdir -p ~/.zsh && \
78+
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions && \
79+
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting && \
80+
git clone https://github.com/zsh-users/zsh-history-substring-search.git ~/.zsh/zsh-history-substring-search
81+
82+
# Instalar Oh My Zsh e tema
83+
RUN rm -rf ~/.oh-my-zsh && \
84+
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended && \
85+
mkdir -p ~/.oh-my-zsh/custom/themes && \
86+
git clone --depth=1 https://github.com/spaceship-prompt/spaceship-prompt.git ~/.oh-my-zsh/custom/themes/spaceship-prompt && \
87+
ln -s ~/.oh-my-zsh/custom/themes/spaceship-prompt/spaceship.zsh-theme ~/.oh-my-zsh/custom/themes/spaceship.zsh-theme
88+
89+
RUN echo 'export GPG_TTY=$(tty)' >> ~/.zshrc && \
90+
echo '' >> ~/.zshrc && \
91+
echo 'ZSH_THEME="spaceship"' >> ~/.zshrc && \
92+
echo '' >> ~/.zshrc && \
93+
echo '#plugins:' >> ~/.zshrc && \
94+
echo 'source ~/.cargo/env' >> ~/.zshrc && \
95+
echo 'source ~/.oh-my-zsh/oh-my-zsh.sh' >> ~/.zshrc && \
96+
echo 'source ~/.local/bin/env' >> ~/.zshrc && \
97+
echo 'source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh' >> ~/.zshrc && \
98+
echo 'source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' >> ~/.zshrc && \
99+
echo 'source ~/.zsh/zsh-history-substring-search/zsh-history-substring-search.zsh' >> ~/.zshrc && \
100+
echo '' >> ~/.zshrc && \
101+
echo '[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh' >> ~/.zshrc && \
102+
echo '' >> ~/.zshrc && \
103+
echo 'plugins=(' >> ~/.zshrc && \
104+
echo ' dircycle' >> ~/.zshrc && \
105+
echo ' git' >> ~/.zshrc && \
106+
echo ' gitignore' >> ~/.zshrc && \
107+
echo ' pip' >> ~/.zshrc && \
108+
echo ' pre-commit' >> ~/.zshrc && \
109+
echo ' python' >> ~/.zshrc && \
110+
echo ' poetry' >> ~/.zshrc && \
111+
echo ' ssh-agent' >> ~/.zshrc && \
112+
echo ' ubuntu' >> ~/.zshrc && \
113+
echo ' vscode' >> ~/.zshrc && \
114+
echo ')' >> ~/.zshrc && \
115+
echo '' >> ~/.zshrc && \
116+
echo 'zstyle :omz:plugins:ssh-agent identities id_ed25519' >> ~/.zshrc && \
117+
echo 'zstyle '\'':completion:*:*:docker:*'\'' option-stacking yes' >> ~/.zshrc && \
118+
echo 'zstyle '\'':completion:*:*:docker-*:*'\'' option-stacking yes' >> ~/.zshrc && \
119+
echo '' >> ~/.zshrc && \
120+
echo '#settings for zsh-history-substring-search' >> ~/.zshrc && \
121+
echo 'bindkey '\''^[[A'\'' history-substring-search-up' >> ~/.zshrc && \
122+
echo 'bindkey '\''^[[B'\'' history-substring-search-down' >> ~/.zshrc && \
123+
echo 'bindkey '\''^[[1;4D'\'' insert-cycledleft' >> ~/.zshrc && \
124+
echo 'bindkey '\''^[[1;4C'\'' insert-cycledright' >> ~/.zshrc && \
125+
echo '' >> ~/.zshrc && \
126+
echo '#alias:' >> ~/.zshrc && \
127+
echo 'alias zshconfig="code ~/.zshrc"' >> ~/.zshrc && \
128+
echo 'alias ohmyzsh="code ~/.oh-my-zsh"' >> ~/.zshrc && \
129+
echo 'alias pbcopy="xclip -selection clipboard"' >> ~/.zshrc && \
130+
echo 'alias pbpaste="xclip -selection clipboard -o"' >> ~/.zshrc && \
131+
echo 'alias cls="clear"' >> ~/.zshrc && \
132+
echo 'alias ls="eza -la"' >> ~/.zshrc
133+
134+
# Configurar o PATH permanentemente
135+
ENV PATH="/home/vscode/.local/bin:$PATH"
136+
137+
# ... rest of the file remains unchanged ...

.devcontainer/devcontainer.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "PyFlunt",
3+
"dockerFile": "Dockerfile",
4+
"customizations": {
5+
"vscode": {
6+
"extensions": [
7+
"ms-python.python",
8+
"ms-python.debugpy",
9+
"ms-python.vscode-pylance",
10+
"ms-vscode.makefile-tools",
11+
"ms-azuretools.vscode-docker",
12+
"ms-python.mypy-type-checker",
13+
"eamodio.gitlens",
14+
"yzhang.markdown-all-in-one",
15+
"alefragnani.project-manager",
16+
"natqe.reload",
17+
"vscode-icons-team.vscode-icons",
18+
"redhat.vscode-yaml",
19+
"dracula-theme.theme-dracula",
20+
"gitlab.gitlab-workflow",
21+
"postman.postman-for-vscode",
22+
"charliermarsh.ruff",
23+
"esbenp.prettier-vscode",
24+
"usernamehw.errorlens",
25+
"visualstudioexptteam.vscodeintellicode",
26+
"visualstudioexptteam.intellicode-api-usage-examples",
27+
"visualstudioexptteam.vscodeintellicode-completions"
28+
]
29+
}
30+
},
31+
"remoteUser": "vscode",
32+
"mounts": [
33+
{
34+
"source": "/home/fedora/.ssh",
35+
"target": "/home/vscode/.ssh",
36+
"type": "bind"
37+
}
38+
]
39+
}

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ updates:
33
- package-ecosystem: "pip"
44
directory: "/"
55
schedule:
6-
interval: "weekly"
6+
interval: "weekly"

.github/workflows/linters.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ name: Linters
22
run-name: ${{ github.actor }} execute Linters 🚀
33
on:
44
pull_request:
5-
6-
workflow_dispatch:
5+
types: [opened, synchronize, reopened]
76

87
jobs:
98
steps:
@@ -13,17 +12,16 @@ jobs:
1312
- name: Realiza o checkout
1413
uses: actions/checkout@v4
1514

16-
- name: Set up Python
17-
uses: actions/setup-python@v5
18-
19-
- name: Atualiza Pip
20-
run: python -m pip install --upgrade pip
15+
- name: Install the latest version of uv
16+
uses: astral-sh/setup-uv@v5
17+
with:
18+
python-version: 3.11
2119

2220
- name: Instala dependências
23-
run: python -m pip install ruff mypy
21+
run: uv add ruff mypy
2422

2523
- name: Executa Ruff
26-
run: python -m ruff check
24+
run: uv run ruff check
2725

2826
- name: Executa Mypy
29-
run: python -m mypy .
27+
run: uv run mypy .

.github/workflows/publish.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Publish
22

33
on:
4-
release:
5-
types: [published]
4+
release:
5+
types: [published]
66

77
jobs:
88
publish:
@@ -11,16 +11,19 @@ jobs:
1111
- name: Realiza o checkout
1212
uses: actions/checkout@v4
1313

14-
- name: Set up Python
15-
uses: actions/setup-python@v5
16-
17-
- name: Instala Poetry
18-
run: curl -sSL https://install.python-poetry.org | python3 -
14+
- name: Install the latest version of uv
15+
uses: astral-sh/setup-uv@v5
16+
with:
17+
enable-cache: true
18+
python-version: 3.11
19+
cache-dependency-glob: "pyproject.toml"
20+
github-token: ${{ secrets.GITHUB_TOKEN }}
1921

20-
- name: Instala dependências
21-
run: poetry install --no-dev
22+
- name: Install dependencies
23+
run: uv sync
2224

2325
- name: Build and publish to pypi
24-
uses: JRubics/[email protected]
25-
with:
26-
pypi_token: ${{ secrets.TOKEN_PYPI_PYFLUNT }}
26+
run: uv build
27+
28+
- name: Publish to pypi
29+
run: uv publish --token ${{ secrets.TOKEN_PYPI_PYFLUNT }}

.github/workflows/sonar_cloud.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,60 @@
11
name: Tests
2-
run-name: ${{ github.actor }} execute Linters 🚀
2+
run-name: ${{ github.actor }} execute Tests
33
on:
44
pull_request:
5-
6-
workflow_dispatch:
5+
types: [opened, synchronize, reopened]
76

87
jobs:
98
steps:
10-
runs-on: ubuntu-latest
9+
name: test with ${{ matrix.env }} on ${{ matrix.os }}
10+
runs-on: ${{ matrix.os }}
1111
strategy:
12+
fail-fast: false
1213
matrix:
13-
os: [ubuntu-latest, macos-latest, windows-latest]
14-
python-version: ["3.9", "3.10", "3.11", "3.12"]
14+
env:
15+
- "3.13"
16+
- "3.12"
17+
- "3.11"
18+
os:
19+
- ubuntu-latest
20+
- macos-latest
21+
- windows-latest
1522
steps:
1623
- name: Realiza o checkout
1724
uses: actions/checkout@v4
1825

19-
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v5
26+
- name: Install the latest version of uv
27+
uses: astral-sh/setup-uv@v5
2128
with:
22-
python-version: ${{ matrix.python-version }}
29+
enable-cache: true
30+
cache-dependency-glob: "pyproject.toml"
31+
github-token: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Add .local/bin to Windows PATH
34+
if: runner.os == 'Windows'
35+
shell: bash
36+
run: echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH
2337

24-
- name: Display Python version
25-
run: python -c "import sys; print(sys.version)"
38+
- name: Install tox
39+
run: uv tool install tox --with tox-uv
2640

27-
- name: Atualiza Pip
28-
run: python -m pip install --upgrade pip
41+
- name: Install Python
42+
run: uv python install --python-preference only-managed ${{ matrix.env }}
2943

30-
- name: Instala dependências
31-
run: pip install tox tox-gh-actions
44+
- name: Run test suite
45+
run: tox r -e py${{ matrix.env }}
3246

33-
- name: Executa Tox
34-
run: tox
47+
- name: SonarCloud Scan
48+
if: matrix.env == '3.13' && matrix.os == 'ubuntu-latest'
49+
uses: SonarSource/sonarqube-scan-action@v5
50+
with:
51+
args: >
52+
-Dsonar.organization=fazedordecodigo
53+
-Dsonar.projectKey=fazedordecodigo_PyFlunt
54+
-Dsonar.python.coverage.reportPaths=coverage.xml
55+
-Dsonar.sources=flunt/
56+
-Dsonar.tests=tests/
57+
-Dsonar.test.exclusions=tests/**
58+
-Dsonar.verbose=true
59+
env:
60+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.venv/
2+
venv
23
.pytest_cache/
34
build/
45
dist/

0 commit comments

Comments
 (0)