pfem-framerotation 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. pfem_framerotation-0.0.1/.gitignore +23 -0
  2. pfem_framerotation-0.0.1/.readthedocs.yaml +16 -0
  3. pfem_framerotation-0.0.1/LICENSE +21 -0
  4. pfem_framerotation-0.0.1/PKG-INFO +89 -0
  5. pfem_framerotation-0.0.1/README.md +54 -0
  6. pfem_framerotation-0.0.1/README_DOCS.md +90 -0
  7. pfem_framerotation-0.0.1/README_ENV.md +132 -0
  8. pfem_framerotation-0.0.1/README_RELEASE.md +132 -0
  9. pfem_framerotation-0.0.1/docs/Makefile +19 -0
  10. pfem_framerotation-0.0.1/docs/make.bat +35 -0
  11. pfem_framerotation-0.0.1/docs/requirements.txt +3 -0
  12. pfem_framerotation-0.0.1/docs/source/_static/.gitkeep +0 -0
  13. pfem_framerotation-0.0.1/docs/source/_templates/.gitkeep +0 -0
  14. pfem_framerotation-0.0.1/docs/source/api.rst +69 -0
  15. pfem_framerotation-0.0.1/docs/source/conf.py +59 -0
  16. pfem_framerotation-0.0.1/docs/source/index.rst +24 -0
  17. pfem_framerotation-0.0.1/docs/source/installation.rst +32 -0
  18. pfem_framerotation-0.0.1/docs/source/quickstart.rst +55 -0
  19. pfem_framerotation-0.0.1/examples/01_Input.txt +28 -0
  20. pfem_framerotation-0.0.1/examples/02_Materials.txt +11 -0
  21. pfem_framerotation-0.0.1/examples/03_Geometry.txt +86 -0
  22. pfem_framerotation-0.0.1/examples/04_LoadsAndBoundaryConditions.txt +19 -0
  23. pfem_framerotation-0.0.1/examples/05_Solve.txt +13 -0
  24. pfem_framerotation-0.0.1/examples/pfem_framerotation_quickstart.ipynb +421 -0
  25. pfem_framerotation-0.0.1/examples/run_local_example.py +105 -0
  26. pfem_framerotation-0.0.1/pyproject.toml +63 -0
  27. pfem_framerotation-0.0.1/src/pfem_framerotation/__init__.py +51 -0
  28. pfem_framerotation-0.0.1/src/pfem_framerotation/core.py +1172 -0
  29. pfem_framerotation-0.0.1/uv.lock +1351 -0
