-
Notifications
You must be signed in to change notification settings - Fork 6
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 #49 from kshitijrajsharma/bump/new_release
Feature : Commitzen (Version Control)
- Loading branch information
Showing
10 changed files
with
182 additions
and
8 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 |
---|---|---|
|
@@ -35,15 +35,15 @@ jobs: | |
OSM_USERNAME: ${{ secrets.OSM_USERNAME }} | ||
OSM_PASSWORD: ${{ secrets.OSM_PASSWORD }} | ||
run: | | ||
osmsg --url "http://download.geofabrik.de/asia/nepal-updates" --username '${{ secrets.OSM_USERNAME }}' --password '${{ secrets.OSM_PASSWORD }}' --format image csv --last_month --tags 'building' 'highway' 'waterway' 'amenity' --name stats/Nepal/Monthly/stats --read_from_metadata stats/Nepal/Monthly/stats_metadata.json --all_tags --summary --charts --meta | ||
osmsg --url "http://download.geofabrik.de/asia/nepal-updates" --username '${{ secrets.OSM_USERNAME }}' --password '${{ secrets.OSM_PASSWORD }}' --format image csv --last_month --tags 'building' 'highway' 'waterway' 'amenity' --name stats/Nepal/Monthly/stats --read_from_metadata stats/Nepal/Monthly/stats_metadata.json --all_tags --summary --charts --meta --temp | ||
- name: add stats to git | ||
|
||
run: | | ||
git pull | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "kshitijrajsharma" | ||
base_dir=stats/Nepal/Monthly | ||
mkdir -p $base_dir | ||
|
@@ -63,4 +63,3 @@ jobs: | |
run: | | ||
commit_id=$(git rev-parse --short HEAD) | ||
python tweet.py --git $commit_id --name stats/Nepal/Monthly/stats --tweet 'Nepal Last Month' | ||
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,71 @@ | ||
## v0.1.32 (2023-07-10) | ||
|
||
### Perf | ||
|
||
- **removing-files-on-temp**: temp file removal | ||
|
||
## v0.1.31 (2023-07-07) | ||
|
||
## v0.1.30 (2023-06-11) | ||
|
||
## 0.1.27 (2023-03-21) | ||
|
||
## 0.1.26 (2023-03-19) | ||
|
||
## 0.1.25 (2023-03-18) | ||
|
||
## 0.1.20 (2023-03-12) | ||
|
||
## 0.1.19 (2023-03-08) | ||
|
||
## 0.1.18 (2023-03-06) | ||
|
||
## 0.1.17 (2023-03-05) | ||
|
||
## 0.1.16 (2023-03-05) | ||
|
||
## 0.1.14 (2023-03-04) | ||
|
||
## 0.1.12 (2023-03-02) | ||
|
||
## 0.1.10 (2023-03-01) | ||
|
||
## 0.1.9 (2023-03-01) | ||
|
||
## 1.0.8 (2023-02-28) | ||
|
||
## 0.1.6 (2023-02-25) | ||
|
||
## 1.0.5 (2023-02-25) | ||
|
||
## 0.1.4 (2023-02-25) | ||
|
||
## 0.1.3 (2023-02-22) | ||
|
||
## 0.1.2 (2023-02-20) | ||
|
||
## v0.1.1-alpha (2023-02-16) | ||
|
||
## 0.1.1 (2023-02-16) | ||
|
||
## 0.1.0 (2023-02-16) | ||
|
||
## 0.0.31 (2023-02-16) | ||
|
||
## 0.0.30 (2023-02-16) | ||
|
||
## 0.0.29 (2023-02-02) | ||
|
||
## 0.0.16 (2023-01-31) | ||
|
||
## 0.0.11 (2023-01-28) | ||
|
||
## 0.0.10 (2023-01-25) | ||
|
||
## 0.0.9 (2023-01-23) | ||
|
||
## 0.0.8 (2023-01-20) | ||
|
||
## 0.0.7 (2023-01-13) | ||
|
||
## 0.0.6 (2023-01-12) |
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,61 @@ | ||
# 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 main 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 should trigger the PyPi publishing workflow, and your version will be available on [PyPi](https://pypi.org/project/osmsg/). |
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,33 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "osmsg" | ||
version = "0.1.32" | ||
description = "OpenStreetMap Stats Generator : Commandline" | ||
readme = "README.md" | ||
authors = [{name = "Kshitij Raj Sharma", email = "[email protected]"}] | ||
license = {text = "MIT"} | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.6" | ||
osmium = "*" | ||
pandas = "==1.5.2" | ||
requests = "*" | ||
shapely = "*" | ||
geopandas = "==0.10.2" | ||
tqdm = "*" | ||
seaborn = "*" | ||
matplotlib = "*" | ||
humanize = "*" | ||
|
||
[tool.poetry.scripts] | ||
osmsg = "osmsg.app:main" | ||
|
||
[tool.commitizen] | ||
name = "cz_conventional_commits" | ||
tag_format = "v$version" | ||
version_scheme = "semver" | ||
version_provider = "pep621" | ||
update_changelog_on_bump = true |
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