Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
# From https://github.com/4teamwork/ftw-buildouts/blob/master/pycodestyle.cfg
ignore = E121,E122,E123,E125,E126,E127,E128,E203,E301,W503,W606
max-line-length = 125
exclude = .git,__pycache__,venv,.tox,manage.py,include,lib,javascript,lib,node_modules,scss,bin,.eggs,wsgi.py,wsgi.py,src,migrations,docs,gever,bootstrap.py
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Description




Belongs to PBI [TI-xxx].

## Checklist

The following checklist should help us to stick to our "definition of done":

- [ ] Proposed changes include tests.
- [ ] Good error handling with useful messages
- [ ] Changelog added
- [ ] Readme has been updated if changes interfere with the setup process.
33 changes: 33 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Linting

on:
- push

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.13
- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 2.1
- name: Install dependencies
run: poetry install
- name: isort
run: poetry run isort --check-only --quiet --settings pyproject.toml .
- name: flake8
run: poetry run flake8
- name: black
run: poetry run black --check --config pyproject.toml .
- name: tests
run: poetry run pytest
139 changes: 40 additions & 99 deletions HISTORY.txt → CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ Changelog
=========


1.4.1 (unreleased)
------------------

- Nothing changed yet.


1.4.0 (2022-12-14)
------------------

Expand Down Expand Up @@ -74,10 +68,8 @@ Changelog
1.1.2 (2020-06-11)
------------------

- Handle embedded images that also have an external reference.
[buchi]
- Fix renumbering of non-visual image and drawing properties.
[buchi]
- Handle embedded images that also have an external reference. [buchi]
- Fix renumbering of non-visual image and drawing properties. [buchi]


1.1.1 (2020-05-04)
Expand Down Expand Up @@ -108,19 +100,15 @@ Changelog
1.0.0 (2019-06-13)
------------------

- Change license from GPL to MIT.
[buchi]
- Change license from GPL to MIT. [buchi]

- Add support for adding, setting and deleting of doc properties.
[buchi]
- Add support for adding, setting and deleting of doc properties. [buchi]


1.0.0a17 (2019-04-25)
---------------------

- Add functionality to get and set content of plain text content controls
(structured document tags).
[buchi]
- Add functionality to get and set content of plain text content controls (structured document tags). [buchi]


1.0.0a16 (2019-01-15)
Expand All @@ -139,150 +127,103 @@ Changelog
1.0.0a14 (2018-12-04)
---------------------

- Implement generic handling of referenced parts. Among other, this adds
support for embedded Excel charts.
[buchi]

- Handle embedded SVGs.
[buchi]

- Add styles from other parts, e.g. footnotes.
[buchi]
- Implement generic handling of referenced parts. Among other, this adds support for embedded Excel charts. [buchi]
- Handle embedded SVGs. [buchi]
- Add styles from other parts, e.g. footnotes. [buchi]


1.0.0a13 (2018-11-05)
---------------------

- Fix list-styles being set incorrectly when restarting numberings.
[deiferni]
- Fix list-styles being set incorrectly when restarting numberings. [deiferni]


1.0.0a12 (2018-10-30)
---------------------

- Fix setting section type for appended documents with only one section.
[deiferni]
- Fix setting section type for appended documents with only one section. [deiferni]


1.0.0a11 (2018-07-30)
---------------------

- Fix handling of section type.
[buchi]

- Fix an issue where the listing style of the first element was different.
[deiferni]

- Fix issue when restarting intermittent numbering.
[deiferni]
- Fix handling of section type. [buchi]
- Fix an issue where the listing style of the first element was different. [deiferni]
- Fix issue when restarting intermittent numbering. [deiferni]


1.0.0a10 (2018-07-18)
---------------------

- Add console script command to compose two or more word files.
[deiferni]
- Add console script command to compose two or more word files. [deiferni]


1.0.0a9 (2018-05-01)
--------------------

- Fix error in mapping of num_ids introduced in 1.0.0.a7.
[buchi]

- Do not fail when numbering zero is referenced.
[deiferni]
- Fix error in mapping of num_ids introduced in 1.0.0.a7. [buchi]
- Do not fail when numbering zero is referenced. [deiferni]


1.0.0a8 (2018-04-26)
--------------------

