Skip to content

Commit

Permalink
try tox.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
bdpedigo committed Dec 18, 2023
1 parent d8e6b0f commit 992b9f8
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 73 deletions.
15 changes: 0 additions & 15 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
name: Bug report
about: Create a report to help us improve
title: "[BUG] "
labels: ''
assignees: ''

labels: ""
assignees: ""
---

**Describe the bug**
Expand All @@ -20,5 +19,6 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**System (please complete the following information):**
- OS: [e.g. iOS, Windows, Linux; please provide version numbers]
- Package version [e.g. 0.2.1]

- OS: [e.g. iOS, Windows, Linux; please provide version numbers]
- Package version [e.g. 0.2.1]
12 changes: 2 additions & 10 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# Run tests and linting
name: Dev (formatting, tests, test build docs)

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
pull_request:
Expand All @@ -13,21 +11,16 @@ on:
# Allows other workflows to trigger this workflow
workflow_call:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "test"
test:
name: Run tests and auto checks on code
# The type of runner that the job will run on
strategy:
matrix:
python-versions: [3.11, 3.12]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get repo
uses: actions/checkout@v4

Expand All @@ -36,8 +29,6 @@ jobs:
with:
python-version: ${{ matrix.python-versions }}

# - name: Install Poetry
# uses: snok/install-poetry@v1
- name: Install Poetry
uses: abatilo/actions-poetry@v2

Expand All @@ -47,5 +38,6 @@ jobs:
- name: Find tox
run: poetry run tox --version

# tox handles the logic for what tests etc. to run. See tox.ini for details.
- name: Run tox (includes tests, format, lint, docs)
run: poetry run tox -vv
43 changes: 0 additions & 43 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,45 +1,2 @@
[mypy]
ignore_missing_imports = True

[tox:tox]
isolated_build = true
envlist = py311, format, lint, build

[testenv]
allowlist_externals = pytest
extras =
test
passenv = *
commands =
pytest tests -vvv

[testenv:format]
allowlist_externals =
ruff
extras =
test
commands =
ruff format networkframe tests

[testenv:lint]
allowlist_externals =
ruff
mypy
extras =
test
commands =
ruff check networkframe tests
mypy networkframe tests

[testenv:build]
allowlist_externals =
poetry
mkdocs
twine
extras =
doc
dev
commands =
poetry build
mkdocs build
twine check dist/*
42 changes: 42 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[tox]
isolated_build = true
envlist = py311, format, lint, build

[testenv]
allowlist_externals = pytest
extras =
test
passenv = *
commands =
pytest tests -vvv

[testenv:format]
allowlist_externals =
ruff
extras =
test
commands =
ruff format networkframe tests

[testenv:lint]
allowlist_externals =
ruff
mypy
extras =
test
commands =
ruff check networkframe tests
mypy networkframe tests

[testenv:build]
allowlist_externals =
poetry
mkdocs
twine
extras =
doc
dev
commands =
poetry build
mkdocs build
twine check dist/*

0 comments on commit 992b9f8

Please sign in to comment.