Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/doc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Docs via GitHub Pages

on:
push:
branches:
- main

jobs:
lint:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Pip updated
run: |
pip install --upgrade pip
- name: Doc installation
run: |
make install-doc
- name: Documenting
run: |
make doc
30 changes: 30 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint the module

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
# needs: NOTHING
lint:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Pip updated
run: |
pip install --upgrade pip
- name: Lint installation
run: |
make install-lint
- name: Linting
run: |
make lint
33 changes: 33 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test the module

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
tests:
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
# os: [ubuntu-20.04, ubuntu-22.04]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install the module and its dependencies
run: |
make install
- name: Show dependencies
run: python -m pip list
- name: Run tests
run: make test-parallel
- name: Publish code coverage
uses: codecov/codecov-action@v3
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pages:
echo "*********** Pip updated ***********"
make install-doc
echo "*********** Docs dependencies installed ***********"
mkdocs build
make doc
echo "*********** Successfully builded the project documentation ***********"
# only:
# - main
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ install-test: ## Install only test version of the package
pip install .[test]

install-lint:
pip install ruff==0.0.193
pip install black[d]==23.1.0 ruff==0.0.246

install-build:
pip install -U build
Expand Down
11 changes: 7 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "python_template"
version = "0.0.0"
description = "Python Template"
requires-python = ">=3.8,<3.9"
requires-python = ">=3.8,<3.12"

authors = [
{name = "template", email = "template@github.com"},
Expand All @@ -28,6 +28,9 @@ classifiers = [
"Operating System :: Unix",
"Operating System :: MacOS",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]

dependencies = [
Expand All @@ -51,9 +54,9 @@ doc = [
]

dev = [
"black[d]",
"pre-commit",
"black[d]==23.1.0",
"ruff==0.0.246",
"pre-commit",
"mypy",
"build",
]
Expand Down Expand Up @@ -173,7 +176,7 @@ combine-as-imports = true
# mypy section
# Read more here: https://mypy.readthedocs.io/en/stable/config_file.html#using-a-pyproject-toml-file
[tool.mypy]
python_version = "3.8"
# python_version = "3.8"
files = ["python_template"]
# exclude = ['^tests/']
strict = true
Expand Down