@@ -0,0 +1,23 @@
1
+ # Virtual environments
2
+ .venv/
3
+ venv/
4
+ env/
5
+
6
+ # Python bytecode / build artifacts
7
+ __pycache__/
8
+ *.pyc
9
+ *.egg-info/
10
+ build/
11
+ dist/
12
+
13
+ # Sphinx documentation build output
14
+ docs/build/
15
+ docs/_build/
16
+
17
+ # Solver outputs
18
+ Output.ogl
19
+
20
+ # Editors / OS
21
+ .vscode/
22
+ .idea/
23
+ .DS_Store
@@ -0,0 +1,16 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-22.04
5
+ tools:
6
+ python: "3.11"
7
+
8
+ sphinx:
9
+ configuration: docs/source/conf.py
10
+
11
+ python:
12
+ install:
13
+ - method: pip
14
+ path: .
15
+ extra_requirements:
16
+ - docs
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Arthur Álax de Araújo Albuquerque, Wanderlei Malaquias Pereira Junior
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.5
2
+ Name: pfem-framerotation
3
+ Version: 0.0.1
4
+ Summary: Positional Finite Element Method (PFEM) solver for 2D frame structures with finite rotations.
5
+ Project-URL: Homepage, https://github.com/wmpjrufg/PFEM_FrameRotation
6
+ Project-URL: Repository, https://github.com/wmpjrufg/PFEM_FrameRotation
7
+ Project-URL: Issues, https://github.com/wmpjrufg/PFEM_FrameRotation/issues
8
+ Author: Arthur Álax de Araújo Albuquerque
9
+ Author-email: Wanderlei Malaquias Pereira Junior <wanderlei.malaquias.pereira.jr@gmail.com>
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: civil engineering,finite element method,frame structures,nonlinear analysis,positional FEM,structural analysis
13
+ Classifier: Development Status :: 2 - Pre-Alpha
14
+ Classifier: Intended Audience :: Education
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Scientific/Engineering
22
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
23
+ Requires-Python: >=3.11
24
+ Requires-Dist: numpy>=1.24
25
+ Requires-Dist: scipy>=1.10
26
+ Provides-Extra: dev
27
+ Requires-Dist: build>=1.0; extra == 'dev'
28
+ Requires-Dist: pytest>=7.4; extra == 'dev'
29
+ Requires-Dist: twine>=5.0; extra == 'dev'
30
+ Provides-Extra: docs
31
+ Requires-Dist: myst-parser>=2.0; extra == 'docs'
32
+ Requires-Dist: sphinx-rtd-theme>=2.0; extra == 'docs'
33
+ Requires-Dist: sphinx>=7.2; extra == 'docs'
34
+ Description-Content-Type: text/markdown
35
+
36
+ # PFEM_FrameRotation
37
+
38
+ [![PyPI](https://img.shields.io/pypi/v/pfem-framerotation.svg)](https://pypi.org/project/pfem-framerotation/)
39
+ [![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/)
40
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
41
+
42
+ **pfem-framerotation** é um solver de **Elementos Finitos Posicionais (PFEM)**
43
+ para pórticos planos com **rotações finitas**, resolvido por
44
+ **Newton-Raphson**. Desenvolvido no Departamento de Estruturas — Escola de
45
+ Engenharia Civil e Ambiental (EECA), Universidade Federal de Goiás (UFG).
46
+
47
+ ## Instalação
48
+
49
+ ```bash
50
+ pip install pfem-framerotation
51
+ ```
52
+
53
+ Requer Python 3.11+. Para configurar um ambiente de desenvolvimento local a
54
+ partir do código-fonte usando [uv](https://docs.astral.sh/uv/) (criação,
55
+ ativação/desativação do ambiente), veja [README_ENV.md](README_ENV.md).
56
+
57
+ ## Uso rápido
58
+
59
+ ```python
60
+ from pfem_framerotation import reading_file, newton_raphson # e demais funções
61
+
62
+ # veja o passo a passo completo em examples/pfem_framerotation_quickstart.ipynb
63
+ ```
64
+
65
+ * **Notebook de exemplo (Google Colab):**
66
+ [`examples/pfem_framerotation_quickstart.ipynb`](examples/pfem_framerotation_quickstart.ipynb)
67
+ — resolve uma viga em balanço passo a passo, pronto para rodar no Colab.
68
+ * **Script de exemplo local:**
69
+ [`examples/run_local_example.py`](examples/run_local_example.py)
70
+
71
+ ## Documentação
72
+
73
+ A documentação completa da API (gerada com Sphinx a partir das docstrings) e
74
+ as instruções para buildar/publicar a documentação estão em
75
+ [README_DOCS.md](README_DOCS.md).
76
+
77
+ ## Lançando uma nova versão
78
+
79
+ Passo a passo de bump de versão, build e publicação no TestPyPI/PyPI está em
80
+ [README_RELEASE.md](README_RELEASE.md).
81
+
82
+ ## Autores
83
+
84
+ * Prof. Arthur Álax de Araújo Albuquerque
85
+ * Prof. Wanderlei Malaquias Pereira Junior
86
+
87
+ ## Licença
88
+
89
+ Distribuído sob a licença [MIT](LICENSE).
@@ -0,0 +1,54 @@
1
+ # PFEM_FrameRotation
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/pfem-framerotation.svg)](https://pypi.org/project/pfem-framerotation/)
4
+ [![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
6
+
7
+ **pfem-framerotation** é um solver de **Elementos Finitos Posicionais (PFEM)**
8
+ para pórticos planos com **rotações finitas**, resolvido por
9
+ **Newton-Raphson**. Desenvolvido no Departamento de Estruturas — Escola de
10
+ Engenharia Civil e Ambiental (EECA), Universidade Federal de Goiás (UFG).
11
+
12
+ ## Instalação
13
+
14
+ ```bash
15
+ pip install pfem-framerotation
16
+ ```
17
+
18
+ Requer Python 3.11+. Para configurar um ambiente de desenvolvimento local a
19
+ partir do código-fonte usando [uv](https://docs.astral.sh/uv/) (criação,
20
+ ativação/desativação do ambiente), veja [README_ENV.md](README_ENV.md).
21
+
22
+ ## Uso rápido
23
+
24
+ ```python
25
+ from pfem_framerotation import reading_file, newton_raphson # e demais funções
26
+
27
+ # veja o passo a passo completo em examples/pfem_framerotation_quickstart.ipynb
28
+ ```
29
+
30
+ * **Notebook de exemplo (Google Colab):**
31
+ [`examples/pfem_framerotation_quickstart.ipynb`](examples/pfem_framerotation_quickstart.ipynb)
32
+ — resolve uma viga em balanço passo a passo, pronto para rodar no Colab.
33
+ * **Script de exemplo local:**
34
+ [`examples/run_local_example.py`](examples/run_local_example.py)
35
+
36
+ ## Documentação
37
+
38
+ A documentação completa da API (gerada com Sphinx a partir das docstrings) e
39
+ as instruções para buildar/publicar a documentação estão em
40
+ [README_DOCS.md](README_DOCS.md).
41
+
42
+ ## Lançando uma nova versão
43
+
44
+ Passo a passo de bump de versão, build e publicação no TestPyPI/PyPI está em
45
+ [README_RELEASE.md](README_RELEASE.md).
46
+
47
+ ## Autores
48
+
49
+ * Prof. Arthur Álax de Araújo Albuquerque
50
+ * Prof. Wanderlei Malaquias Pereira Junior
51
+
52
+ ## Licença
53
+
54
+ Distribuído sob a licença [MIT](LICENSE).
@@ -0,0 +1,90 @@
1
+ # Documentação (Sphinx)
2
+
3
+ A documentação é gerada com [Sphinx](https://www.sphinx-doc.org/) a partir
4
+ das docstrings já escritas nas funções do pacote
5
+ (`src/pfem_framerotation/core.py`), usando `autodoc` + `napoleon`
6
+ (reconhece tanto docstrings estilo reST/`:param:` quanto estilo Google
7
+ `Args:`/`Returns:`).
8
+
9
+ Estrutura:
10
+
11
+ ```
12
+ docs/
13
+ ├── Makefile / make.bat # atalhos "make html" (Linux/macOS) e make.bat (Windows)
14
+ ├── requirements.txt # dependências só de docs (usado pelo Read the Docs)
15
+ └── source/
16
+ ├── conf.py # configuração do Sphinx
17
+ ├── index.rst # página inicial / índice
18
+ ├── installation.rst # instruções de instalação
19
+ ├── quickstart.rst # exemplo de uso rápido
20
+ └── api.rst # referência da API (autodoc)
21
+ ```
22
+
23
+ ## 1. Instalar as dependências de documentação
24
+
25
+ Usando [uv](https://docs.astral.sh/uv/) (veja [README_ENV.md](README_ENV.md)
26
+ para instalar o uv e detalhes do ambiente):
27
+
28
+ ```bash
29
+ uv sync --extra docs
30
+ ```
31
+
32
+ ## 2. Buildar a documentação localmente
33
+
34
+ Com o ambiente sincronizado, rode o build via `uv run` (não precisa ativar a
35
+ venv manualmente):
36
+
37
+ ```bash
38
+ cd docs
39
+ uv run make html # Linux / macOS
40
+ uv run make.bat html # Windows
41
+ ```
42
+
43
+ Ou, se preferir ativar a venv primeiro (`source ../.venv/bin/activate`),
44
+ os comandos tradicionais também funcionam:
45
+
46
+ ```bash
47
+ cd docs
48
+ make html # Linux / macOS
49
+ make.bat html # Windows
50
+ ```
51
+
52
+ O resultado é gerado em `docs/build/html/index.html` — abra esse arquivo no
53
+ navegador para conferir.
54
+
55
+ Para gerar do zero (limpar cache e rebuildar):
56
+
57
+ ```bash
58
+ make clean html
59
+ ```
60
+
61
+ ## 3. Atualizando a documentação
62
+
63
+ * **Novas funções documentadas**: adicione uma entrada em
64
+ [`docs/source/api.rst`](docs/source/api.rst) com
65
+ `.. autofunction:: pfem_framerotation.nome_da_funcao` (ou deixe que a seção
66
+ `automodule:: pfem_framerotation.core` no final do arquivo capture
67
+ automaticamente qualquer função nova do módulo).
68
+ * **Docstrings**: escreva no estilo reST (`:param nome:`, `:return:`) ou
69
+ estilo Google (`Args:`, `Returns:`) — ambos são renderizados corretamente.
70
+ * **Páginas novas**: crie um `.rst` (ou `.md`, suportado via `myst-parser`)
71
+ dentro de `docs/source/` e adicione o nome do arquivo (sem extensão) na
72
+ `toctree` de [`index.rst`](docs/source/index.rst).
73
+
74
+ ## 4. Publicando ("subindo") a documentação
75
+
76
+ Este repositório já inclui um [`.readthedocs.yaml`](.readthedocs.yaml) na
77
+ raiz, pronto para hospedar a documentação em
78
+ [Read the Docs](https://readthedocs.org/) (gratuito para projetos
79
+ open source):
80
+
81
+ 1. Crie uma conta em readthedocs.org e conecte sua conta do GitHub.
82
+ 2. Importe o repositório `PFEM_FrameRotation`.
83
+ 3. O Read the Docs detecta o `.readthedocs.yaml` automaticamente e builda a
84
+ documentação a cada push feito na branch `main` (ou a cada tag/release).
85
+ 4. A URL pública terá o formato
86
+ `https://pfem-framerotation.readthedocs.io`.
87
+
88
+ Alternativa: publicar como GitHub Pages usando o HTML gerado em
89
+ `docs/build/html/` (ex.: via GitHub Actions rodando `make html` e fazendo
90
+ deploy da pasta para a branch `gh-pages`).
@@ -0,0 +1,132 @@
1
+ # Ambiente de desenvolvimento (uv)
2
+
3
+ Este projeto usa **Python 3.11** e declara suas dependências e metadados no
4
+ [`pyproject.toml`](pyproject.toml) (padrão PEP 621), o mesmo arquivo usado
5
+ para gerar o pacote publicado no PyPI (`pfem-framerotation`).
6
+
7
+ Para criar e gerenciar o ambiente virtual usamos o
8
+ [**uv**](https://docs.astral.sh/uv/), um gerenciador de projetos Python
9
+ rápido (escrito em Rust) que substitui `pip` + `venv` + `pyenv` em uma única
10
+ ferramenta. Com o uv você **não precisa nem ter o Python 3.11 pré-instalado**
11
+ no seu sistema — ele baixa e gerencia a versão certa automaticamente com
12
+ base no `requires-python` do `pyproject.toml`.
13
+
14
+ ## 1. Instalando o uv (uma única vez por máquina)
15
+
16
+ ```bash
17
+ # Linux / macOS
18
+ curl -LsSf https://astral.sh/uv/install.sh | sh
19
+
20
+ # Windows (PowerShell)
21
+ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
22
+
23
+ # alternativa multiplataforma, se você já tem pip/pipx
24
+ pipx install uv
25
+ ```
26
+
27
+ Verifique a instalação:
28
+
29
+ ```bash
30
+ uv --version
31
+ ```
32
+
33
+ ## 2. Criando o ambiente e instalando o projeto
34
+
35
+ Na raiz do repositório, basta rodar `uv sync`. O uv lê o `pyproject.toml`,
36
+ baixa o Python 3.11 se necessário, cria a pasta `.venv/` e instala o pacote
37
+ (em modo editável) junto com suas dependências:
38
+
39
+ ```bash
40
+ # apenas as dependências de uso (numpy, scipy)
41
+ uv sync
42
+
43
+ # + dependências para build da documentação (Sphinx)
44
+ uv sync --extra docs
45
+
46
+ # + dependências de desenvolvimento (build, twine, pytest)
47
+ uv sync --extra dev
48
+
49
+ # tudo de uma vez
50
+ uv sync --all-extras
51
+ ```
52
+
53
+ Isso também gera/atualiza o arquivo `uv.lock` (versões exatas resolvidas),
54
+ que deve ser **versionado no git** para builds reprodutíveis — é o
55
+ equivalente ao `pyproject.toml` "travado".
56
+
57
+ A pasta `.venv/` já está no [`.gitignore`](.gitignore) e não deve ser
58
+ versionada.
59
+
60
+ ## 3. Ativando o ambiente
61
+
62
+ O `.venv/` criado pelo uv é uma venv padrão do Python, então os comandos de
63
+ ativação de sempre funcionam normalmente:
64
+
65
+ ```bash
66
+ # Linux / macOS (bash/zsh)
67
+ source .venv/bin/activate
68
+
69
+ # Windows (PowerShell)
70
+ .venv\Scripts\Activate.ps1
71
+
72
+ # Windows (cmd)
73
+ .venv\Scripts\activate.bat
74
+ ```
75
+
76
+ Quando ativa, o prompt do terminal passa a mostrar `(pfem-framerotation)` ou
77
+ `(.venv)` no início da linha.
78
+
79
+ **Alternativa (sem ativar manualmente):** prefixe qualquer comando com
80
+ `uv run` e o uv usa o `.venv` do projeto automaticamente:
81
+
82
+ ```bash
83
+ uv run python examples/run_local_example.py
84
+ uv run pytest
85
+ ```
86
+
87
+ Verifique que a instalação funcionou:
88
+
89
+ ```bash
90
+ uv run python -c "import pfem_framerotation; print(pfem_framerotation.__version__)"
91
+ # ou, com o ambiente já ativado:
92
+ python -c "import pfem_framerotation; print(pfem_framerotation.__version__)"
93
+ ```
94
+
95
+ ## 4. Desativando o ambiente
96
+
97
+ Se você ativou a venv manualmente (passo 3), desative com:
98
+
99
+ ```bash
100
+ deactivate
101
+ ```
102
+
103
+ Isso retorna o terminal ao Python do sistema. Se você usa apenas `uv run`,
104
+ não há nada para desativar — cada comando já roda isolado no `.venv` do
105
+ projeto.
106
+
107
+ ## 5. Adicionando/removendo dependências
108
+
109
+ Em vez de editar o `pyproject.toml` manualmente, use:
110
+
111
+ ```bash
112
+ uv add nome-do-pacote # adiciona dependência de uso
113
+ uv add --optional docs sphinx # adiciona a um grupo opcional, ex.: "docs"
114
+ uv add --dev pytest # adiciona dependência de desenvolvimento
115
+ uv remove nome-do-pacote # remove
116
+ ```
117
+
118
+ Esses comandos atualizam o `pyproject.toml`, o `uv.lock` e o `.venv`
119
+ automaticamente.
120
+
121
+ ## 6. Removendo o ambiente (recomeçar do zero)
122
+
123
+ ```bash
124
+ # Linux / macOS
125
+ rm -rf .venv
126
+
127
+ # Windows (PowerShell)
128
+ Remove-Item -Recurse -Force .venv
129
+ ```
130
+
131
+ e rode `uv sync` novamente (passo 2). O `uv.lock` pode ser mantido — ele
132
+ garante que as mesmas versões serão reinstaladas.
@@ -0,0 +1,132 @@
1
+ # Como lançar uma nova versão (build + PyPI)
2
+
3
+ Passo a passo para publicar uma nova versão do `pfem-framerotation`, sempre
4
+ testando primeiro no **TestPyPI** antes do PyPI real.
5
+
6
+ ## 0. Pré-requisitos (uma vez só)
7
+
8
+ * [uv](https://docs.astral.sh/uv/) instalado (veja [README_ENV.md](README_ENV.md)).
9
+ * Conta em https://pypi.org/account/register/ e em
10
+ https://test.pypi.org/account/register/ (são contas **separadas**, cadastre
11
+ nas duas).
12
+ * Um API token de cada uma (*Account settings → API tokens*). Guarde os dois
13
+ tokens com segurança (ex.: gerenciador de senhas); eles não devem ir para o
14
+ repositório.
15
+
16
+ ## 1. Atualize o changelog / confira o que vai entrar na versão
17
+
18
+ ```bash
19
+ git log --oneline v0.0.1..HEAD # ou desde a última tag/versão publicada
20
+ ```
21
+
22
+ ## 2. Bump de versão
23
+
24
+ A versão do pacote vem de **um único lugar**:
25
+ [`src/pfem_framerotation/__init__.py`](src/pfem_framerotation/__init__.py),
26
+ na linha `__version__ = "0.0.1"`. O `pyproject.toml` lê esse valor
27
+ automaticamente (`dynamic = ["version"]` + `[tool.hatch.version]`), então
28
+ **não precisa editar o `pyproject.toml`**.
29
+
30
+ ```bash
31
+ # edite manualmente __version__ em src/pfem_framerotation/__init__.py, por exemplo:
32
+ # 0.0.1 -> 0.0.2 (correção de bug)
33
+ # 0.0.1 -> 0.1.0 (nova funcionalidade)
34
+ # 0.1.0 -> 1.0.0 (primeira versão estável / mudança incompatível)
35
+ ```
36
+
37
+ Use [Versionamento Semântico](https://semver.org/lang/pt-BR/): `MAJOR.MINOR.PATCH`.
38
+
39
+ Depois de editar, confira que o valor foi captado corretamente:
40
+
41
+ ```bash
42
+ uv run python -c "import pfem_framerotation; print(pfem_framerotation.__version__)"
43
+ ```
44
+
45
+ Commite o bump de versão:
46
+
47
+ ```bash
48
+ git add src/pfem_framerotation/__init__.py
49
+ git commit -m "chore: bump version to X.Y.Z"
50
+ git tag vX.Y.Z
51
+ ```
52
+
53
+ ## 3. Limpe builds antigos e gere os artefatos
54
+
55
+ ```bash
56
+ rm -rf dist/
57
+ uv build
58
+ ```
59
+
60
+ Isso gera `dist/pfem_framerotation-X.Y.Z.tar.gz` (sdist) e
61
+ `dist/pfem_framerotation-X.Y.Z-py3-none-any.whl` (wheel).
62
+
63
+ ## 4. Valide os artefatos antes de subir
64
+
65
+ ```bash
66
+ uv run --with twine twine check dist/*
67
+ ```
68
+
69
+ Precisa aparecer `PASSED` para os dois arquivos. Se aparecer `FAILED`,
70
+ corrija o problema (geralmente é o `readme`/metadados do `pyproject.toml`)
71
+ antes de continuar.
72
+
73
+ ## 5. Suba para o TestPyPI primeiro
74
+
75
+ ```bash
76
+ uv publish --publish-url https://test.pypi.org/legacy/ --token <seu-token-testpypi>
77
+ ```
78
+
79
+ Confira a página gerada: `https://test.pypi.org/project/pfem-framerotation/`
80
+
81
+ ### Teste a instalação a partir do TestPyPI
82
+
83
+ O TestPyPI não tem `numpy`/`scipy` publicados nele, então é preciso apontar
84
+ as duas fontes: TestPyPI para o nosso pacote e o PyPI normal para as
85
+ dependências.
86
+
87
+ ```bash
88
+ uv run --python 3.11 --with pfem-framerotation \
89
+ --index https://test.pypi.org/simple/ \
90
+ --index https://pypi.org/simple/ \
91
+ --index-strategy unsafe-best-match \
92
+ python -c "import pfem_framerotation; print(pfem_framerotation.__version__)"
93
+ ```
94
+
95
+ Se importar e mostrar a versão nova sem erro, está tudo certo.
96
+
97
+ ## 6. Suba para o PyPI real
98
+
99
+ Só depois que o passo 5 funcionar:
100
+
101
+ ```bash
102
+ uv publish --token <seu-token-pypi>
103
+ ```
104
+
105
+ Confira: `https://pypi.org/project/pfem-framerotation/`
106
+
107
+ ### Teste final, como um usuário faria
108
+
109
+ ```bash
110
+ uv run --python 3.11 --with pfem-framerotation python -c "import pfem_framerotation; print(pfem_framerotation.__version__)"
111
+ # ou, fora de qualquer projeto:
112
+ pip install pfem-framerotation
113
+ ```
114
+
115
+ ## 7. Depois de publicar
116
+
117
+ ```bash
118
+ git push origin main --tags
119
+ ```
120
+
121
+ ## Lembretes importantes
122
+
123
+ * **Uma versão publicada no PyPI é permanente** — não é possível reenviar o
124
+ mesmo número de versão (nem no PyPI, nem no TestPyPI), mesmo se você
125
+ apagar os arquivos localmente. Se algo der errado, corrija e publique
126
+ `X.Y.Z+1`. É possível "yank" (marcar como não recomendada) uma versão
127
+ quebrada, mas ela não desaparece do índice.
128
+ * Para não digitar o token toda vez, exporte antes de rodar `uv publish`:
129
+ ```bash
130
+ export UV_PUBLISH_TOKEN=<seu-token>
131
+ ```
132
+ * Nunca commite tokens no repositório.
@@ -0,0 +1,19 @@
1
+ # Minimal makefile for Sphinx documentation
2
+
3
+ # You can set these variables from the command line, and also
4
+ # from the environment, for the first two.
5
+ SPHINXOPTS ?=
6
+ SPHINXBUILD ?= sphinx-build
7
+ SOURCEDIR = source
8
+ BUILDDIR = build
9
+
10
+ # Put it first so that "make" without argument is like "make help".
11
+ help:
12
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
13
+
14
+ .PHONY: help Makefile
15
+
16
+ # Catch-all target: route all unknown targets to Sphinx using the new
17
+ # "make mode" option.
18
+ %: Makefile
19
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,35 @@
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=sphinx-build
9
+ )
10
+ set SOURCEDIR=source
11
+ set BUILDDIR=build
12
+
13
+ if "%1" == "" goto help
14
+
15
+ %SPHINXBUILD% >NUL 2>NUL
16
+ if errorlevel 9009 (
17
+ echo.
18
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19
+ echo.installed, then set the SPHINXBUILD environment variable to point
20
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
21
+ echo.may add the Sphinx directory to PATH.
22
+ echo.
23
+ echo.If you don't have Sphinx installed, grab it from
24
+ echo.https://www.sphinx-doc.org/
25
+ exit /b 1
26
+ )
27
+
28
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29
+ goto end
30
+
31
+ :help
32
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33
+
34
+ :end
35
+ popd
@@ -0,0 +1,3 @@
1
+ sphinx>=7.2
2
+ sphinx-rtd-theme>=2.0
3
+ myst-parser>=2.0
File without changes