- Only attempt to set the nsid when it is available.
[deiferni]
- Only attempt to set the nsid when it is available. [deiferni]


1.0.0a7 (2018-04-20)
--------------------

- Fix handling of images in WordprocessingGroups (<wpg:wpg>).
[buchi]

- Fix handling of shapes in shape groups (<v:group>).
[buchi]

- Fix handling of numberings, avoid inserting multiple numbering properties.
[buchi]

- Fix renumbering of bookmarks.
[buchi]

- Renumber ids of drawing object properties (<wp:docPr>).
[buchi]
- Fix handling of images in WordprocessingGroups (<wpg:wpg>). [buchi]
- Fix handling of shapes in shape groups (<v:group>). [buchi]
- Fix handling of numberings, avoid inserting multiple numbering properties. [buchi]
- Fix renumbering of bookmarks. [buchi]
- Renumber ids of drawing object properties (<wp:docPr>). [buchi]


1.0.0a6 (2018-02-20)
--------------------

- Do not restart numbering of bullets.
[buchi]
- Do not restart numbering of bullets. [buchi]


1.0.0a5 (2018-01-11)
--------------------

- Renumber bookmarks to avoid duplicate ids.
[buchi]

- Add support for shapes.
[buchi]
- Renumber bookmarks to avoid duplicate ids. [buchi]
- Add support for shapes. [buchi]


1.0.0a4 (2017-12-27)
--------------------

- Fix handling of styles when composing documents with different languages.
[buchi]

- Also add numberings referenced in styles.
[buchi]

- Avoid having multiple <w:abstractNum> elements for the same style.
[buchi]

- Restart first numbering of inserted documents
[buchi]

- Add support for anchored images.
[buchi]

- Handle referenced style ids that are not defined in styles.xml
[buchi]

- Remove header and footer references in paragraph properties.
[buchi]
- Fix handling of styles when composing documents with different languages. [buchi]
- Also add numberings referenced in styles. [buchi]
- Avoid having multiple <w:abstractNum> elements for the same style. [buchi]
- Restart first numbering of inserted documents [buchi]
- Add support for anchored images. [buchi]
- Handle referenced style ids that are not defined in styles.xml [buchi]
- Remove header and footer references in paragraph properties. [buchi]


1.0.0a3 (2017-11-22)
--------------------

- Make removal of property fields optional.
[buchi]
- Make removal of property fields optional. [buchi]


1.0.0a2 (2017-11-06)
--------------------

- Fix handling of footnotes containing hyperlinks.
[buchi]
---------------------

- Fix handling of footnotes containing hyperlinks. [buchi]
- Add functionality to deal with custom document properties. Properties can be
updated and fields containing properties can be removed. When appending or
inserting documents their custom document properties get removed automatically.
[buchi]
inserting documents their custom document properties get removed automatically. [buchi]


1.0.0a1 (2017-09-13)
--------------------
---------------------

New features:

- Initial release
[buchi]
- Initial release [buchi]
8 changes: 2 additions & 6 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
graft docxcompose
prune tests
include *.rst
include *.txt
exclude .gitignore
global-exclude *.pyc
# We don't release this package. This dummy MANIFEST.in stops zest.releaser
# from complaining.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ line, e.g.:
Installation for development
----------------------------

To install docxcompose for development, clone the repository and using a python with setuptools (for example a fresh virtualenv), install it using pip:
To install docxcompose for development, clone the repository and using a python with poetry:

.. code:: sh

$ pip install -e .[tests]
$ poetry install

Tests can then be run with ``pytest``.

Expand Down
2 changes: 1 addition & 1 deletion bin/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*
!.gitignore
!cibuild
!release
6 changes: 0 additions & 6 deletions bin/cibuild

This file was deleted.

7 changes: 7 additions & 0 deletions bin/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env sh

set -euo pipefail

git pull
poetry run fullrelease
poetry publish --build
1 change: 1 addition & 0 deletions changes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.gitignore
1 change: 1 addition & 0 deletions changes/fix_pkg_resources.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix deprecated pkg_resources after it was removed from setuptools. [jch]
1 change: 1 addition & 0 deletions changes/project_setup.other
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use poetry for dependecy management and towncrier and zest.releaser for release managment. [jch]
Loading