Skip to content

Commit

Permalink
Merge pull request #102 from Samweli/changelog
Browse files Browse the repository at this point in the history
Page for changelog in the documentation
  • Loading branch information
Samweli authored Jan 11, 2022
2 parents 122e06f + 022605c commit c12ca48
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 38 deletions.
24 changes: 20 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
# Changelog

## [Draft]

## [1.0.0] - 2021-11-15
## [Unreleased]

### New changes
- Plugin skeleton
### 1.0.0-pre 2022-01-11
- Changed loading and downloading assets workflow [#93](https://github.com/stac-utils/qgis-stac-plugin/pull/93).
- Implemented testing connection functionality.
- Reworked filter and sort features on the search item results.
- Fetch for STAC API conformance classes [#82](https://github.com/stac-utils/qgis-stac-plugin/pull/82).
- Added STAC API signing using SAS token [#79](https://github.com/stac-utils/qgis-stac-plugin/pull/79).
- Support for downloading assets and loading item footprints in QGIS, [#70](https://github.com/stac-utils/qgis-stac-plugin/pull/70).
- Enabled adding STAC item assets as map layers in QGIS [#58](https://github.com/stac-utils/qgis-stac-plugin/pull/58).
- Added plugin documentation in GitHub pages.

## [beta]

### 1.0.0-beta 2021-12-11
- Fixed slow item search.
- Updated plugin search result to include pagination [#51](https://github.com/stac-utils/qgis-stac-plugin/pull/51).
- Support for search result filtering and sorting [#47](https://github.com/stac-utils/qgis-stac-plugin/pull/47).
- Implemented search [#40](https://github.com/stac-utils/qgis-stac-plugin/pull/40).
- Added default configured STAC API catalogs [#26](https://github.com/stac-utils/qgis-stac-plugin/pull/26).
- Basic STAC API support [#17](https://github.com/stac-utils/qgis-stac-plugin/pull/17).
42 changes: 10 additions & 32 deletions admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,53 +384,31 @@ def _get_metadata() -> typing.Dict:
email = raw_author_list[-1].replace(">", "")
metadata = conf["tool"]["qgis-plugin"]["metadata"].copy()

path = LOCAL_ROOT_DIR / "CHANGELOG.md"
with path.open() as fh:
changelog_file = fh.read()

metadata.update(
{
"author": author,
"email": email,
"description": poetry_conf["description"],
"version": poetry_conf["version"],
"tags": ", ".join(metadata.get("tags", [])),
"changelog": _parse_changelog(
changelog_file, poetry_conf["version"]
),
"changelog": _changelog(),
}
)
return metadata


def _parse_changelog(changelog: str, version: str) -> str:
""" Parses the text changelog into a format that can be
used inside the metadata.txt plugin file.
def _changelog() -> str:
""" Reads the changelog content from a config file.
:param changelog: Plugin changelog
:type changelog: str
:returns: Plugin changelog
:type: str
"""
path = LOCAL_ROOT_DIR / "docs/plugin/changelog.txt"

:param version: Plugin version
:type version: str
with path.open() as fh:
changelog_file = fh.read()

:return changelog: Formatted plugin changelog
:type changelog: str
"""
usable_fragment = changelog.partition(
f"[{version}]")[-1].partition("[draft]")[
0
]
if usable_fragment != "":
no_square_brackets = re.sub(
r"(\[(\d+.\d+.\d+)\])",
"\g<2>",
usable_fragment)
result = f"{version} {no_square_brackets}". \
replace("# ", ""). \
replace("#", "")
else:
result = ""
return result
return changelog_file


def _add_to_zip(
Expand Down
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--8<--
CHANGELOG.md
--8<--
18 changes: 18 additions & 0 deletions docs/plugin/changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

Version 1.0.0-pre 2022-01-11
- Changed loading and downloading assets workflow.
- Implemented testing connection functionality.
- Reworked filter and sort features on the search item results.
- Fetch for STAC API conformance classes.
- Added STAC API signing using SAS token.
- Support for downloading assets and loading item footprints in QGIS.
- Enabled adding STAC item assets as map layers in QGIS.
- Added plugin documentation in GitHub pages.

Version 1.0.0-beta 2021-12-11
- Fixed slow item search.
- Updated plugin search result to include pagination.
- Support for search result filtering and sorting.
- Implemented search.
- Added default configured STAC API catalogs.
- Basic STAC API support.
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ nav:
- User Guide: "user-guide.md"
- Development: "development.md"
- About: "about.md"
- Changelog: "changelog.md"

plugins:
- search
- git-revision-date-localized

markdown_extensions:
- pymdownx.snippets:
base_path: .
- meta:

extra_css:
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ PyQt5 = "^5.15.6"
flask = "^2.0.2"

[tool.qgis-plugin.metadata]
name = "STAC APIs Browser "
name = "STAC API Browser "
qgisMinimumVersion = "3.0"
qgisMaximumVersion = "3.99"
icon = "icon.png"
experimental = "True"
deprecated = "False"
Expand All @@ -35,7 +36,7 @@ hasProcessingProvider = "no"
about = """\
Adds functionality to search, load and manage STAC APIs resources inside QGIS.
"""
# changelog: dynamically pulled from the README.md file
# changelog: dynamically pulled from the docs/plugin/changelog.txt file
# description: dynamically pulled from the tool.poetry.description section
# version: dynamically pulled from the tool.poetry.version section
# author: dynamically pulled from the tool.poetry.authors section
Expand Down

0 comments on commit c12ca48

Please sign in to comment.