Skip to content
Draft

Dev #261

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
3b414fe
update python versions, update action version
gisellerosetta Apr 3, 2025
aa87db8
update required python version
gisellerosetta Apr 3, 2025
e633ec4
upgrade setuptools in linux ci
gisellerosetta Apr 3, 2025
8259ccf
upgrade setuptools in windows ci
gisellerosetta Apr 3, 2025
3668be0
add build step to ci
gisellerosetta Apr 3, 2025
127de97
update readme, add install steps
gisellerosetta Apr 3, 2025
62e0b55
update installation instructions
gisellerosetta Apr 3, 2025
0df9c30
Merge pull request #258 from best-practice-and-impact/update-python-v…
gisellerosetta Apr 3, 2025
ce6fae3
fix link, formatting, add install detail
gisellerosetta Apr 4, 2025
caeb94e
Merge pull request #260 from best-practice-and-impact/update-read-me
gisellerosetta Apr 4, 2025
9d6b8cd
add hooks, update config, update readme
gisellerosetta Apr 8, 2025
c2070dc
Revert "add hooks, update config, update readme"
gisellerosetta Apr 8, 2025
cce6a1c
Merge branch 'main' into dev
gisellerosetta Apr 8, 2025
1a9e42b
update read the docs config (#267)
gisellerosetta Aug 6, 2025
3ae8b85
Merge branch 'main' into dev
gisellerosetta Aug 6, 2025
2e3ccfa
add hooks, update readme, update config (#264)
gisellerosetta Sep 1, 2025
cc39d8a
Use cell_autofit_width to calculate column widths
ldavies99 Sep 23, 2025
c4e3b17
Run pre-commits
ldavies99 Sep 23, 2025
a523b1e
Import cell_autofit_width
ldavies99 Sep 23, 2025
640dee6
Update test__calculate_column_widths and remove test__longest_line_le…
ldavies99 Sep 23, 2025
ec80782
Add CODEOWNERS file (#281)
ldavies99 Sep 29, 2025
3f09ff9
Make column widths adjust for font size and bold formatting, and upda…
ldavies99 Sep 29, 2025
8fc94de
Update requirements in .toml (#283)
Sara-Jade-O Sep 29, 2025
ae40d28
Merge branch 'dev' into 155-an-alternative-approach-for-auto-column-w…
ldavies99 Sep 29, 2025
2242c8d
Make auto_width parameter able to be a dict to specify which sheets t…
ldavies99 Sep 30, 2025
6dafb89
Add datetime test input
ldavies99 Sep 30, 2025
ff59c93
232 pytest regressions plugin (#285)
ldavies99 Oct 1, 2025
f58b38d
Add capitalisation into _get_scaling_factor
ldavies99 Oct 6, 2025
8d35cfd
Add two examples to demonstrate end to end process and wide vs long f…
Sara-Jade-O Oct 6, 2025
a8de2b5
Merge pull request #284 from ONSdigital/212-specify-which-tables-to-a…
Sara-Jade-O Oct 6, 2025
a5fa600
271 mkdocs dev (#291)
gisellerosetta Oct 8, 2025
fb6c676
Add gh pages ci (#293)
gisellerosetta Oct 8, 2025
bd9c28c
fix bug to allow formatting of multiple individual cells (#296)
CHCRowley Oct 13, 2025
16f1d30
Update expected_workbook.xlsx
Sara-Jade-O Oct 13, 2025
2adc267
Merge remote-tracking branch 'origin/dev' into 155-an-alternative-app…
Sara-Jade-O Oct 13, 2025
45a8d84
Update gptables/test/test_api/test_end_to_end.xlsx file
Sara-Jade-O Oct 13, 2025
023b7ae
Merge pull request #282 from ONSdigital/155-an-alternative-approach-f…
Sara-Jade-O Oct 13, 2025
fe5cf72
287 restructure docs (#297)
gisellerosetta Oct 14, 2025
ddc8a14
Delete closed_issue_log.md
gisellerosetta Oct 14, 2025
b37b650
Update feature_request.md
gisellerosetta Oct 14, 2025
7720f7a
Update feature_request.md
gisellerosetta Oct 14, 2025
d3c3323
Update feature_request.md
gisellerosetta Oct 14, 2025
a4341e3
Update pull_request_template.md
gisellerosetta Oct 14, 2025
760eac6
fix merge conflict
gisellerosetta Oct 14, 2025
a6abb7f
update changelog
gisellerosetta Oct 14, 2025
43004c2
fix merge conflictMerge branch 'dev' into remove-log-update-templates
gisellerosetta Oct 14, 2025
5ccc3fa
Add exception catching and example of note entry with no link in peng…
Sara-Jade-O Oct 14, 2025
6340c2b
set up examples page, add collapsible code segment docs add ons (#303)
gisellerosetta Oct 16, 2025
cd5f46c
Fix conflict (#318)
gisellerosetta Oct 16, 2025
4583029
Fix conflict (#320)
gisellerosetta Oct 16, 2025
c4682e5
Fix conflict (#321)
gisellerosetta Oct 16, 2025
38dd090
Fix conflict (#322)
gisellerosetta Oct 16, 2025
00f2d46
revert action version, use hooks
gisellerosetta Oct 17, 2025
34dffe6
Merge branch 'dev' into remove-log-update-templates
gisellerosetta Oct 17, 2025
c8a243e
Merge pull request #298 from ONSdigital/remove-log-update-templates
ellie-o Oct 17, 2025
0eb38a8
add basic example, update commentary, add picture (#325)
gisellerosetta Oct 20, 2025
8ae1466
blue in python is #0000FF which passes the WCAG AA contrast check, ad…
addledrabbit Oct 20, 2025
2b25f1e
update intro, add picture (#326)
gisellerosetta Oct 20, 2025
a19ad2f
Merge remote-tracking branch 'origin/dev' into 280-check-the-hyperlin…
addledrabbit Oct 21, 2025
7cd9718
running commit hooks
Jday7879 Oct 22, 2025
437d2a1
Merge pull request #328 from ONSdigital/280-check-the-hyperlink-colou…
Jday7879 Oct 22, 2025
6debe24
add cover sheet example, correct typo in api/Cover.md and starting ou…
CHCRowley Oct 27, 2025
a6eeed7
Remove warnings (#332)
ldavies99 Oct 27, 2025
ff16ce8
run precommit hooks
gisellerosetta Oct 28, 2025
ea3ba17
Merge pull request #331 from ONSdigital/305-update-cover-page-example
Sara-Jade-O Oct 28, 2025
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
4 changes: 2 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[run]
omit =
omit =
gptables/test/*
gptables/examples/*
gptables/examples/*
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
ignore = E501, W503, W504
exclude = .git,.vscode,docs/
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
#
# These owners will be the default owners for everything in
# the repo (*). Unless a later match takes precedence,
# the following will be requested for
# review when someone opens a pull request.
* @gisellerosetta
12 changes: 8 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ labels: enhancement
assignees: ''

---
It would help the development team for the requester to supply the following information:

**Is your feature request related to a problem? Please describe.**
**Is your feature request related to a problem? Please describe:**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
**Describe the solution you'd like:**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
**Please confirm you've checked our [won't fix](https://github.com/ONSdigital/gptables/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22wontfix%20%3Acry%3A%22) issues**
Yes/no

**Describe alternatives you've considered:**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
**Additional context:**
Add any other context or screenshots about the feature request here.
10 changes: 7 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

### Proposed Changes
-
-

### Related Issues
- Related to #
Expand All @@ -12,12 +13,15 @@ Please indicate items that aren't necessary and why, with comments around incomp
- [ ] Version number has been incremented, according to [SemVer][semver]
- [ ] Changelog has been updated, listing changes to this version. Use the [keep a changelog][changelog] format
- [ ] New features are tested
- [ ] New features follow the Analysis Function Releasing statistics in spreadsheets [guidance][guidance]
- [ ] New features are documented using the [numpydoc][numpy-docstrings] docstring format
- [ ] Other relevant package documentation is updated
- [ ] For new functionality, examples are included in the docs or a [feature request][feature-request] has
been made for it/them.
- [ ] For new functionality, examples are included in the docs or a [feature request][feature-request] has
been made for it/them
- [ ] Required workflows and pre-commits succeed

[changelog]: [https://keepachangelog.com/en/1.0.0/]
[feature-request]: [https://github.com/best-practice-and-impact/gptables/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=]
[guidance]: https://analysisfunction.civilservice.gov.uk/policy-store/releasing-statistics-in-spreadsheets/
[numpy-docstrings]: [https://numpydoc.readthedocs.io/en/latest/format.html]
[semver]: [https://semver.org/spec/v2.0.0.html]
70 changes: 31 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install wheel
pip install -e .[testing]
pip install -e .[dev]

- name: Run pytest
run: |
pytest --cov-config=.coveragerc --cov=gptables --cov-report=xml --cov-report=term-missing
Expand All @@ -45,13 +45,13 @@ jobs:

linux:

name: Tests on Linux
name: Build and test on Linux
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']



steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -62,17 +62,25 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install wheel
pip install --upgrade-strategy eager -e .[testing]
pip install --upgrade-strategy eager -e .[dev]
- name: Run pre-commit hooks
run: |
pre-commit run --all-files
- name: Build
run: |
pip install build
python -m build
- name: Run pytest
run: pytest
run: |
python -m pip install --upgrade setuptools
pytest

windows:

name: Tests on Windows
name: Build and test on Windows
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12']


steps:
Expand All @@ -91,35 +99,19 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install wheel
pip install --upgrade-strategy eager -e .[testing]
- name: Run pytest
run: pytest

build_and_deploy_docs:
name: Build and deploy docs to Pages
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: actions/cache@v4
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python dependencies
pip install --upgrade-strategy eager -e .[dev]
- name: Run pre-commit hooks
run: |
python -m pip install --upgrade pip
pip install wheel
pip install --upgrade-strategy eager -e .[docs]
- name: Build the book
pre-commit run --all-files
- name: Build
run: |
(cd docs && make clean && make html)

pip install build
python -m build
- name: Run pytest
run: |
python -m pip install --upgrade setuptools
pytest

publish:
name: Publish to PyPi
needs: [linux, windows, test-with-cov]
Expand All @@ -133,7 +125,7 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install build dependencies
Expand All @@ -143,4 +135,4 @@ jobs:
run: |
python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@v1.13.0
uses: pypa/gh-action-pypi-publish@v1.12.3
28 changes: 28 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy docs

on:
push:
branches:
- 'main'

jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install reqs
run: pip install .[docs]
- name: Build docs
run: mkdocs build
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.7.3
with:
branch: gh-pages
folder: site

permissions:
contents: write
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ env/
*~lock*
docs/build/**
gptables/examples/*.xlsx
.vscode/
gptables/test/actual_workbook.xlsx
.vscode/
site/
43 changes: 43 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
name: Check for files larger than 5 MB
args: [ "--maxkb=5120" ]
- id: end-of-file-fixer
name: Check for a blank line at the end of scripts (auto-fixes)
- id: trailing-whitespace
name: Check for trailing whitespaces (auto-fixes)
- repo: https://github.com/pycqa/isort
rev: 6.0.1
hooks:
- id: isort
name: isort - Sort Python imports (auto-fixes)
args: [ "--profile", "black", "--filter-files" ]
- repo: https://github.com/psf/black
rev: 24.8.0 # Replace by any tag/version: https://github.com/psf/black/tags
hooks:
- id: black
name: black - consistent Python code formatting (auto-fixes)
language_version: python # Should be a command that runs python3.6+
- repo: https://github.com/PyCQA/flake8
rev: 7.1.2
hooks:
- id: flake8
name: flake8 - Python linting
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
name: detect-secrets - Detect secrets in staged code
exclude: .*/tests/.*
- repo: https://github.com/PyCQA/bandit
rev: 1.8.3
hooks:
- id: bandit
name: bandit - Checks for vulnerabilities
args: ["-c", "pyproject.toml"]
additional_dependencies: ["bandit[toml]"]
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

-------------------------------------------------------------------------------
-------------------------------------------------------------------------------

For code from the XlsxWriter package, where used:

Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ include requirements.txt
recursive-include gptables/examples *.csv *.py
recursive-include gptables/theme_pickles *.pickle
recursive-include gptables/themes *.yaml
recursive-include gptables/test test*.py
recursive-include gptables/test test*.py
Loading