-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #224 from hotosm/feature/version-control
Feature : Version Control
- Loading branch information
Showing
9 changed files
with
183 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
## 1.0.17 (2024-03-06) | ||
|
||
### Fix | ||
|
||
- add optional param to wrap flatgeobuf in geomcollection | ||
- default add spatial index to generated flatgeobuf files | ||
|
||
### Refactor | ||
|
||
- remove ENCODING param for flatgeobuf (does nothing) | ||
- use f-string for flatgeobuf ogr command | ||
|
||
## 1.0.16 (2022-12-19) | ||
|
||
## 1.0.15 (2022-12-13) | ||
|
||
## 1.0.14 (2022-12-13) | ||
|
||
## 1.0.13 (2022-12-07) | ||
|
||
## 1.0.12 (2022-12-07) | ||
|
||
## 1.0.11 (2022-12-07) | ||
|
||
## 1.0.10 (2022-12-07) | ||
|
||
## 1.0.9 (2022-12-07) | ||
|
||
## 1.0.8 (2022-12-07) | ||
|
||
## 1.0.7 (2022-12-04) | ||
|
||
## v1.0.6 (2022-09-15) | ||
|
||
## v1.0.5 (2022-09-09) | ||
|
||
## v1.0.4 (2022-08-02) | ||
|
||
## v1.0.3 (2022-08-01) | ||
|
||
## v1.0.2 (2022-08-01) | ||
|
||
## v1.0.1 (2022-07-29) | ||
|
||
## v1.0.0 (2022-07-29) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Version Control | ||
|
||
## Conventional Commits | ||
|
||
A [specification](https://www.conventionalcommits.org/en/v1.0.0) for adding human and machine readable meaning to commit messages. | ||
|
||
**Format**: <type>[optional scope]: <description> | ||
|
||
Example `feat: allow provided config object to extend other configs` | ||
Example `fix: fixed the bug in issue #123` | ||
|
||
**Advantage**: Automated SemVer version management (major.minor.patch), and automated changelogs. | ||
|
||
## Commitizen CLI | ||
|
||
[Commitizen](https://commitizen-tools.github.io/commitizen) is a Python tool to help with creating **conventional commits** and automating version control. | ||
|
||
### Install | ||
|
||
`pip install commitizen` | ||
|
||
### Commiting Code | ||
|
||
- Instead of `git commit` use `cz commit` and follow the prompts. | ||
- You can select the type of commit, plus additional metadata. | ||
|
||
### Bumping a Version | ||
|
||
- When you decide it is time to create a new version: | ||
|
||
1. Create a new branch | ||
|
||
`git checkout -b bump/new_release` | ||
|
||
2. Bump the version and push | ||
|
||
```bash | ||
pip install commitizen # (if not installed) | ||
|
||
cz bump | ||
|
||
git push | ||
``` | ||
|
||
This will: | ||
- Update the SemVer version number in locations specific in `pyproject.toml`, throughout the codebase. | ||
- If a `feat` commit is included, the version is bumped by a minor increment (0.x.0), if only `fix` is included a patch will be used (0.0.x). | ||
- Automatically update CHANGELOG.md with all changes since the last version. | ||
- Create a tag matching the version number. | ||
|
||
> Note: in a repo where you have direct push access, you would simply update on develop and push. As we are using Git-Flow, a PR is necessary. | ||
## Creating Releases | ||
|
||
1. Update the version throughout the code ([Bumping a Version](#bumping-a-version)). | ||
2. Click `Draft a new release`. | ||
3. Click `Choose a tag`, then input the current version number and press enter (this will automatically create a matching tag for your release). | ||
4. Set the `Release title` to v`x.x.x`, replacing with your version number. | ||
5. Add a description if possible, then release. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
[build-system] | ||
requires = ["setuptools >= 61.0.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "raw-data-api" | ||
version = "1.0.17" | ||
description = "Set of high-performant APIs for transforming and exporting OpenStreetMap (OSM) data in different GIS file formats." | ||
readme = "README.md" | ||
authors = [ | ||
{ name = "Hot Tech Team", email = "[email protected]" } | ||
] | ||
license = { file = "LICENSE" } | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
] | ||
keywords = [ | ||
"OSM", "rawdataapi", | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = ["black", "bumpver", "isort"] | ||
|
||
[project.urls] | ||
repository = "https://github.com/hotosm/raw-data-api" | ||
|
||
[tool.bumpver] | ||
current_version = "1.0.17" | ||
commit_message = "bump version {old_version} -> {new_version}" | ||
commit = true | ||
tag = true | ||
push = false | ||
|
||
[tool.bumpver.file_patterns] | ||
"pyproject.toml" = [ | ||
'current_version = "{version}"', | ||
'version = "{version}"', | ||
] | ||
|
||
[tool.isort] | ||
profile = "black" | ||
import_heading_stdlib = "Standard library imports" | ||
import_heading_thirdparty = "Third party imports" | ||
import_heading_firstparty = "Reader imports" | ||
|
||
[tool.commitizen] | ||
name = "cz_conventional_commits" | ||
tag_format = "$version" | ||
version_scheme = "semver" | ||
version_provider = "pep621" | ||
update_changelog_on_bump = true | ||
|
||
|
||
[tool.setuptools] | ||
packages = { find = { where = ["src","API"]} } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,4 @@ | ||
import setuptools | ||
# Third party imports | ||
from setuptools import setup | ||
|
||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
|
||
setuptools.setup( | ||
name="raw-data-api", | ||
version="1.0.16", | ||
description="The Raw Data API module makes it simple for you to get osm data stats provided by api in your own project", | ||
packages=setuptools.find_packages(), | ||
install_requires=[ | ||
"pytest==7.4.3", | ||
"psycopg2", | ||
"boto3==1.24.38", | ||
"fastapi==0.105.0", | ||
"geojson==3.1.0", | ||
"area==1.1.1", | ||
"orjson==3.9.10", | ||
"slowapi==0.1.8", | ||
], | ||
classifiers=[ | ||
"Programming Language :: Python :: 3", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
], | ||
python_requires=">=3.8", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
author="Hot Tech Team", | ||
author_email="[email protected]", | ||
url="https://github.com/hotosm/export-tool-api", | ||
) | ||
setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,6 @@ | |
# 1100 13th Street NW Suite 800 Washington, D.C. 20005 | ||
# <[email protected]> | ||
|
||
from json import dumps | ||
|
||
from src.query_builder.builder import raw_currentdata_extraction_query | ||
from src.validation.models import RawDataCurrentParams | ||
|
||
|