Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tox to Nox #317

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
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
23 changes: 9 additions & 14 deletions .github/PULL_REQUEST_TEMPLATE/Feature_Bugfix.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,20 @@ fixes #
#### Affected Handlers
<!-- Please provide affected handlers. -->


#### Description of Change
<!-- Please provide a description of the change here. -->

-
-

#### Checklist
<!-- The fields marked with (*) are Mandatory for bugfixes. -->

- [ ] Have you documented your changes?
- [ ] Have you checked, to ensure, there aren't other open _Pull Requests_ for the same update/change?
- [ ] Have you created an issue first?
- [ ] Have you added or changed tests for your code?
- [ ] (\*) Have you created an issue first?
- [ ] (\*) Have you checked to ensure there aren't other open Pull Requests for
the same update/change?
- [ ] (\*) Have you created a `newsfragment` in `./news/`?
- [ ] (\*) Have you lint your code locally before submission?
- [ ] (\*) Did you ran `tox` and everything passed?
- [ ] (\*) I haven't added any dependencies without approval.

I have read and accept the:
- [ ] Have you documented your changes?
- [ ] Have you created a `newsfragment` in `./news/`?
- [ ] I haven't added any dependencies without approval.
- [ ] Did you ran `nox` and everything passed?

- [ ] (\*) [Code of Conduct & Contribution Guidlines](https://matrixctl.rtfd.io/en/latest/contributer_documentation/index.html)
#### I have read and accept the
- [ ] [Code of Conduct & Contribution Guidlines](https://matrixctl.rtfd.io/en/latest/contributer_documentation/index.html)
48 changes: 6 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# matrixctl
# Copyright (c) 2020 Michael Sasser <[email protected]>
# Copyright (c) 2020-2021 Michael Sasser <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -18,50 +18,14 @@ name: Python CI

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master, develop ]
branches: [master, develop]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]
- name: Set up Python 3.9
uses: actions/[email protected]
with:
python-version: 3.9

- name: Install Poetry
uses: snok/[email protected]
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/[email protected]
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

- name: Install Project Dependencies
run: poetry install -E docs
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'

- name: Run pre-commit
run: |
source .venv/bin/activate
pre-commit run --all-files

- name: Sphinx Build
working-directory: ./docs
run: |
source ../.venv/bin/activate
make html

- name: Test with pytest
run: |
source .venv/bin/activate
poetry run pytest
- uses: actions/checkout@v2
- uses: excitedleigh/[email protected]
- run: nox
58 changes: 29 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ name: "CodeQL"

on:
push:
branches: [ develop ]
branches: [develop]
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]
branches: [develop]
schedule:
- cron: '19 1 * * 3'
- cron: "19 1 * * 3"

jobs:
analyze:
Expand All @@ -32,40 +32,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
language: ["python"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Checkout repository
uses: actions/[email protected]

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
4 changes: 3 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
---
name: github pages

# Development docs

on:
push:
branches:
- master
- develop

jobs:
deploy:
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,4 @@ jobs:
- name: pypi-publish
uses: pypa/[email protected]
with:
# PyPI user
# user: # optional, default is __token__
# Password for your PyPI user or an access token
password: ${{ secrets.pypi_token }}
# The repository URL to use
# repository_url: # optional
# The target directory for distribution
# packages_dir: # optional, default is dist
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ repos:
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies: ["flake8-bugbear"]
additional_dependencies: ["flake8-bugbear", "flake8-comprehensions"]

# check docstrings
- repo: https://github.com/PyCQA/pydocstyle
Expand Down Expand Up @@ -189,6 +189,6 @@ repos:
# - id: prospector
# PEP 585 Upgrade (Type Hints)
- repo: https://github.com/sondrelg/pep585-upgrade
rev: v1
rev: v1.0.1
hooks:
- id: upgrade-type-hints
1 change: 0 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import os
import sys

from datetime import date
from pathlib import Path

Expand Down
Loading