Skip to content

Commit 619819c

Browse files
authored
Refactor docs folder/file structure and add plugins (#598)
- Migrated documentation structure from root-level `mkdocs.yml` to dedicated `docs/mkdocs.yml` with enhanced plugin configuration - Added comprehensive MkDocs plugins including spellcheck, git integration, minification, and link checking capabilities - Restructured documentation source files into a proper `docs/src/` directory with improved organization
1 parent 83e9631 commit 619819c

23 files changed

+822
-264
lines changed

.github/workflows/ci.yml

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,29 @@ jobs:
3333
run: hatch run lint:check || true
3434
# TODO: Remove '|| true' when linting issues are resolved in future PR
3535

36+
lint-docs:
37+
name: Lint Documentation
38+
runs-on: ubuntu-latest
39+
permissions:
40+
contents: read
41+
steps:
42+
- uses: actions/checkout@v4
43+
with:
44+
fetch-depth: 0
45+
- uses: actions/setup-python@v5
46+
with:
47+
python-version: 3.x
48+
cache: pip
49+
- name: Install dependencies
50+
run: pip install --upgrade hatch uv
51+
# FIXME: Link checking disabled due to github.com link HTTP rate limit issues.
52+
# - name: Check documentation links
53+
# run: hatch run docs:linkcheck
54+
- name: Check docs build
55+
run: hatch run docs:build
56+
- name: Validate changelog format
57+
run: hatch run scripts/validate_changelog.py
58+
3659
test-python:
3760
name: Python ${{ matrix.python-version }}
3861
runs-on: ubuntu-latest
@@ -41,8 +64,7 @@ jobs:
4164

4265
strategy:
4366
matrix:
44-
python-version:
45-
["3.9", "3.10", "3.11", "3.12", "3.13"]
67+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
4668

4769
steps:
4870
- uses: actions/checkout@v4
@@ -88,7 +110,7 @@ jobs:
88110
cache: pip
89111

90112
- name: Install dependencies
91-
run: python -m pip install --upgrade pip hatch uv
113+
run: python -m pip install --upgrade pip hatch uv
92114

93115
- name: Run functional tests
94116
run: hatch run functional:test
@@ -154,6 +176,37 @@ jobs:
154176
name: coverage-report
155177
path: htmlcov
156178

179+
publish-docs:
180+
name: Publish Documentation
181+
runs-on: ubuntu-latest
182+
if: github.ref_name == 'master' || startsWith(github.ref, 'refs/tags/')
183+
needs:
184+
- lint-docs
185+
permissions:
186+
contents: write
187+
concurrency:
188+
group: publish-docs
189+
steps:
190+
- uses: actions/checkout@v4
191+
with:
192+
fetch-depth: 0
193+
- uses: actions/setup-python@v5
194+
with:
195+
python-version: 3.x
196+
cache: pip
197+
- name: Install dependencies
198+
run: pip install --upgrade hatch uv
199+
- name: Configure Git
200+
run: |
201+
git config user.name github-actions
202+
git config user.email github-actions@github.com
203+
- name: Publish Develop Docs
204+
if: github.ref_name == 'master'
205+
run: hatch run docs:deploy_develop
206+
- name: Publish Latest Docs
207+
if: startsWith(github.ref, 'refs/tags/')
208+
run: hatch run docs:deploy_latest ${{ github.ref_name }}
209+
157210
# This workflow relies on the user manually creating a "stub release" on GitHub with the correct version number in the tag.
158211
publish-github:
159212
name: Publish GitHub Release

.readthedocs.yaml

Lines changed: 0 additions & 33 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,270 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
<!--
9+
Using the following categories, list your changes in this order:
10+
[Added, Changed, Deprecated, Removed, Fixed, Security]
11+
12+
Don't forget to remove deprecated code on each major release!
13+
-->
14+
15+
## [Unreleased]
16+
17+
### Added
18+
- Implement new `SqliteBackupConnector` to backup SQLite3 databases using the `.backup` command (safe to execute on databases with active connections).
19+
20+
### Changed
21+
- This repository has been transferred out of Jazzband due to logistical concerns.
22+
23+
### Removed
24+
- Drop support for end-of-life Python 3.7 and 3.8.
25+
- Drop support for end-of-life Django 3.2.
26+
- Drop support for `DBBACKUP_STORAGE` AND `DBBACKUP_STORAGE_OPTIONS` settings, use Django's `STORAGES['dbbackup']` setting instead.
27+
28+
### Fixed
29+
- Fix encryption support when using `gnupg==5.x`.
30+
31+
### Security
32+
- Use environment variable for PostgreSQL password to prevent password leakage in logs/emails.
33+
34+
## [4.3.0] - 2025-05-09
35+
36+
### Added
37+
- Add generic `--pg-options` to pass custom options to postgres.
38+
- Add option `--if-exists` for `pg_dump` command.
39+
- Support Python 3.13 and Django 5.2.
40+
41+
### Fixed
42+
- Empty string as HOST for postgres unix domain socket connection is now supported.
43+
44+
## [4.2.1] - 2024-08-23
45+
46+
### Added
47+
- Add `--no-drop` option to `dbrestore` command to prevent dropping tables before restoring data.
48+
49+
### Fixed
50+
- Fix bug where sqlite `dbrestore` would fail if field data contains the line break character.
51+
52+
## [4.2.0] - 2024-08-22
53+
54+
### Added
55+
- Add PostgreSQL Schema support.
56+
- Add support for new `STORAGES` (Django 4.2+) setting under the 'dbbackup' alias.
57+
58+
### Changed
59+
- Set postgres default database `HOST` to `"localhost"`.
60+
- Add warning for filenames with slashes in them.
61+
62+
### Removed
63+
- Remove usage of deprecated `get_storage_class` function in newer Django versions.
64+
65+
### Fixed
66+
- Fix restore of database from S3 storage by reintroducing `inputfile.seek(0)` to `utils.uncompress_file`.
67+
- Fix bug where dbbackup management commands would not respect `settings.py:DBBACKUP_DATABASES`.
68+
69+
## [4.1.0] - 2024-01-14
70+
71+
### Added
72+
- Support Python 3.11 and 3.12.
73+
- Support Django 4.1, 4.2, and 5.0.
74+
75+
### Changed
76+
- Update documentation for backup directory consistency and update links.
77+
78+
### Removed
79+
- Drop python 3.6.
80+
81+
### Fixed
82+
- Fix restore fail after editing filename.
83+
- `RESTORE_PREFIX` for `RESTORE_SUFFIX`.
84+
85+
## [4.0.2] - 2022-09-27
86+
87+
### Added
88+
- Support for prometheus wrapped databases.
89+
90+
### Fixed
91+
- Backup of SQLite fail if there are Virtual Tables (e.g. FTS tables).
92+
- Fix broken `unencrypt_file` function in `python-gnupg`.
93+
94+
## [4.0.1] - 2022-07-09
95+
96+
### Added
97+
- Enable functional tests in CI.
98+
99+
### Changed
100+
- As of this version, dbbackup is now within Jazzband! This version tests our Jazzband release CI, and adds miscellaneous refactoring/cleanup.
101+
- Update `settings.py` comment.
102+
- Jazzband transfer tasks.
103+
- Refactoring and tooling.
104+
105+
### Fixed
106+
- Fix GitHub Actions configuration.
107+
108+
## [4.0.0b0] - 2021-12-19
109+
110+
### Added
111+
- Add authentication database support for MongoDB.
112+
- Explicitly support Python 3.6+.
113+
- Add support for exclude tables data in the command interface.
114+
115+
### Changed
116+
- Replace `ugettext_lazy` with `gettext_lazy`.
117+
- Changed logging settings from `settings.py` to late init.
118+
- Use `exclude-table-data` instead of `exclude-table`.
119+
- Move author and version information into `setup.py` to allow building package in isolated environment (e.g. with the `build` package).
120+
121+
### Removed
122+
- Remove six dependency.
123+
- Drop support for end of life Django versions. Currently support 2.2, 3.2, 4.0.
124+
125+
### Fixed
126+
- Fix `RemovedInDjango41Warning` related to `default_app_config`.
127+
- Fix authentication error when postgres is password protected.
128+
- Documentation fixes.
129+
130+
## [3.3.0] - 2020-04-14
131+
132+
### Added
133+
- `"output-filename"` in `mediabackup` command.
134+
- Updates to include SFTP storage.
135+
136+
### Fixed
137+
- Fixes for test infrastructure and mongodb support.
138+
- sqlite3: don't throw warnings if table already exists.
139+
- Fixes for django v3 and update travis.
140+
- Restoring from FTP.
141+
- Fix management commands when using Postgres on non-latin Windows.
142+
- Fix improper database name selection when performing a restore.
143+
144+
## [3.2.0] - 2017-09-18
145+
146+
### Added
147+
- `PgDumpBinaryConnector` (binary `pg_dump` integration) with related functional tests.
148+
- Option to keep specific old backups (custom clean old backups logic).
149+
150+
### Changed
151+
- Updated PostgreSQL documentation and help text for clarity.
152+
153+
### Fixed
154+
- SFTP storage file attribute error ("SFTPStorageFile object has no attribute name").
155+
- Escaping of passwords passed to commands.
156+
- Corrected management command help text after flag logic change.
157+
158+
## [3.1.3] - 2016-11-25
159+
160+
### Fixed
161+
- Reverted a regression in `pg_dump` database name handling introduced shortly before.
162+
163+
## [3.1.2] - 2016-11-25
164+
165+
### Fixed
166+
- Correct `pg_dump` invocation: proper username and database argument handling.
167+
168+
## [3.1.1] - 2016-11-16
169+
170+
### Fixed
171+
- Unicode handling issues with SQLite backups.
172+
173+
## [3.1.0] - 2016-11-15
174+
175+
### Added
176+
- Support for inheriting parent environment variables in command connectors (`USE_PARENT_ENV`).
177+
178+
### Changed
179+
- Complete revamp of logging and error email notification system (more structured logging & tests).
180+
181+
## [3.0.4] - 2016-11-14
182+
183+
### Added
184+
- Ability to link / register custom connectors.
185+
186+
### Changed
187+
- Use naïve (timezone-unaware) `datetime` in backup filenames for broader compatibility.
188+
189+
### Fixed
190+
- `mediabackup` timeout issue.
191+
- Improved PostgreSQL `dbrestore` error recognition.
192+
193+
## [3.0.3] - 2016-09-15
194+
195+
### Added
196+
- Server name filter for database and media backup/restore.
197+
- Ability to select multiple databases for backup.
198+
199+
### Changed
200+
- Improved filename generation logic.
201+
202+
### Fixed
203+
- Database filter logic and clean backup behavior.
204+
205+
## [3.0.2] - 2016-08-06
206+
207+
### Fixed
208+
- Disabled Django loggers inadvertently affecting application logging.
209+
210+
## [3.0.1] - 2016-08-04
211+
212+
### Added
213+
- New connector architecture with dedicated connectors for PostgreSQL, MySQL, SQLite (copy) and MongoDB.
214+
- Media backup & restore system overhaul (per-file processing, media restore command & tests).
215+
- Exclude table/data options, prefix & suffix options for connector commands.
216+
- Environment variable control for command execution.
217+
- GIS database engine mapping support.
218+
- Functional, integration and upgrade test suites; app & system checks integration.
219+
220+
### Changed
221+
- Refactored and unified code between database & media backup/restore commands.
222+
- Renamed `mediabackup` option (`--no-compress` replaced by explicit `--compress`).
223+
224+
### Removed
225+
- Legacy `DBCommand` code in favor of new connector system.
226+
227+
## [2.5.0] - 2016-03-29
228+
229+
### Added
230+
- `--filename` and `--path` options for `dbbackup` / `dbrestore` commands.
231+
- Binary size unit prefixes in output.
232+
233+
### Changed
234+
- Dropbox storage updated to OAuth2 & Python 3 compatibility.
235+
236+
### Removed
237+
- `DBBACKUP_DROPBOX_ACCESS_TYPE` setting (deprecated by OAuth2 changes).
238+
239+
### Fixed
240+
- NameError for missing `warnings` import.
241+
- Wildcard handling in generated filenames; proper server name derivation for SQLite paths.
242+
243+
## [2.3.3] - 2015-10-05
244+
245+
### Changed
246+
- Initial copy from BitBucket to GitHub.
247+
248+
### Fixed
249+
- Miscellaneous maintenance and minor bug fixes.
250+
251+
[Unreleased]: https://github.com/Archmonger/django-dbbackup/compare/4.3.0...HEAD
252+
[4.3.0]: https://github.com/Archmonger/django-dbbackup/compare/4.2.1...4.3.0
253+
[4.2.1]: https://github.com/Archmonger/django-dbbackup/compare/4.2.0...4.2.1
254+
[4.2.0]: https://github.com/Archmonger/django-dbbackup/compare/4.1.0...4.2.0
255+
[4.1.0]: https://github.com/Archmonger/django-dbbackup/compare/4.0.2...4.1.0
256+
[4.0.2]: https://github.com/Archmonger/django-dbbackup/compare/4.0.1...4.0.2
257+
[4.0.1]: https://github.com/Archmonger/django-dbbackup/compare/4.0.0b0...4.0.1
258+
[4.0.0b0]: https://github.com/Archmonger/django-dbbackup/compare/3.3.0...4.0.0b0
259+
[3.3.0]: https://github.com/Archmonger/django-dbbackup/compare/3.2.0...3.3.0
260+
[3.2.0]: https://github.com/Archmonger/django-dbbackup/compare/3.1.3...3.2.0
261+
[3.1.3]: https://github.com/Archmonger/django-dbbackup/compare/3.1.2...3.1.3
262+
[3.1.2]: https://github.com/Archmonger/django-dbbackup/compare/3.1.1...3.1.2
263+
[3.1.1]: https://github.com/Archmonger/django-dbbackup/compare/3.1.0...3.1.1
264+
[3.1.0]: https://github.com/Archmonger/django-dbbackup/compare/3.0.4...3.1.0
265+
[3.0.4]: https://github.com/Archmonger/django-dbbackup/compare/3.0.3...3.0.4
266+
[3.0.3]: https://github.com/Archmonger/django-dbbackup/compare/3.0.2...3.0.3
267+
[3.0.2]: https://github.com/Archmonger/django-dbbackup/compare/3.0.1...3.0.2
268+
[3.0.1]: https://github.com/Archmonger/django-dbbackup/compare/2.5.0...3.0.1
269+
[2.5.0]: https://github.com/Archmonger/django-dbbackup/compare/2.3.3...2.5.0
270+
[2.3.3]: https://github.com/Archmonger/django-dbbackup/releases/tag/2.3.3

0 commit comments

Comments
 (0)