Skip to content

Commit

Permalink
Merge pull request #19 from kurtmckee/release-0.5.0
Browse files Browse the repository at this point in the history
Release 0.5.0
  • Loading branch information
kurtmckee authored Dec 4, 2023
2 parents e75836c + fa44299 commit 79b0d08
Show file tree
Hide file tree
Showing 27 changed files with 255 additions and 79 deletions.
11 changes: 11 additions & 0 deletions .chipshot.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[chipshot]
template = """
This file is a part of Chipshot <https://github.com/kurtmckee/chipshot>
Copyright 2022-{{ year }} Kurt McKee <[email protected]>
SPDX-License-Identifier: MIT
"""

exclusions = [
"docs/conf.py",
"docs/_static/custom.css",
]
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
github-actions:
patterns:
- "*"
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ repos:
hooks:
- id: 'flake8'
additional_dependencies:
- 'flake8-bugbear==23.11.28'
- 'flake8-bugbear==23.12.2'

- repo: 'https://github.com/editorconfig-checker/editorconfig-checker.python'
rev: '2.7.3'
Expand All @@ -54,5 +54,5 @@ repos:
rev: '0.27.2'
hooks:
- id: 'check-readthedocs'
# - id: 'check-dependabot'
# - id: 'check-github-workflows'
- id: 'check-dependabot'
- id: 'check-github-workflows'
28 changes: 28 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,34 @@ Please see the fragment files in the `changelog.d directory`_.

.. scriv-insert-here
.. _changelog-0.5.0:

0.5.0 - 2023-12-04
==================

Added
-----

* Support a top-level ``exclusions`` key to exclude specific files.

Changed
-------

* Rename the ``"extension"`` configuration key to ``"extensions"``.

Documentation
-------------

* Add Changelog, License, and Colophon pages.
* Fix TOML syntax in a code sample.
* Add a link to the Chipshot repository.

Development
-----------

* Add a Dependabot configuration to auto-update GitHub action versions.
* Add more check-jsonschema pre-commit hooks.

.. _changelog-0.4.0:

0.4.0 - 2023-11-30
Expand Down
4 changes: 2 additions & 2 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* The CSS code sample comes from:
* The CSS code to visually hide elements comes from:
* https://www.a11yproject.com/posts/how-to-hide-content/
*
* The CSS selector comes from:
* The CSS selector for the Sphinx/Alabaster theme comes from:
* https://github.com/pallets/pallets-sphinx-themes/blob/1512b53b/src/pallets_sphinx_themes/themes/pocoo/static/pocoo.css#L486-L498
*/

Expand Down
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../CHANGELOG.rst
46 changes: 46 additions & 0 deletions docs/colophon.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
..
This file is a part of Chipshot <https://github.com/kurtmckee/chipshot>
Copyright 2022-2023 Kurt McKee <[email protected]>
SPDX-License-Identifier: MIT
Colophon
########

The Chipshot logo builds on others' work.

* The soccer ball in the logo is `Emoji 26BD`_
and is designed by `OpenMoji`_, the open-source emoji and icon project.

License: `CC BY-SA 4.0`_

* The word "Chipshot" in the logo uses the `Julius Sans One`_ font,
principally designed by Luciano Vergara,
and is from the type foundry `LatinoType`_.

License: `SIL Open Font License, version 1.1`_

* The phrase "Set up game-winning headers!" in the logo uses the `Noto Serif`_ font,
designed by the `Noto Project`_.

License: `SIL Open Font License, version 1.1 <Noto Serif License_>`_

* The soccer ball and text were pieced together using `Inkscape`_.

License: `GNU GPL, version 2`_



.. Links
.. -----
..
.. _Emoji 26BD: https://openmoji.org/library/emoji-26BD/
.. _OpenMoji: https://openmoji.org/
.. _CC BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/
.. _Julius Sans One: https://fonts.google.com/specimen/Julius+Sans+One
.. _LatinoType: https://www.latinotype.com/
.. _SIL Open Font License, version 1.1: https://openfontlicense.org/open-font-license-official-text/
.. _Noto Serif: https://fonts.google.com/noto/specimen/Noto+Serif
.. _Noto Project: https://github.com/notofonts/latin-greek-cyrillic
.. _Noto Serif License: https://github.com/notofonts/latin-greek-cyrillic/blob/4bc63d7ebca1faed49c6c685f380ba0abc2c1941/OFL.txt
.. _Inkscape: https://inkscape.org/
.. _GNU GPL, version 2: https://inkscape.org/about/license/
11 changes: 11 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,15 @@
]
html_theme_options = {
"logo": "logo.png",
# Link to GitHub
"github_user": "kurtmckee",
"github_repo": "chipshot",
"github_button": True,
"github_type": "star",
"github_count": False,
# Don't show "Powered by" text.
"show_powered_by": False,
}

# Don't copy source .rst files into the built documentation.
html_copy_source = False
12 changes: 9 additions & 3 deletions docs/how-to/custom-headers.rst → docs/how-to/custom-style.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
How To Create Custom Headers
..
This file is a part of Chipshot <https://github.com/kurtmckee/chipshot>
Copyright 2022-2023 Kurt McKee <[email protected]>
SPDX-License-Identifier: MIT
How To Create a Custom Style
############################

Chipshot supports a wide variety of header styles
Expand Down Expand Up @@ -68,7 +73,7 @@ Then, configure files with the "php" extension to use the new style.

