Skip to content

Commit

Permalink
add config (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsv1 authored Apr 27, 2022
1 parent e1923fc commit 1004239
Show file tree
Hide file tree
Showing 11 changed files with 204 additions and 226 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ name: Publish
on:
push:
tags:
- '*'
- 'v*.*.*'

jobs:
publish:
publish_pypi:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.10'
- name: Build
run: make build
- name: Publish
Expand Down
28 changes: 7 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,22 @@ name: Test
on:
push:
branches:
- '*'
tags-ignore:
- '*'
schedule:
# every Wed at 07:00 UTC
- cron: '0 7 * * 3'
- "**"
paths-ignore:
- "**.md"

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ['3.7', '3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -33,15 +31,3 @@ jobs:
uses: codecov/codecov-action@v1
with:
fail_ci_if_error: false

build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.8'
- name: Build
run: make build
158 changes: 18 additions & 140 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,113 +1,3 @@
# Created by https://www.toptal.com/developers/gitignore/api/python,pycharm,virtualenv,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=python,pycharm,virtualenv,visualstudiocode

### PyCharm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### PyCharm Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/

# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/

# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$

# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -204,7 +94,22 @@ ipython_config.py
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
Expand Down Expand Up @@ -247,32 +152,5 @@ dmypy.json
# Cython debug symbols
cython_debug/

### VirtualEnv ###
# Virtualenv
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
[Bb]in
[Ii]nclude
[Ll]ib
[Ll]ib64
[Ll]ocal
[Ss]cripts
pyvenv.cfg
pip-selfcheck.json

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

# End of https://www.toptal.com/developers/gitignore/api/python,pycharm,virtualenv,visualstudiocode
# PyCharm
.idea/
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,40 @@ GitLab (>=12.0) reporter with [collapsable sections](https://docs.gitlab.com/ee/

## Installation

### 1. Install package

```shell
$ pip3 install vedro-gitlab-reporter
```

### 2. Enable plugin

```python
# ./bootstrap.py
# ./vedro.cfg.py
import vedro
from vedro_gitlab_reporter import GitlabReporter
import vedro_gitlab_reporter as v

class Config(vedro.Config):

class Plugins(vedro.Config.Plugins):

vedro.run(plugins=[GitlabReporter()])
class GitlabReporter(v.GitlabReporter):
enabled = True
```

## Usage

### Run tests
```shell
$ python3 bootstrap.py -r gitlab -vvv
$ python3 bootstrap.py -r gitlab --gitlab-collapsable steps
```

## Documentation

### Verbose Levels

`-v` — show exception and collapsable steps

`-vv` — show exception, steps and collapsable variables
`--gitlab-collapsable=<mode>`

`-vvv` — show exception, steps and collapsable scope
| Mode | Description |
| ----- | ----------------------------------------------- |
| steps | Show exception and collapsable steps |
| vars | Show exception, steps and collapsable variables |
| scope | Show exception, steps and collapsable scope |
10 changes: 5 additions & 5 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
baby-steps==1.2.0
baby-steps==1.2.1
bump2version==1.0.1
codecov==2.1.12
coverage==5.5
coverage==6.3.2
flake8==4.0.1
isort==5.10.1
mypy==0.931
pytest==6.2.5
pytest-asyncio==0.16.0
mypy==0.942
pytest==7.1.2
pytest-asyncio==0.18.3
pytest-cov==3.0.0
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
vedro>=1.3,<2.0
vedro>=1.5,<2.0
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ python_files = test_*.py
python_classes =
python_functions = test_*
markers = only
asyncio_mode = strict
filterwarnings =
ignore:.*verbose.*deprecated.*collapsable.*:DeprecationWarning
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def find_dev_required():
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Typing :: Typed",
],
)
Loading

0 comments on commit 1004239

Please sign in to comment.