From b4545373b4a9e7733406059ad152ff9f36ad338c Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 22 Oct 2021 13:07:44 +0200 Subject: [PATCH 1/4] add changelog.md, release.md, README badges --- CHANGELOG.md | 18 +++++++++++++ README.md | 7 +++++- RELEASE.md | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 CHANGELOG.md create mode 100644 RELEASE.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..9a1ffc8 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,18 @@ +# Changes in autodoc-traits + +## 0.1.0 + +0.1.0 is the first stable release of autodoc-traits. +It fixes compatibility with sphinx 4 from the previously published 0.1.0dev prerelease. + +### Merged PRs + +- add publish github action [#4](https://github.com/jupyterhub/autodoc-traits/pull/4) ([@minrk](https://github.com/minrk)) +- Remove unused import of deprecated PyClassmember [#3](https://github.com/jupyterhub/autodoc-traits/pull/3) ([@minrk](https://github.com/minrk)) +- Remove duplicates in documenting trait members [#1](https://github.com/jupyterhub/autodoc-traits/pull/1) ([@rkdarst](https://github.com/rkdarst)) + +### Contributors to this release + +([GitHub contributors page for this release](https://github.com/jupyterhub/autodoc-traits/graphs/contributors?from=2019-09-06&to=2021-10-22&type=c)) + +[@betatim](https://github.com/search?q=repo%3Ajupyterhub%2Fautodoc-traits+involves%3Abetatim+updated%3A2019-09-06..2021-10-22&type=Issues) | [@minrk](https://github.com/search?q=repo%3Ajupyterhub%2Fautodoc-traits+involves%3Aminrk+updated%3A2019-09-06..2021-10-22&type=Issues) | [@rkdarst](https://github.com/search?q=repo%3Ajupyterhub%2Fautodoc-traits+involves%3Arkdarst+updated%3A2019-09-06..2021-10-22&type=Issues) | [@welcome](https://github.com/search?q=repo%3Ajupyterhub%2Fautodoc-traits+involves%3Awelcome+updated%3A2019-09-06..2021-10-22&type=Issues) | [@willingc](https://github.com/search?q=repo%3Ajupyterhub%2Fautodoc-traits+involves%3Awillingc+updated%3A2019-09-06..2021-10-22&type=Issues) diff --git a/README.md b/README.md index 2a24ae3..022b176 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ # autodoc-traits -Sphinx extension to autodocument configuration files using the [traitlets](https://github.com/ipython/traitlets) library +[![Latest PyPI version](https://img.shields.io/pypi/v/autodoc-traits?logo=pypi)](https://pypi.python.org/pypi/autodoc-traits) +[![GitHub](https://img.shields.io/badge/issue_tracking-github-blue?logo=github)](https://github.com/jupyterhub/autodoc-traits/issues) +[![Discourse](https://img.shields.io/badge/help_forum-discourse-blue?logo=discourse)](https://discourse.jupyter.org/c/jupyterhub) +[![Gitter](https://img.shields.io/badge/social_chat-gitter-blue?logo=gitter)](https://gitter.im/jupyterhub/jupyterhub) + +Sphinx extension to autodocument configuration files using the [traitlets](https://github.com/ipython/traitlets) library. ## Install diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..8b3bb7f --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,71 @@ +# How to make a release + +`autodoc-traits` is a package [available on +PyPI][pypi]. +These are instructions on how to make a release on PyPI. +The PyPI release is done automatically by GitHub Actions when a tag is pushed. + +To follow these instructions, you need: + +- To have push rights to the [autodoc-traits GitHub + repository][repo]. + +[pypi]: https://pypi.org/project/autodoc-traits +[repo]: https://github.com/jupyterhub/autodoc-traits + +## Steps to make a release + +1. Checkout main and make sure it is up to date. + + ```shell + ORIGIN=${ORIGIN:-origin} # set to the canonical remote, e.g. 'upstream' if 'origin' is not the official repo + git checkout main + git fetch $ORIGIN main + ``` + +1. Update [CHANGELOG.md](CHANGELOG.md). Doing this can be made easier with the + help of the + [choldgraf/github-activity](https://github.com/choldgraf/github-activity) + utility. + +1. Set the `__version__` variable in [\_\_init.py\_\_][] + appropriately and make a commit. + + ``` + git add autodoc_traits/__init__.py + VERSION=... # e.g. 1.2.3 + git commit -m "release $VERSION" + ``` + +[\_\_init.py\_\_]: autodoc_traits/__init__.py + +1. Reset the `__version__` variable in + [\_\_init.py\_\_][] appropriately with an incremented + patch version and `.dev` suffix, then make a commit. + + ``` + git add autodoc_traits/__init__.py + git commit -m "back to dev" + ``` + +1. Push your two commits to main. + + ```bash + # first push commits without a tags to ensure the + # commits comes through, because a tag can otherwise + # be pushed all alone without company of rejected + # commits, and we want have our tagged release coupled + # with a specific commit + git push $ORIGIN main + ``` + +1. Create a git tag for the pushed release commit and push it. + + ```shell + git tag -a $VERSION -m $VERSION + # verify you tagged the right commit + git log + + # then push it + git push $ORIGIN $VERSION + ``` From 4318a4074dad0b7856851e9b793328949bd1f140 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Tue, 15 Mar 2022 08:30:37 +0100 Subject: [PATCH 2/4] Apply suggestions from code review --- RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 8b3bb7f..203021f 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -62,7 +62,7 @@ To follow these instructions, you need: 1. Create a git tag for the pushed release commit and push it. ```shell - git tag -a $VERSION -m $VERSION + git tag -a $VERSION -m $VERSION HEAD~1 # verify you tagged the right commit git log From eaca7483471a85f733f0028d93720d6bea8e4cd1 Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 15 Mar 2022 10:02:35 +0100 Subject: [PATCH 3/4] adopt tbump for tagging releases simplifies steps --- RELEASE.md | 40 ++++++---------------------------------- pyproject.toml | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 34 deletions(-) create mode 100644 pyproject.toml diff --git a/RELEASE.md b/RELEASE.md index 203021f..52fe358 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -20,7 +20,7 @@ To follow these instructions, you need: ```shell ORIGIN=${ORIGIN:-origin} # set to the canonical remote, e.g. 'upstream' if 'origin' is not the official repo git checkout main - git fetch $ORIGIN main + git pull $ORIGIN main ``` 1. Update [CHANGELOG.md](CHANGELOG.md). Doing this can be made easier with the @@ -28,44 +28,16 @@ To follow these instructions, you need: [choldgraf/github-activity](https://github.com/choldgraf/github-activity) utility. -1. Set the `__version__` variable in [\_\_init.py\_\_][] - appropriately and make a commit. +1. Publish the new version with [tbump][] ``` - git add autodoc_traits/__init__.py - VERSION=... # e.g. 1.2.3 - git commit -m "release $VERSION" + tbump 1.2.3 ``` -[\_\_init.py\_\_]: autodoc_traits/__init__.py +1. Reset the version to next.dev (e.g. 1.2.3 -> 1.3.0.dev) -1. Reset the `__version__` variable in - [\_\_init.py\_\_][] appropriately with an incremented - patch version and `.dev` suffix, then make a commit. - - ``` - git add autodoc_traits/__init__.py - git commit -m "back to dev" ``` - -1. Push your two commits to main. - - ```bash - # first push commits without a tags to ensure the - # commits comes through, because a tag can otherwise - # be pushed all alone without company of rejected - # commits, and we want have our tagged release coupled - # with a specific commit - git push $ORIGIN main + tbump --no-tag 1.3.0.dev ``` -1. Create a git tag for the pushed release commit and push it. - - ```shell - git tag -a $VERSION -m $VERSION HEAD~1 - # verify you tagged the right commit - git log - - # then push it - git push $ORIGIN $VERSION - ``` +[tbump]: https://github.com/dmerejkowsky/tbump diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..f0cf252 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,26 @@ +[tool.tbump.version] +current = "0.1.0" + +# Example of a pep440 regexp. +# Make sure this matches current_version before +# using tbump +regex = ''' + (?P\d+) + \. + (?P\d+) + \. + (?P\d+) + (?P
((a|b|rc)\d+)|)
+  \.?
+  (?P(?<=\.)dev\d*|)
+  '''
+
+[tool.tbump.git]
+message_template = "Bump to {new_version}"
+tag_template = "{new_version}"
+
+# For each file to patch, add a [[tool.tbump.file]] config
+# section containing the path of the file, relative to the
+# tbump.toml location.
+[[tool.tbump.file]]
+src = "autodoc_traits/__init__.py"

From 819192bb2908dcb2e9a3e5f9dcff779891bec449 Mon Sep 17 00:00:00 2001
From: Min RK 
Date: Tue, 15 Mar 2022 10:03:49 +0100
Subject: [PATCH 4/4] Bump to 1.0.0.dev

---
 autodoc_traits/__init__.py | 2 +-
 pyproject.toml             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/autodoc_traits/__init__.py b/autodoc_traits/__init__.py
index 73ffbd2..ea6175b 100644
--- a/autodoc_traits/__init__.py
+++ b/autodoc_traits/__init__.py
@@ -1,4 +1,4 @@
-__version__ = "0.1.0"
+__version__ = "1.0.0.dev"
 
 
 def setup(app, *args, **kwargs):
diff --git a/pyproject.toml b/pyproject.toml
index f0cf252..3b811b5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,5 +1,5 @@
 [tool.tbump.version]
-current = "0.1.0"
+current = "1.0.0.dev"
 
 # Example of a pep440 regexp.
 # Make sure this matches current_version before