Skip to content

Commit

Permalink
Updated docs styling and testing dependencies (#11)
Browse files Browse the repository at this point in the history
* Initialize template from version c35f399bd91db9ed6fa9f276f2e60023ac56bb8a

* Update template to version f4840f3f2382a912a6730a6520061e4fcc274ca1

* Update release notes and version

* Update locks
  • Loading branch information
wesleykendall authored Aug 24, 2024
1 parent b6f207d commit f08fd63
Show file tree
Hide file tree
Showing 20 changed files with 241 additions and 663 deletions.
34 changes: 15 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ orbs:
docker:
- image: opus10/circleci-python-library:2024-04-17
environment:
# Ensure makefile commands are not wrapped in "docker-compose run"
# Ensure makefile commands are not wrapped in "docker compose run"
EXEC_WRAPPER: ''
TOX_PARALLEL_NO_SPINNER: 1
commands:
test:
steps:
Expand Down Expand Up @@ -51,16 +50,6 @@ jobs:
- run: make dependencies
- run: make type-check || true

check_changelog:
executor: opus10/python
steps:
- checkout
- restore_cache:
key: v4-{{ checksum "poetry.lock" }}
- run: make dependencies
- run: git tidy-log origin/main..
- run: make tidy-lint

deploy:
executor: opus10/python
steps:
Expand All @@ -76,13 +65,18 @@ workflows:
version: 2
on_commit:
jobs:
- test
- lint
- type_check
- check_changelog:
- test:
filters:
branches:
ignore: main
tags:
only: /.*/
- lint:
filters:
tags:
only: /.*/
- type_check:
filters:
tags:
only: /.*/
- deploy:
context: python-library
requires:
Expand All @@ -91,4 +85,6 @@ workflows:
- type_check
filters:
branches:
only: main
ignore: /.*/
tags:
only: /.*/
15 changes: 0 additions & 15 deletions .git-tidy/commit.tpl

This file was deleted.

22 changes: 0 additions & 22 deletions .git-tidy/commit.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions .git-tidy/log.tpl

This file was deleted.

11 changes: 0 additions & 11 deletions .gitcommit.tpl

This file was deleted.

20 changes: 13 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,51 @@
# Changelog

## 0.1.7 (2024-08-24)

#### Changes

- Updated docs styling and testing dependencies by [@wesleykendall](https://github.com/wesleykendall) in [#17](https://github.com/Opus10/footing/pull/11).

## 0.1.6 (2024-04-22)

### Trivial
#### Trivial

- Fixed issues in docs and CI builds. [Wes Kendall, 030110b]
- Update the README and provide a quickstart section. [Wes Kendall, fcb6eb9]

## 0.1.5 (2024-04-22)

### Trivial
#### Trivial

- Update with latest Python template, dropping Python 3.7 support, adding 3.12 support, and migrating docs to mkdocs.. [Wes Kendall, 5259a1f]

## 0.1.4 (2022-08-20)

### Trivial
#### Trivial

- Fix release note rendering and code formatting changes [Wes Kendall, 6ba97f2]

## 0.1.3 (2022-07-31)

### Trivial
#### Trivial

- Updated with the latest Python template, fixing doc builds [Wes Kendall, d6a836a]

## 0.1.2 (2022-06-09)

### Trivial
#### Trivial

- Only install cookiecutter<2.0 because of breaking API changes [Wes Kendall, 4a8b979]

## 0.1.1 (2022-03-19)

### Trivial
#### Trivial

- Updated with latest template, including new local development changes [Wes Kendall, 1127f3c]

## 0.1.0 (2022-01-31)

### Feature
#### Feature

- Initial port of temple into "footing" [Wes Kendall, 6d334df]

Expand Down
26 changes: 1 addition & 25 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,6 @@ If your code fails the linter checks, fix common errors with:

make lint-fix

## Committing

This project uses [git-tidy](https://github.com/Opus10/git-tidy) to produce structured commits with git trailers. Information from commit messages is used to generate release notes and bump the version properly.

To do a structured commit with `git-tidy`, do:

make tidy-commit

All commits in a pull request must be tidy commits that encapsulate a change. Ideally entire features or bug fixes are encapsulated in a single commit. Squash all of your commits into a tidy commit with:

make tidy-squash

To check if your commits pass linting, do:

make tidy-lint

Note, the above command lints every commit since branching from main. You can also run `make shell` and run `git tidy` commands inside the docker environment to do other flavors of `git tidy` commands.

## Documentation

[Mkdocs Material](https://squidfunk.github.io/mkdocs-material/) documentation can be built with:
Expand All @@ -62,10 +44,4 @@ A shortcut for serving them is:

## Releases and Versioning

Anything that is merged into the main branch will be automatically deployed to PyPI. Documentation will be published to a ReadTheDocs at `https://footing.readthedocs.io/`.

The following files will be generated and should *not* be edited by a user:

- `CHANGELOG.md` - Contains an automatically-generated change log for each release.

This project uses [Semantic Versioning](http://semver.org) by analyzing `Type:` trailers on git commit messages (trailers are added when using `git tidy-commit`). In order to bump the minor version, use "feature" or "bug" as the type. In order to bump the major version, use "api-break". The patch version will be updated automatically if none of these tags are present.
The version number and release notes are manually updated by the maintainer during the release process. Do not edit these.
40 changes: 12 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# dependencies - Installs dependencies
# docs - Build documentation
# docs-serve - Serve documentation
# docs-requirements - Build the docs requirements file
# lint - Run code linting and static checks
# lint-fix - Fix common linting errors
# type-check - Run Pyright type-checking
Expand Down Expand Up @@ -54,6 +55,7 @@ ifndef run
" type-check: Run Pyright type-checking\n"\
" docs: Build documentation\n"\
" docs-serve: Serve documentation\n"\
" docs-requirements: Build the docs requirements file\n"\
" docker-teardown: Spin down docker resources\n"\
"\n"\
"View the Makefile for more documentation"
Expand All @@ -66,7 +68,7 @@ endif
# Pull the latest container and start a detached run
.PHONY: docker-start
docker-start:
$(DOCKER_CMD)-compose pull
$(DOCKER_CMD) compose pull
$(DOCKER_RUN_CMD)


Expand All @@ -82,13 +84,6 @@ dependencies:
$(EXEC_WRAPPER) poetry install --no-ansi


# Set up git configuration
.PHONY: git-setup
git-setup:
$(EXEC_WRAPPER) git tidy --template -o .gitcommit.tpl
$(EXEC_WRAPPER) git config --local commit.template .gitcommit.tpl





Expand All @@ -102,12 +97,12 @@ conda-create:
# Sets up a Conda development environment
.PHONY: conda-setup
conda-setup: EXEC_WRAPPER=conda run -n ${PACKAGE_NAME} --no-capture-output
conda-setup: conda-create lock dependencies git-setup
conda-setup: conda-create lock dependencies


# Sets up a Docker development environment
.PHONY: docker-setup
docker-setup: docker-teardown docker-start lock dependencies git-setup
docker-setup: docker-teardown docker-start lock dependencies


# Spin down docker resources
Expand Down Expand Up @@ -147,12 +142,19 @@ docs-serve:
$(EXEC_WRAPPER) mkdocs serve


# Make the docs requirements file
.PHONY: docs-requirements
docs-requirements:
$(EXEC_WRAPPER) poetry export --with dev --without-hashes -f requirements.txt > docs/requirements.txt


# Run code linting and static analysis. Ensure docs can be built
.PHONY: lint
lint:
$(EXEC_WRAPPER) ruff format . --check
$(EXEC_WRAPPER) ruff check ${MODULE_NAME}
$(EXEC_WRAPPER) bash -c 'make docs'
$(EXEC_WRAPPER) diff <(poetry export --with dev --without-hashes -f requirements.txt) docs/requirements.txt >/dev/null 2>&1 || exit 1


# Fix common linting errors
Expand All @@ -166,21 +168,3 @@ lint-fix:
.PHONY: type-check
type-check:
$(EXEC_WRAPPER) pyright $(MODULE_NAME)


# Lint commit messages
.PHONY: tidy-lint
tidy-lint:
$(EXEC_WRAPPER) git tidy-lint origin/main..


# Perform a tidy commit
.PHONY: tidy-commit
tidy-commit:
$(EXEC_WRAPPER) git tidy-commit


# Perform a tidy squash
.PHONY: tidy-squash
tidy-squash:
$(EXEC_WRAPPER) git tidy-squash origin/main
Loading

0 comments on commit f08fd63

Please sign in to comment.