.. code-block:: toml
[chipshot.extension.php]
[chipshot.extensions.php]
style = "my-php-style"
Here's the complete ``.chipshot.toml`` file, including a template:
Expand All @@ -79,13 +84,14 @@ Here's the complete ``.chipshot.toml`` file, including a template:
template = """
Copyright 2022-{{ year }} Company Name
Licensed under the terms of the MIT License.
"""
[chipshot.styles.my-php-style]
block_prefix = "<?php\n/*\n"
line_prefix = " * "
block_suffix = "\n */\n?>"
[chipshot.extension.php]
[chipshot.extensions.php]
style = "my-php-style"
Run Chipshot with the ``--update`` flag and pass it a PHP file to update.
Expand Down
27 changes: 27 additions & 0 deletions docs/how-to/exclusions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
..
This file is a part of Chipshot <https://github.com/kurtmckee/chipshot>
Copyright 2022-2023 Kurt McKee <[email protected]>
SPDX-License-Identifier: MIT
How To Exclude Specific Files
#############################

In some circumstances, you may want to exclude certain files.
For example, some tools use configuration files written in Python or Ruby,
and as configuration files you may not want to standardize their headers.

Chipshot supports a global ``"exclusions"`` configuration option.
It supports a list of files that Chipshot must ignore.

The example below will tell Chipshot to exclude ``conf.py``,
which is the standard name for a Sphinx configuration file;
it will also ignore ``Gruntfile.js``,
which is a common name for a Grunt configuration file.

.. code-block:: toml
[chipshot]
exclusions = [
"docs/conf.py",
"Gruntfile.js",
]
13 changes: 10 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
..
This file is a part of Chipshot <https://github.com/kurtmckee/chipshot>
Copyright 2022-2023 Kurt McKee <[email protected]>
SPDX-License-Identifier: MIT
.. rst-class:: visually-hidden

Welcome to the Chipshot documentation
Expand Down Expand Up @@ -64,9 +69,8 @@ How-To Guides
.. toctree::
:maxdepth: 1

how-to/custom-headers

* How to integrate Chipshot in your everyday development
how-to/custom-style
how-to/exclusions


Reference
Expand All @@ -76,6 +80,9 @@ Reference
:maxdepth: 1

reference/boms
changelog
license
colophon

* Configuration file format
* Pre-commit hooks
Expand Down
9 changes: 9 additions & 0 deletions docs/license.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
..
This file is a part of Chipshot <https://github.com/kurtmckee/chipshot>
Copyright 2022-2023 Kurt McKee <[email protected]>
SPDX-License-Identifier: MIT
License
#######

.. include:: ../LICENSE.txt
5 changes: 5 additions & 0 deletions docs/reference/boms.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
..
This file is a part of Chipshot <https://github.com/kurtmckee/chipshot>
Copyright 2022-2023 Kurt McKee <[email protected]>
SPDX-License-Identifier: MIT
Byte Order Marks (BOMs)
#######################

Expand Down
5 changes: 5 additions & 0 deletions docs/tutorial/configuring.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
..
This file is a part of Chipshot <https://github.com/kurtmckee/chipshot>
Copyright 2022-2023 Kurt McKee <[email protected]>
SPDX-License-Identifier: MIT
Configuring Chipshot
####################

Expand Down
5 changes: 5 additions & 0 deletions docs/tutorial/installing.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
..
This file is a part of Chipshot <https://github.com/kurtmckee/chipshot>
Copyright 2022-2023 Kurt McKee <[email protected]>
SPDX-License-Identifier: MIT
Installing Chipshot
###################

Expand Down
7 changes: 6 additions & 1 deletion docs/tutorial/overview.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
..
This file is a part of Chipshot <https://github.com/kurtmckee/chipshot>
Copyright 2022-2023 Kurt McKee <[email protected]>
SPDX-License-Identifier: MIT
An overview of Chipshot's features
##################################

Expand Down Expand Up @@ -146,7 +151,7 @@ so it's possible to add new styles as needed.
.. rubric:: Example: A custom style in ``.chipshot.toml`` for PHP scripts
.. code-block:: toml
[chipshot.extension.php]
[chipshot.extensions.php]
block_prefix = "<?php\n"
line_prefix = "// "
block_suffix = "\n?>"
Expand Down
14 changes: 7 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 1 addition & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "chipshot"
version = "0.4.0"
version = "0.5.0"
description = "Set up game-winning headers!"
readme = "README.rst"
authors = ["Kurt McKee <[email protected]>"]
Expand Down Expand Up @@ -38,17 +38,6 @@ sphinx = { version = "*", python = "3.12" }
chipshot = "chipshot.cli:run"


# Chipshot
# --------

[tool.chipshot]
template = """
This file is a part of Chipshot <https://github.com/kurtmckee/chipshot>
Copyright 2022-{{ year }} Kurt McKee <[email protected]>
SPDX-License-Identifier: MIT
"""


# Coverage
# --------

Expand Down
4 changes: 2 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
colorama==0.4.6 ; python_version >= "3.8" and sys_platform == "win32"
coverage[toml]==7.3.2 ; python_version >= "3.8"
exceptiongroup==1.2.0 ; python_version < "3.11" and python_version >= "3.8"
importlib-metadata==6.8.0 ; python_version < "3.10" and python_version >= "3.8"
importlib-metadata==7.0.0 ; python_version < "3.10" and python_version >= "3.8"
iniconfig==2.0.0 ; python_version >= "3.8"
packaging==23.2 ; python_version >= "3.8"
pluggy==1.3.0 ; python_version >= "3.8"
pyfakefs==5.3.1 ; python_version >= "3.8"
pyfakefs==5.3.2 ; python_version >= "3.8"
pytest-randomly==3.15.0 ; python_version >= "3.8"
pytest==7.4.3 ; python_version >= "3.8"
tomli==2.0.1 ; python_full_version <= "3.11.0a6" and python_version >= "3.8"
Expand Down
Loading

0 comments on commit 79b0d08

Please sign in to comment.