Skip to content

Commit

Permalink
Merge pull request #33 from fyndata/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
glarrain committed May 4, 2019
2 parents bf07bec + b410a4c commit 570c121
Show file tree
Hide file tree
Showing 8 changed files with 155 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.5.0
current_version = 0.5.1
commit = True
tag = True

Expand Down
13 changes: 9 additions & 4 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
History
-------

0.5.1 (2019-05-03)
+++++++++++++++++++++++

* (PR #32, 2019-05-03) Requirements: updates and package upper-bounds

0.5.0 (2019-04-25)
+++++++++++++++++++++++

* (PR #29, 2019-04-25) dte.data_models: modify new fields of `DteDataL2`
* (PR #28, 2019-04-25) libs: add module `crypto_utils`
* (PR #27, 2019-04-25) libs: add module `encoding_utils`
* (PR #29, 2019-04-25) dte.data_models: modify new fields of ``DteDataL2``
* (PR #28, 2019-04-25) libs: add module ``crypto_utils``
* (PR #27, 2019-04-25) libs: add module ``encoding_utils``
* (PR #26, 2019-04-25) test_data: add files
* (PR #25, 2019-04-25) libs.xml_utils: fix class alias `XmlElementTree`
* (PR #25, 2019-04-25) libs.xml_utils: fix class alias ``XmlElementTree``
* (PR #24, 2019-04-25) requirements: add and update packages
* (PR #22, 2019-04-24) test_data: add files
* (PR #21, 2019-04-22) dte: many improvements
Expand Down
2 changes: 1 addition & 1 deletion cl_sii/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"""


__version__ = '0.5.0'
__version__ = '0.5.1'
3 changes: 2 additions & 1 deletion cl_sii/libs/mm_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def __init__(self, format: str = None, **kwargs: Any) -> None:
"""
super().__init__(**kwargs)
# Allow this to be None. It may be set later in the ``_serialize``
# or ``_desrialize`` methods This allows a Schema to dynamically set the
# or ``_deserialize`` methods This allows a Schema to dynamically set the
# dateformat, e.g. from a Meta option
# TODO: for 'marshmallow 3', rename 'dateformat' to 'datetimeformat'.
self.dateformat = format

def _add_to_schema(self, field_name: str, schema: marshmallow.Schema) -> None:
Expand Down
127 changes: 127 additions & 0 deletions docs/project-maintenance.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
===================
Project maintenance
===================

Release new version
-------------------

0) Sync with remote
+++++++++++++++++++

(local workstation)

Make sure main branches are synced with local ones, and tests pass::

make -s clean
test -z "$(git status --porcelain)" && echo 'CLEAN' || echo 'DIRTY'
git checkout master
git push
git checkout develop
git push

Then wait for the
`CircleCI tests (develop) <https://circleci.com/gh/fyndata/workflows/lib-cl-sii-python/tree/develop>`_
and verify they were successful.

1) Update changelog
+++++++++++++++++++

(local workstation)

Generate summary::

git lg-github-pr-summary master..develop

Add new entry to changelog including the changes summary (remember to format as reST)::

nano 'HISTORY.rst'
git add 'HISTORY.rst'
git commit -m "HISTORY: update for new version"

2) Bump package version
+++++++++++++++++++

(local workstation)

Either of the following alternatives::

bumpversion major|minor|patch
bumpversion --new-version 'X.Y.Z'

Push commit ``abcd1234`` and tag ``vX.Y.Z`` automatically created by ``bumpversion``::

git push
git push --tags

3) Create pull request and new release
+++++++++++++++++++

(GitHub)

* Create PR for
`master...develop <https://github.com/fyndata/lib-cl-sii-python/compare/master...develop>`_.

* Name: "Release".

* Labels: ``kind: release``.

* Description: same as the new changelog entry (remember to format as Markdown).

* Merge PR.

* Go to the CircleCI job named ``ci/circleci: dist`` corresponding to commit ``abcd1234``
(tagged ``vX.Y.Z``), tab "Artifacts", and download the generated package files to local repo
directory ``dist/``:

* ``cl-sii-X.Y.Z.tar.gz``

* ``cl_sii-X.Y.Z-py3-none-any.whl``

* Create new release:

* Go to the repo's
`"Releases/tags" section <https://github.com/fyndata/lib-cl-sii-python/tags>`_.

* Create release for the new tag just pushed.

* Title: ``vX.Y.Z``.

* Description: same as the PR just created.

* For the new GitHub release, add the files downloaded to ``dist/``.

* "Publish release".

4) Publish to PyPI
+++++++++++++++++++

(local workstation)

Run::

make upload-release
make -s clean

Check out the `project's page at PyPI <https://pypi.org/project/cl-sii/>`_.

5) Update ``develop``
+++++++++++++++++++

(local workstation)

Update ``develop`` from ``master``::

git checkout master
git pull
git checkout develop
git merge --ff master
git push

Appendix
--------

Add git alias::

git config --global alias.lg-github-pr-summary \
'!f() { git log --date=short --merges --grep "^Merge pull request #[[:digit:]]* from" --pretty="tformat:- (%C(auto,red)<S>%s</S>%C(reset), %C(auto,green)%ad%C(reset)) %w(72,0,2)%b" "$@" | sed -E "s|<S>Merge pull request (#[0-9]+) from .+</S>|PR \1|"; }; f'

6 changes: 3 additions & 3 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

# Required packages:
cryptography==2.6.1
defusedxml==0.5.0
lxml==4.2.6
marshmallow==2.16.3
defusedxml==0.6.0
lxml==4.3.3
marshmallow==2.19.2
pyOpenSSL==18.0.0
pytz==2019.1
signxml==2.6.0
Expand Down
11 changes: 6 additions & 5 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

# Required packages:
codecov==2.0.15
coverage==4.5.2
flake8==3.7.6
mypy==0.670
tox==3.7.0
coverage==4.5.3
flake8==3.7.7
mypy==0.701
tox==3.9.0

# Packages dependencies:
# - codecov:
Expand Down Expand Up @@ -34,6 +34,7 @@ pluggy==0.9.0
py==1.8.0
pycodestyle==2.5.0
pyflakes==2.1.1
requests
toml==0.10.0
typed-ast==1.3.4
typed-ast==1.3.5
virtualenv==16.5.0
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ def get_version(*file_paths: Sequence[str]) -> str:
readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')

# TODO: add reasonable upper-bound for some of these packages?
requirements = [
'cryptography>=2.6.1',
'defusedxml>=0.5.0',
'lxml>=4.2.6',
'marshmallow>=2.16.3',
'pyOpenSSL>=18.0.0',
'cryptography>=2.6.1,<3',
'defusedxml>=0.5.0,<1',
'lxml>=4.2.6,<5',
'marshmallow>=2.16.3,<3',
# TODO: remove upper-bound after a new release of 'signxml' drops the requirement 'pyOpenSSL<19'
'pyOpenSSL>=18.0.0,<19',
'pytz>=2018.7',
'signxml>=2.6.0',
]
Expand Down

0 comments on commit 570c121

Please sign in to comment.