Skip to content

Commit

Permalink
Merge pull request #3 from sb-ai-lab/dev/CICD
Browse files Browse the repository at this point in the history
Added CI/CD 

Code checks:

black
flake8
mypy
darglint
pre-commit
rstcheck
isort
CD:

autotest in all platforms after push\merge in master or dev/master
Issue templates
  • Loading branch information
tikhomirovd authored Nov 16, 2023
2 parents 6e11e53 + 66263bf commit 42c5c9f
Show file tree
Hide file tree
Showing 43 changed files with 282 additions and 4,068 deletions.
4 changes: 4 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[flake8]
max-line-length = 120
ignore = E203, E266, E501, W503
exclude = .venv, .git, __pycache__, build, dist
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug
about: Create a bug report
title: ''
labels: bug
assignees:

---

## 🐛 Bug

<!-- A clear and concise description of the bug. -->

### To Reproduce

Steps to reproduce the behavior:

1. Go to '...'
2. Run '....'
3. ...

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

### Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

### Additional context

<!-- Add any other context about the problem here. -->

### Checklist

- [ ] bug description
- [ ] steps to reproduce
- [ ] expected behavior
- [ ] code sample / screenshots
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Feature request
about: Suggest a feature to implement
title: ''
labels: enhancement
assignees:

---

## 🚀 Feature Request

<!-- A clear and concise description of the feature proposal. -->

### Motivation

<!-- Please outline the motivation for the proposal. If this is related to another GitHub issue, please link here too -->

### Proposal

<!-- A clear and concise description of what you want to happen. -->

### Alternatives

<!-- A clear and concise description of any alternative solutions or features you've considered. -->

### Additional context

<!-- Add any other context or screenshots about the feature request here. -->

### Checklist

- [ ] feature proposal description
- [ ] motivation
- [ ] additional context / proposal alternatives review
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: How to question
about: Asking how-to questions
title: ''
labels: help wanted, question
assignees:
---

## ❓ Questions and Help

### Before asking:

1. search the issues.
2. search the docs.

#### What is your question?

#### Code

<!-- Please paste a code snippet if your question requires it! -->

#### What have you tried?

### Additional context

<!-- Add any other context about the problem here. -->
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Continuous Integration

on:
push:
branches: [ master, dev/master ]
paths-ignore:
- "docs/**"
- "*.md"
pull_request:
branches: [ master, dev/master ]
paths-ignore:
- "docs/**"
- "*.md"

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ 3.8, 3.9, 3.10.10 ]
os: [ ubuntu-latest, macos-latest, windows-latest ]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Run pre-commit checks
run: poetry run pre-commit run --all-files
- name: Run tests
run: poetry run pytest
46 changes: 46 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black
language_version: python3.10

- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
language_version: python3.10

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.0
hooks:
- id: mypy
language_version: python3.10

- repo: https://github.com/terrencepreilly/darglint
rev: v1.8.1
hooks:
- id: darglint
language_version: python3.10


- repo: https://github.com/myint/rstcheck
rev: v6.2.0
hooks:
- id: rstcheck
language_version: python3.10
exclude: ^docs/_templates/

- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
language_version: python3.10
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ formats: all
python:
install:
- requirements: docs/requirements.txt
- path: .
- path: .
13 changes: 7 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import os
import sys


CURR_PATH = os.path.abspath(os.path.dirname(__file__))
LIB_PATH = os.path.join(CURR_PATH, os.path.pardir)
sys.path.insert(0, LIB_PATH)
Expand All @@ -37,7 +38,12 @@
"IPython.sphinxext.ipython_console_highlighting",
]

exclude_patterns = ["_build/*", "**.ipynb_checkpoints"]
exclude_patterns = [
"_build/*",
"**.ipynb_checkpoints",
"Thumbs.db",
".DS_Store",
]

# Delete external references
autosummary_mock_imports = [
Expand All @@ -62,11 +68,6 @@
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand Down
31 changes: 0 additions & 31 deletions docs/index.rst

This file was deleted.

28 changes: 0 additions & 28 deletions docs/pages/Installation.rst

This file was deleted.

13 changes: 0 additions & 13 deletions docs/pages/Python-API.rst

This file was deleted.

10 changes: 0 additions & 10 deletions docs/pages/Tutorials.rst

This file was deleted.

23 changes: 0 additions & 23 deletions docs/pages/modules/ab_test.rst

This file was deleted.

52 changes: 0 additions & 52 deletions docs/pages/modules/algorithms.rst

This file was deleted.

Loading

0 comments on commit 42c5c9f

Please sign in to comment.