Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.8-alpine

ARG buildDeps='g++ gnupg curl'
ARG buildDeps='g++ gnupg curl libffi-dev openssl-dev'

WORKDIR /usr/src/app

Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,18 @@ as well as its correspondent options.
python cli.py gen_swagger_json -f ~/Downloads/swagger.json
```

## Semantic versioning

### Style
We use [angular commit message style](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits) as the standard commit message style.

### Release
1. A Release can be done manually or automatically using CI, in either case the variable `GH_TOKEN` is required
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say that

The release is automatically done by the TimeTracker CI. The variable GH_TOKEN is required...

to post releases to Github. The `GH_TOKEN` can be generated following [these steps](https://help.github.com/es/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing last point: .


2. We use the command `semantic-release publish` after a successful PR to make a release. Check the library
[python-semantic-release](https://python-semantic-release.readthedocs.io/en/latest/commands.html#publish) for details of underlying operations.

## Run as docker container
1. Build image
```bash
Expand Down
3 changes: 3 additions & 0 deletions requirements/time_tracker_api/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ flask-restplus==0.12.1
#CLI support
Flask-Script==2.0.6

#Semantic versioning
python-semantic-release==5.1.0

# The Debug Toolbar
Flask-DebugToolbar==0.11.0

Expand Down
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
testpaths = tests
addopts = -p no:warnings

[semantic_release]
version_variable = time_tracker_api/__init__.py:__version__
upload_to_pypi = false

[coverage:run]
branch = True
source =
Expand Down
2 changes: 2 additions & 0 deletions time_tracker_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

from flask import Flask

__version__ = '0.0.2'

flask_app: Flask = None


Expand Down
9 changes: 6 additions & 3 deletions time_tracker_api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
from flask import current_app as app
from flask_restplus import Api, fields
from flask_restplus._http import HTTPStatus
from time_tracker_api import __version__

faker = Faker()

api = Api(version='1.0.1',
title="TimeTracker API",
description="API for the TimeTracker project")
api = Api(
version=__version__,
title="TimeTracker API",
description="API for the TimeTracker project"
)

# Common models structure
audit_fields = {
Expand Down