Skip to content

Commit

Permalink
Merge pull request #60 from GateNLP/release/1.1.0
Browse files Browse the repository at this point in the history
Release 1.1.0
  • Loading branch information
freddyheppell authored Jan 20, 2025
2 parents 32c6478 + c5c8e16 commit c72188e
Show file tree
Hide file tree
Showing 16 changed files with 621 additions and 175 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry==1.8.3
run: pipx install poetry==2.0.1
- name: Setup Python 3.8
uses: actions/setup-python@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry==1.8.3
run: pipx install poetry==2.0.1
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry==1.8.3
run: pipx install poetry==2.0.1
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry==1.8.3
run: pipx install poetry==2.0.1
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ build:
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually
- pip install poetry
- pip install poetry==2.0.1
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
Expand Down
9 changes: 9 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Changelog
=========

v1.1.0 (2025-01-20)
-------------------

**New Features**

* Added support for :ref:`alternate localised pages <sitemap-extra-localisation>` with ``hreflang``.
* If an HTTP error is encountered, the contents of the error page is logged at ``INFO`` level.
* Added optional configurable wait time to HTTP request client.

v1.0.0 (2025-01-13)
-------------------

Expand Down
23 changes: 23 additions & 0 deletions docs/reference/formats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ The Google News extension provides additional information to describe the news s

If the page contains Google News data, it is stored as a :class:`~usp.objects.page.SitemapNewsStory` object in :attr:`SitemapPage.news_story <usp.objects.page.SitemapPage.news_story>`.

.. _google-image-ext:

Google Image
""""""""""""

Expand All @@ -150,6 +152,27 @@ If the page contains Google Image data, it is stored as a list of :class:`~usp.o

.. _xml date:

Additional Features
^^^^^^^^^^^^^^^^^^^

Beyond the Sitemap specification, USP also supports some non-standard features used by large sitemap consumers (e.g. Google).

.. _sitemap-extra-localisation:

Alternate Localised Pages
"""""""""""""""""""""""""

- `Google documentation <https://developers.google.com/search/docs/specialty/international/localized-versions#sitemap>`__

.. dropdown:: Example
:class-container: flush

.. literalinclude:: formats_examples/hreflang.xml
:emphasize-lines: 3,7-10,15-18
:language: xml

Alternate localised pages specified with the ``<link>`` tag will be stored as a list in :attr:`SitemapPage.alternates <usp.objects.page.SitemapPage.alternates>`. Language codes are not validated.

Date Time Parsing
^^^^^^^^^^^^^^^^^

Expand Down
20 changes: 20 additions & 0 deletions docs/reference/formats_examples/hreflang.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9/"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>https://example.org/en/page</loc>
<lastmod>2024-01-01</lastmod>
<xhtml:link
rel="alternate"
hreflang="fr-FR"
href="https://example.org/fr/page"/>
</url>
<url>
<loc>https://example.org/fr/page</loc>
<lastmod>2024-01-02</lastmod>
<xhtml:link
rel="alternate"
hreflang="en-GB"
href="https://example.org/en/page"/>
</url>
</urlset>
Loading

0 comments on commit c72188e

Please sign in to comment.