Skip to content

cruft update #42

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

Merged
merged 2 commits into from
Aug 26, 2022
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
8 changes: 2 additions & 6 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/iterative/py-template",
"commit": "46ace5315b5c697135c690bdbc42fd4a898b259a",
"commit": "f1ee970dd61d000f61cfd952a6578df645c518c8",
"checkout": null,
"context": {
"cookiecutter": {
Expand All @@ -13,13 +13,9 @@
"version": "0.0.0",
"copyright_year": "2022",
"license": "Apache-2.0",
"docs": "False",
"short_description": "Common library for sending telemetry",
"development_status": "Development Status :: 1 - Planning",
"_copy_without_render": [
".github/workflows/release.yaml",
".github/workflows/tests.yaml",
".github/workflows/update-template.yaml"
],
"_template": "https://github.com/iterative/py-template"
}
},
Expand Down
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,23 @@ updates:
interval: "weekly"
labels:
- "maintenance"
# Update via cruft
ignore:
- dependency-name: "mkdocs*"
- dependency-name: "pytest*"
- dependency-name: "pylint"
- dependency-name: "mypy"

- directory: "/"
package-ecosystem: "github-actions"
schedule:
interval: "weekly"
labels:
- "maintenance"
# Update via cruft
ignore:
- dependency-name: "actions/checkout"
- dependency-name: "actions/setup-python"
- dependency-name: "pypa/gh-action-pypi-publish"
- dependency-name: "codecov/codecov-action"
- dependency-name: "peter-evans/create-pull-request"
20 changes: 0 additions & 20 deletions .github/workflows/docs.yml

This file was deleted.

15 changes: 11 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,24 @@ name: Release
on:
release:
types: [published]
workflow_dispatch:

env:
FORCE_COLOR: "1"

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python 3.7
uses: actions/setup-python@v2
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.7'
python-version: '3.10'

- name: Upgrade pip and nox
run: |
Expand All @@ -26,6 +32,7 @@ jobs:
run: nox -s build

- name: Upload package
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
23 changes: 18 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
name: Tests

on: [push, pull_request]
on:
push:
branches: [main]
pull_request:
workflow_dispatch:

env:
FORCE_COLOR: "1"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
tests:
Expand All @@ -10,14 +21,16 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
pyv: ['3.7', '3.8', '3.9', '3.10']
pyv: ['3.8', '3.9', '3.10']

steps:
- name: Check out the repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python ${{ matrix.pyv }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.pyv }}

Expand All @@ -34,7 +47,7 @@ jobs:
run: nox -s tests-${{ matrix.pyv }} -- --cov-report=xml

- name: Upload coverage report
uses: codecov/codecov-action@v2.1.0
uses: codecov/codecov-action@v3.1.0

- name: Build package
run: nox -s build
19 changes: 12 additions & 7 deletions .github/workflows/update-template.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@

name: Update template

on:
schedule:
- cron: '5 1 * * *' # every day at 01:05

workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install deps
run: pip install cruft
- name: Update template
- name: Check out the repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Update template via cruft
id: update
run: |
pip install cruft
cruft update -y
echo "::set-output name=changes::$(git diff)"

- name: Create PR
if: ${{ steps.update.outputs.changes != '' }}
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v4
with:
commit-message: update template
title: update template
4 changes: 1 addition & 3 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ welcomes contributions in the form of bug reports, feature requests, and pull re
Here is a list of important resources for contributors:

- `Source Code`_
- `Documentation`_
- `Issue Tracker`_
- `Code of Conduct`_

.. _Apache 2.0 license: https://opensource.org/licenses/Apache-2.0
.. _Source Code: https://github.com/iterative/iterative-telemetry
.. _Documentation: https://iterative-telemetry.readthedocs.io/
.. _Issue Tracker: https://github.com/iterative/iterative-telemetry/issues

How to report a bug
Expand Down Expand Up @@ -43,7 +41,7 @@ Request features on the `Issue Tracker`_.
How to set up your development environment
------------------------------------------

You need Python 3.7+ and the following tools:
You need Python 3.8+ and the following tools:

- Nox_

Expand Down
1 change: 0 additions & 1 deletion docs/assets/logo.svg

This file was deleted.

3 changes: 0 additions & 3 deletions docs/index.md

This file was deleted.

33 changes: 0 additions & 33 deletions mkdocs.yml

This file was deleted.

2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
locations = "src", "tests"


@nox.session(python=["3.7", "3.8", "3.9", "3.10"])
@nox.session(python=["3.8", "3.9", "3.10"])
def tests(session: nox.Session) -> None:
session.install(".[tests]")
session.run(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=48", "wheel", "setuptools_scm[toml]>=6.3.1"]
requires = ["setuptools>=48", "setuptools_scm[toml]>=6.3.1"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
Expand Down
22 changes: 6 additions & 16 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ authors = Iterative
maintainer_email = [email protected]
classifiers =
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Development Status :: 1 - Planning
Development Status :: 4 - Beta

[options]
python_requires = >=3.7
python_requires = >=3.8
zip_safe = False
package_dir=
=src
Expand All @@ -30,25 +29,16 @@ install_requires=
distro

[options.extras_require]
docs =
mkdocs==1.3.0
mkdocs-gen-files==0.3.4
mkdocs-material==8.2.11
mkdocs-section-index==0.3.4
mkdocstrings-python==0.6.6

tests =
pytest==7.1.2
pytest-sugar==0.9.4
pytest-sugar==0.9.5
pytest-cov==3.0.0
pytest-mock==3.7.0
pylint==2.13.7
mypy==0.942
pytest-mock==3.8.2
pylint==2.14.5
mypy==0.971
types-requests

dev =
%(tests)s
%(docs)s

[options.packages.find]
exclude =
Expand Down