diff --git a/.cruft.json b/.cruft.json index a597197..01c4758 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/iterative/py-template", - "commit": "46ace5315b5c697135c690bdbc42fd4a898b259a", + "commit": "f1ee970dd61d000f61cfd952a6578df645c518c8", "checkout": null, "context": { "cookiecutter": { @@ -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" } }, diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 393a944..56f6f98 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,6 +7,12 @@ 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" @@ -14,3 +20,10 @@ updates: 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" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index a4ea6ba..0000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Documentation - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/setup-python@v2 - - run: pip install '.[docs]' - - run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com' - - name: Publish docs - run: mkdocs gh-deploy diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 62ad60b..bfee8df 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: | @@ -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 }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9525a31..0562fcf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: @@ -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 }} @@ -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 diff --git a/.github/workflows/update-template.yaml b/.github/workflows/update-template.yaml index 23e5425..582d726 100644 --- a/.github/workflows/update-template.yaml +++ b/.github/workflows/update-template.yaml @@ -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 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index b2fb087..9a04ad9 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -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 @@ -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_ diff --git a/docs/assets/logo.svg b/docs/assets/logo.svg deleted file mode 100644 index 360d19f..0000000 --- a/docs/assets/logo.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index e45ef75..0000000 --- a/docs/index.md +++ /dev/null @@ -1,3 +0,0 @@ -# Welcome to Iterative Telemetry - -- [API Reference](./reference/iterative_telemetry/index.md) diff --git a/mkdocs.yml b/mkdocs.yml deleted file mode 100644 index 5591812..0000000 --- a/mkdocs.yml +++ /dev/null @@ -1,33 +0,0 @@ -site_name: Iterative Telemetry - -theme: - name: material - logo: assets/logo.svg - favicon: assets/logo.svg - palette: - primary: white - accent: deep purple - icon: - repo: fontawesome/brands/github - -repo_url: https://github.com/iterative/iterative-telemetry -repo_name: iterative/iterative-telemetry - -extra: - social: - - icon: fontawesome/brands/github - link: https://github.com/iterative/ - -plugins: -- search -- gen-files: - scripts: - - docs/gen_ref_pages.py -- section-index -- mkdocstrings: - handlers: - python: - rendering: - show_submodules: no - watch: - - src/iterative_telemetry diff --git a/noxfile.py b/noxfile.py index 7c21af1..72f756c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -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( diff --git a/pyproject.toml b/pyproject.toml index 171d7f8..3782709 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] diff --git a/setup.cfg b/setup.cfg index cc35ea7..ae7d066 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,14 +11,13 @@ authors = Iterative maintainer_email = support@dvc.org 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 @@ -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 =