Skip to content

Commit

Permalink
Merge pull request #2 from PedroBinotto/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
PedroBinotto authored May 13, 2024
2 parents f3929d5 + ed8ea69 commit 5e7d63a
Show file tree
Hide file tree
Showing 28 changed files with 1,051 additions and 29 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish Documentation
on:
push:
tags: '*'
pull_request:
branches:
- main
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python 3.12
- uses: actions/setup-python@v2
with:
python-version: 3.12
- name: Install
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install -E amazon -E docs
- name: Build documentation
run: |
mkdir gh-pages
touch gh-pages/.nojekyll
cd docs/
poetry run sphinx-build -b html . _build
cp -r _build/* ../gh-pages/
- name: Deploy documentation
if: ${{ github.event_name == 'push' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: gh-pages
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,23 @@ repos:
require_serial: true
types:
- python
files:
metrify tests
- id: lint
name: Lint
entry: poetry run pylint
language: system
require_serial: true
types:
- python
files:
metrify tests
- id: Type checks
name: mypy
entry: poetry run mypy
language: system
require_serial: true
types:
- python
files:
metrify tests
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

![Tox](https://github.com/PedroBinotto/metrify/actions/workflows/tests.yaml/badge.svg)

Sistema de coleta automática de métricas com base nos webhooks do Github
Projects.
Sistema de coleta automática de métricas com base na API do Github.

## Configuração do ambiente de desenvolvimento

Expand Down Expand Up @@ -121,7 +120,7 @@ O repositório do projeto é disposto de acordo com a estrutura a seguir:
├── metrify
│   ├── hello
│   │   ├── __init__.py
│   │   ├── operations.py
│   │   ├── strategies.py
│   │   └── routes.py
│   ├── __init__.py
│   └── metrify.py
Expand All @@ -131,7 +130,7 @@ O repositório do projeto é disposto de acordo com a estrutura a seguir:
├── tests
│   ├── hello
│   │   ├── __init__.py
│   │   └── test_operations.py
│   │   └── test_strategies.py
│   └── __init__.py
└── tox.ini
```
Expand All @@ -148,9 +147,9 @@ arquivos no diretório-fonte (`metrify/`).
onde "src" refere-se ao nome da função que está sendo testada. ex.:
```python
# file: tests.hello.test_operations
# file: tests.hello.test_strategies
from metrify.hello.operations import hello
from metrify.hello.strategies import hello
def test_hello():
"""Returns 'Hello, World!'"""
Expand Down Expand Up @@ -182,7 +181,7 @@ poetry run mypy metrify tests # type check
Ou em arquivos individuais:
```bash
poetry run pylint metrify/hello/operations.py
poetry run pytest tests/hello/test_operations.py
poetry run pylint metrify/hello/strategies.py
poetry run pytest tests/hello/test_strategies.py
...
```
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
27 changes: 27 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = "metrify"
copyright = "2024, Pedro Binotto, Eric Fernandes Evaristo"
author = "Pedro Binotto, Eric Fernandes Evaristo"
version = "0.1.0"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = ["sphinx_rtd_theme", "sphinx.ext.doctest", "sphinx.ext.autodoc"]

templates_path = ["_templates"]
exclude_patterns = []

language = "pt_BR"

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]
13 changes: 13 additions & 0 deletions docs/source/impl/hello/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
:mod:`hello` -- Módulo de Demonstração e Exemplificação Técnica
===============================================================

.. automodule:: metrify.hello
:synopsis: Módulo de Demonstração e Exemplificação Técnica
:members: strategies

Sub-modules:

.. toctree::
:maxdepth: 2

strategies
7 changes: 7 additions & 0 deletions docs/source/impl/hello/strategies.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:mod:`strategies` -- Funções de implementação do módulo
=======================================================

.. automodule:: metrify.hello.strategies
:synopsis: Funções de implementação do módulo

.. autofunction:: metrify.hello.strategies.hello
11 changes: 11 additions & 0 deletions docs/source/impl/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
impl - Documentação interna de implementação
============================================

O código do **metrify** segue um esquema de padronização orientado a funções e
mantém uma aplicação sem estado próprio, para garantir que os diferentes
do sistema componentes sejam simples de descrever, testar, e documentar.

.. toctree::
:maxdepth: 2

hello/index
40 changes: 40 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.. metrify documentation master file, created by
sphinx-quickstart on Mon May 13 18:12:38 2024.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to metrify's documentation!
===================================

Overview
--------
**metrify** é uma aplicação desenvolvida para scrum masters e equipes ágeis com
o propósito automatizar a coleta e processamento de métricas relacionadas ao
progresso de sprints e o cálculo e estimativa de rendimento com base em análise
estatística do histórico de dados através do consumo da API do *Github*.

.. note::
Este projeto está em fase de desenvolvimento ativo.

:doc:`installation`
Instruções sobre instalação e execução.

:doc:`impl/index`
Documentação compreensiva do código de implementação, organizado por módulo.

.. quqm sabe adicionar uma seção adereçando o GraohQL
.. toctree::
:hidden:

installation
impl/index



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Loading

0 comments on commit 5e7d63a

Please sign in to comment.