Skip to content

Commit

Permalink
Merge pull request #215 from niccokunzmann/fix-release
Browse files Browse the repository at this point in the history
include new directory layout
  • Loading branch information
niccokunzmann authored Feb 12, 2025
2 parents ce21063 + 6fc1826 commit dab3c03
Show file tree
Hide file tree
Showing 11 changed files with 9,729 additions and 50 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- ["3.10", "py310", "Asia/Singapore"]
- ["3.11", "py311", "Pacific/Bougainville"]
- ["3.12", "py312", "Europe/London"]
- ["3.12", "build", "Europe/Moscow"]
- ["3.13", "py313", "America/Dawson"]

runs-on: ubuntu-latest
Expand Down Expand Up @@ -71,23 +72,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade wheel twine build
- name: Check the tag
run: |
PACKAGE_VERSION=`python setup.py --version`
TAG_NAME=v$PACKAGE_VERSION
echo "Package version $PACKAGE_VERSION with possible tag name $TAG_NAME on $GITHUB_REF_NAME"
# test that the tag represents the version
# see https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
# see https://docs.github.com/en/actions/learn-github-actions/environment-variables
if [ "$TAG_NAME" != "$GITHUB_REF_NAME" ]; then
echo "ERROR: This tag is for the wrong version. Got \"$GITHUB_REF_NAME\" expected \"$TAG_NAME\"."
exit 1
fi
- name: remove old files
run: rm -rf dist/*
- name: build distribution files
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ env-2
/htmlcov
.coverage
.venv
rfc5545.html
venv
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

28 changes: 19 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -651,25 +651,35 @@ To run the tests in a specific Python version:
New Releases
------------

You can build the new release by running this command:

.. code-block:: shell
tox -e build
To release new versions,

1. edit the Changelog Section
2. edit setup.py, the ``__version__`` variable
3. create a commit and push it
4. wait for `GitHub Actions <https://github.com/niccokunzmann/python-recurring-ical-events/actions>`_ to finish the build
5. run
1. Edit the Changelog Section.
2. Create a commit and push it.
3. Wait for `GitHub Actions <https://github.com/niccokunzmann/python-recurring-ical-events/actions>`_ to finish the build.
4. Run

.. code-block:: shell
python3 setup.py tag_and_deploy
6. notify the issues about their release
git tag v3.5.1
git push origin v3.5.1
5. Notify the issues about their release.

Changelog
---------

- v3.5.0
- v3.5.1

- Move to ``pyproject.toml`` format to include directory structure more easily. See `Issue 214 <https://github.com/niccokunzmann/python-recurring-ical-events/issues/214>`_
- Remove release 3.5.0 as it does not contain any source files.

- v3.5.0 - yanked

- Restructure module into package with a file structure.
- Add pagination, see `Issue 211 <https://github.com/niccokunzmann/python-recurring-ical-events/issues/211>`_
Expand Down
81 changes: 81 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,84 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "recurring-ical-events"
license = {file = "LICENSE"}
keywords = ["icalendar", "calendar", "ics", "rfc5545", "scheduling", "events", "todo", "journal", "alarm"]
dynamic = ["urls", "version"]
authors = [
{ name="Nicco Kunzmann", email="[email protected]" },
]
maintainers = [
{ name="Nicco Kunzmann", email="[email protected]" },
]
description = "Calculate recurrence times of events, todos, alarms and journals based on icalendar RFC5545."
readme = "README.rst"
requires-python = ">=3.8"

# see https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Topic :: Office/Business :: Scheduling",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]

# install requirements depending on python version
# see https://www.python.org/dev/peps/pep-0508/#environment-markers
dependencies = [
'icalendar >= 6.1.0, < 7.0.0',
'python-dateutil >= 2.8.1, < 3.0.0',
'x-wr-timezone >= 1.0.0, < 3.0.0; python_version >= "3.9"',
'x-wr-timezone == 0.*; python_version <= "3.8"',
'backports.zoneinfo; python_version == "3.7" or python_version == "3.8"',
'tzdata',
]

[project.optional-dependencies]
test = [
'pytest',
'pytest-cov',
'restructuredtext-lint',
'pygments',
'pytz >= 2023.3',
]

[tool.hatch.metadata.hooks.vcs.urls]
#[project.urls]
Homepage = "https://github.com/niccokunzmann/python-recurring-ical-events"
Repository = "https://github.com/niccokunzmann/python-recurring-ical-events"
source_archive = "https://github.com/niccokunzmann/python-recurring-ical-events/archive/{commit_hash}.zip"
Issues = "https://github.com/niccokunzmann/python-recurring-ical-events/issues"
Documentation = "https://github.com/niccokunzmann/python-recurring-ical-events"
Changelog = "https://github.com/niccokunzmann/python-recurring-ical-events?tab=readme-ov-file#changelog"

[tool.hatch.version]
source = "vcs"

[tool.hatch.version.raw-options]
# see https://github.com/ofek/hatch-vcs/issues/43#issuecomment-1553065222
local_scheme = "no-local-version"

[tool.hatch.build.hooks.vcs]
version-file = "recurring_ical_events/_version.py"

[tool.hatch.metadata]
allow-direct-references = true

[tool.ruff]
target-version = "py38"
Expand Down
1 change: 1 addition & 0 deletions recurring_ical_events/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_version.py
16 changes: 16 additions & 0 deletions recurring_ical_events/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# SPDX-FileCopyrightText: 2024 Nicco Kunzmann and Open Web Calendar Contributors <https://open-web-calendar.quelltext.eu/>
#
# SPDX-License-Identifier: GPL-2.0-only

try:
from ._version import __version__, __version_tuple__, version, version_tuple
except ModuleNotFoundError:
__version__ = version = "0.0dev0"
__version_tuple__ = version_tuple = (0, 0, "dev0")

__all__ = [
"__version__",
"__version_tuple__",
"version",
"version_tuple",
]
34 changes: 25 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
# install requirements depending on python version
# see https://www.python.org/dev/peps/pep-0508/#environment-markers

icalendar >= 6.1.0, < 7.0.0
python-dateutil >= 2.8.1, < 3.0.0
x-wr-timezone >= 1.0.0, < 3.0.0; python_version >= "3.9"
x-wr-timezone == 0.*; python_version <= "3.8"
backports.zoneinfo; python_version == "3.7" or python_version == "3.8"
tzdata; python_version >= "3.7"
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile
#
click==8.1.8
# via x-wr-timezone
icalendar==6.1.1
# via
# recurring-ical-events (setup.py)
# x-wr-timezone
python-dateutil==2.9.0.post0
# via
# icalendar
# recurring-ical-events (setup.py)
six==1.17.0
# via python-dateutil
tzdata==2025.1
# via
# icalendar
# recurring-ical-events (setup.py)
# x-wr-timezone
x-wr-timezone==2.0.1 ; python_version >= "3.9"
# via recurring-ical-events (setup.py)
Loading

0 comments on commit dab3c03

Please sign in to comment.