diff --git a/Makefile b/Makefile deleted file mode 100644 index ce86ccc..0000000 --- a/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# TODO: migrate to hatch - -VERSION := $(shell hatch --no-color version) - -release: - git checkout main && git pull origin && git fetch -p - @git log --pretty=format:"%C(yellow)%h%Creset %s%Cgreen%d" --reverse -20 - @echo "\nReleasing v$(VERSION) in 10 seconds. Press to abort\n" && sleep 10 - hatch run test && git commit -a -m 'v$(VERSION)' && git tag -a v$(VERSION) -m 'v$(VERSION)' - git push --follow-tags diff --git a/README.md b/README.md index 98a78a8..7f56652 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build](https://img.shields.io/github/actions/workflow/status/frictionlessdata/dplib-py/general.yaml?branch=main)](https://github.com/frictionlessdata/dplib-py/actions) [![Coverage](https://img.shields.io/codecov/c/github/frictionlessdata/dplib-py/main)](https://codecov.io/gh/frictionlessdata/dplib-py) -[![Release](https://img.shields.io/pypi/v/dplib-py.svg)](https://pypi.python.org/pypi/dplib-py) [![Codebase](https://img.shields.io/badge/codebase-github-brightgreen)](https://github.com/frictionlessdata/dplib-py) +[![Release](https://img.shields.io/pypi/v/dplib-py.svg)](https://pypi.python.org/pypi/dplib-py) -Python implementation of the Data Package standard and various models and utils for working with data. +Python implementation of the Data Package standard and various models and utils for working with data diff --git a/docs/contributing/development.md b/docs/contributing/development.md index c87ad80..bf396e5 100644 --- a/docs/contributing/development.md +++ b/docs/contributing/development.md @@ -33,26 +33,18 @@ Now you can setup you IDE to use a proper Python path: .python/dplib-py/bin/python ``` -## Installation - -To start working on the project install the dependencies: - -```bash -hatch install -``` - ## Documentation Documentation is written with Mkdocs (defined in `mkdocs.yaml`). The source articles are in the `docs` directory. To start a live-reload server: ```bash -hatch write +hatch run serve ``` Building the docs: ```bash -hatch docs +hatch run docs ``` ## Testing @@ -60,7 +52,7 @@ hatch docs To run all the checks on the codebase: ```bash -hatch test +hatch run test ``` ## Releasing @@ -72,5 +64,5 @@ Update the version and initiate the release script: ```bash # Ensure you're on the up-to-date `main` branch hatch version -make release +hatch run release ``` diff --git a/docs/index.md b/docs/index.md index 3cf1052..7f56652 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,7 +2,7 @@ [![Build](https://img.shields.io/github/actions/workflow/status/frictionlessdata/dplib-py/general.yaml?branch=main)](https://github.com/frictionlessdata/dplib-py/actions) [![Coverage](https://img.shields.io/codecov/c/github/frictionlessdata/dplib-py/main)](https://codecov.io/gh/frictionlessdata/dplib-py) -[![Release](https://img.shields.io/pypi/v/dplib-py.svg)](https://pypi.python.org/pypi/dplib-py) [![Codebase](https://img.shields.io/badge/codebase-github-brightgreen)](https://github.com/frictionlessdata/dplib-py) +[![Release](https://img.shields.io/pypi/v/dplib-py.svg)](https://pypi.python.org/pypi/dplib-py) Python implementation of the Data Package standard and various models and utils for working with data diff --git a/pyproject.toml b/pyproject.toml index 03f2a4e..f8831dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -98,6 +98,19 @@ lint = [ "isort dplib --check", "black dplib --check", ] +release = [ + """ + VERSION=$(hatch run version) + git checkout main && git pull origin && git fetch -p + git log --pretty=format:"%C(yellow)%h%Creset %s%Cgreen%d" --reverse -20 + echo "\nReleasing v${VERSION} in 10 seconds. Press to abort\n" && sleep 10 + hatch run test && git commit -a -m 'v${VERSION}' && git tag -a v${VERSION} -m 'v${VERSION}' + git push --follow-tags + """ +] +serve = [ + "mkdocs serve", +] spec = [ "pytest --cov dplib --cov-report term-missing --cov-report html:coverage --cov-fail-under 0 --timeout=300", ] @@ -109,8 +122,8 @@ test = [ type = [ "pyright dplib", ] -write = [ - "mkdocs serve", +version = [ + "hatch --no-color version" ] [[tool.hatch.envs.ci.matrix]]