Skip to content

Commit

Permalink
Merge branch 'main' into bump-version
Browse files Browse the repository at this point in the history
  • Loading branch information
zakstucke authored Oct 6, 2023
2 parents 9a040c9 + 3021d76 commit 7285f83
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
run: pdm run mike deploy --push -b docs-site develop

- name: (version HAS changed) Deploy doc version and set to latest
if: steps.check-version.outputs.current-version
if: steps.check-version.outputs.previous-version != steps.check-version.outputs.current-version
run: | # Only pushing on the second command to avoid pushing twice
pdm run mike deploy -b docs-site --update-aliases ${{ steps.check-version.outputs.current-version }} latest &&
pdm run mike set-default ${{ steps.check-version.outputs.current-version }} --push -b docs-site
25 changes: 25 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,31 @@ jobs:
run: |
pdm run -v nox --session=qa
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: "3.12"
cache: true

# Docs needs credentials to check contributors
- name: Set git credentials
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- name: Install Nox
run: |
pdm sync -d -G nox
- name: Build docs
run: |
pdm run -v nox --session=docs
tests:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ ENV/
env.bak/
venv.bak/

# mkdocs/mike local build directory:
site/

# Vscode internals
.vscode/

Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
exclude: (^notebooks/)
repos:
# export python requirements https://pdm.fming.dev/latest/usage/advanced/
- repo: https://github.com/pdm-project/pdm
rev: 2.9.3 # a PDM release exposing the hook
hooks:
- id: pdm-export
# command arguments, e.g.:
args: ["-o", "requirements.txt", "--without-hashes"]
files: ^pdm.lock$
- repo: local
hooks:
- id: codespell
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Watz Python
# Watz Python SDK

[![PyPI](https://img.shields.io/pypi/v/watz.svg)][pypi status]
[![Status](https://img.shields.io/pypi/status/watz.svg)][pypi status]
Expand All @@ -22,7 +22,7 @@ Python SDK for Watz APIs

## Installation

You can install _Watz Python_ via [pip](https://pip.pypa.io/) from [PyPI](https://pypi.org/):
You can install `watz` via [pip](https://pip.pypa.io/) from [PyPI](https://pypi.org/):

```console
$ pip install watz
Expand All @@ -39,8 +39,8 @@ To learn more, see the [Contributor Guide](CONTRIBUTING.md).

## License

Distributed under the terms of the [Apache 2.0 license](LICENSE.md),
_Watz Python_ is free and open source software.
Distributed under the terms of the [Apache 2.0 license](LICENSE.md), the
_Watz Python SDK_ is free and open source software.

## Issues

Expand Down
2 changes: 1 addition & 1 deletion docs/assets/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/watz-py-0.0.1.zip
Binary file not shown.
12 changes: 6 additions & 6 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
site_name: "Watz Python"
site_name: "Watz Python SDK"
site_url: "https://watz-inc.github.io/watz-py/" # Trailing slash is recommended
repo_url: "https://github.com/watz-inc/watz-py"

Expand Down Expand Up @@ -43,10 +43,10 @@ extra:

nav:
- Home:
- index.md
- index.md
- API:
- reference.md
- reference.md
- Contributing:
- CONTRIBUTING.md
- CODE_OF_CONDUCT.md
- LICENSE.md
- CONTRIBUTING.md
- CODE_OF_CONDUCT.md
- LICENSE.md
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
requires = ['hatchling']
build-backend = 'hatchling.build'

[tool.hatch.build.targets.sdist]
# limit which files are included in the sdist (.tar.gz) asset,
# see https://github.com/pydantic/pydantic/pull/4542
include = ['/README.md', '/watz', '/tests', '/requirements.txt']

[tool.pdm]
[tool.pdm.dev-dependencies]
Expand All @@ -27,9 +31,6 @@ docs = [
# Weirdly Mike fails without this being explicitly available (don't think nox is installing it)
"setuptools>=61.0",
]
[tool.pdm.build]
package-dir = "watz"


[project]
name = "watz"
Expand Down
2 changes: 1 addition & 1 deletion watz/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Watz Python."""
"""The Watz Python SDK."""

from importlib.metadata import version

Expand Down

0 comments on commit 7285f83

Please sign in to comment.