Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: palewire/django-bakery
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.6.1
Choose a base ref
...
head repository: palewire/django-bakery
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 6,393 additions and 8,145 deletions.
  1. +0 −20 .coveragerc
  2. +11 −0 .github/dependabot.yaml
  3. +121 −0 .github/workflows/continuous-deployment.yaml
  4. +69 −0 .github/workflows/docs.yaml
  5. +8 −0 .gitignore
  6. +0 −36 .travis.yml
  7. +21 −0 LICENSE
  8. +4 −0 MANIFEST.in
  9. +24 −0 Pipfile
  10. +2,008 −0 Pipfile.lock
  11. +4 −16 README.md
  12. +35 −0 bakery/__init__.py
  13. +12 −0 bakery/apps.py
  14. +74 −0 bakery/feeds.py
  15. +115 −0 bakery/management/commands/__init__.py
  16. +234 −144 bakery/management/commands/build.py
  17. +293 −130 bakery/management/commands/publish.py
  18. +31 −9 bakery/management/commands/unpublish.py
  19. +18 −9 bakery/models.py
  20. +5 −5 bakery/static_urls.py
  21. +14 −10 bakery/static_views.py
  22. +16 −9 bakery/tasks.py
  23. +457 −34 bakery/tests/__init__.py
  24. +4 −0 bakery/tests/static/djcelery/style.css
  25. +1 −0 bakery/tests/templates/dayview.html
  26. +1 −0 bakery/tests/templates/indexview.html
  27. +1 −0 bakery/tests/templates/monthview.html
  28. +1 −0 bakery/tests/templates/yearview.html
  29. +0 −200 bakery/views.py
  30. +27 −0 bakery/views/__init__.py
  31. +241 −0 bakery/views/base.py
  32. +327 −0 bakery/views/dates.py
  33. +82 −0 bakery/views/detail.py
  34. +44 −0 bakery/views/list.py
  35. BIN docs/_build/doctrees/buildablemodels.doctree
  36. BIN docs/_build/doctrees/buildableviews.doctree
  37. BIN docs/_build/doctrees/celeryintegration.doctree
  38. BIN docs/_build/doctrees/changelog.doctree
  39. BIN docs/_build/doctrees/credits.doctree
  40. BIN docs/_build/doctrees/environment.pickle
  41. BIN docs/_build/doctrees/gettingstarted.doctree
  42. BIN docs/_build/doctrees/index.doctree
  43. BIN docs/_build/doctrees/managementcommands.doctree
  44. BIN docs/_build/doctrees/settingsvariables.doctree
  45. +0 −4 docs/_build/html/.buildinfo
  46. +0 −155 docs/_build/html/_sources/buildablemodels.txt
  47. +0 −191 docs/_build/html/_sources/buildableviews.txt
  48. +0 −53 docs/_build/html/_sources/changelog.txt
  49. +0 −6 docs/_build/html/_sources/credits.txt
  50. +0 −121 docs/_build/html/_sources/gettingstarted.txt
  51. +0 −59 docs/_build/html/_sources/index.txt
  52. +0 −100 docs/_build/html/_sources/managementcommands.txt
  53. +0 −131 docs/_build/html/_sources/settingsvariables.txt
  54. BIN docs/_build/html/_static/ajax-loader.gif
  55. +0 −537 docs/_build/html/_static/basic.css
  56. BIN docs/_build/html/_static/comment-bright.png
  57. BIN docs/_build/html/_static/comment-close.png
  58. BIN docs/_build/html/_static/comment.png
  59. +0 −256 docs/_build/html/_static/default.css
  60. +0 −238 docs/_build/html/_static/doctools.js
  61. BIN docs/_build/html/_static/down-pressed.png
  62. BIN docs/_build/html/_static/down.png
  63. BIN docs/_build/html/_static/file.png
  64. +0 −2 docs/_build/html/_static/jquery.js
  65. BIN docs/_build/html/_static/minus.png
  66. BIN docs/_build/html/_static/plus.png
  67. +0 −62 docs/_build/html/_static/pygments.css
  68. +0 −622 docs/_build/html/_static/searchtools.js
  69. +0 −159 docs/_build/html/_static/sidebar.js
  70. +0 −31 docs/_build/html/_static/underscore.js
  71. BIN docs/_build/html/_static/up-pressed.png
  72. BIN docs/_build/html/_static/up.png
  73. +0 −808 docs/_build/html/_static/websupport.js
  74. +0 −287 docs/_build/html/buildablemodels.html
  75. +0 −348 docs/_build/html/buildableviews.html
  76. +0 −107 docs/_build/html/celeryintegration.html
  77. +0 −185 docs/_build/html/changelog.html
  78. +0 −102 docs/_build/html/credits.html
  79. +0 −515 docs/_build/html/genindex.html
  80. +0 −211 docs/_build/html/gettingstarted.html
  81. +0 −211 docs/_build/html/index.html
  82. +0 −220 docs/_build/html/managementcommands.html
  83. BIN docs/_build/html/objects.inv
  84. +0 −99 docs/_build/html/search.html
  85. +0 −1 docs/_build/html/searchindex.js
  86. +0 −263 docs/_build/html/settingsvariables.html
  87. BIN docs/_static/the-dream.pdf
  88. +76 −0 docs/buildablefeeds.md
  89. +47 −29 docs/{buildablemodels.rst → buildablemodels.md}
  90. +524 −0 docs/buildableviews.md
  91. +0 −191 docs/buildableviews.rst
  92. +0 −53 docs/changelog.rst
  93. +240 −0 docs/commonchallenges.md
  94. +27 −248 docs/conf.py
  95. +5 −0 docs/credits.md
  96. +0 −6 docs/credits.rst
  97. +137 −0 docs/gettingstarted.md
  98. +0 −121 docs/gettingstarted.rst
  99. +68 −0 docs/index.md
  100. +0 −59 docs/index.rst
  101. +0 −242 docs/make.bat
  102. +121 −0 docs/managementcommands.md
  103. +0 −100 docs/managementcommands.rst
  104. +227 −0 docs/settingsvariables.md
  105. +0 −131 docs/settingsvariables.rst
  106. 0 docs/_build/html/_sources/celeryintegration.txt → example/date_views/__init__.py
  107. +12 −0 example/date_views/admin.py
  108. +7 −0 example/date_views/apps.py
  109. +34 −0 example/date_views/fixtures/initial_data.json
  110. +24 −0 example/date_views/migrations/0001_initial.py
  111. +36 −0 example/date_views/migrations/0002_auto_20170828_1921.py
  112. +21 −0 example/date_views/migrations/0003_auto_20170828_1921.py
  113. 0 example/date_views/migrations/__init__.py
  114. +35 −0 example/date_views/models.py
  115. BIN example/date_views/static/dem-output.bin.gz
  116. 0 example/date_views/static/favicon.ico
  117. 0 example/date_views/static/robots.txt
  118. BIN example/date_views/static/zips.json.gz
  119. +5 −0 example/date_views/templates/date_views/article_archive.html
  120. +17 −0 example/date_views/templates/date_views/article_archive_day.html
  121. +14 −0 example/date_views/templates/date_views/article_archive_month.html
  122. +14 −0 example/date_views/templates/date_views/article_archive_year.html
  123. +1 −0 example/date_views/templates/date_views/dateline_detail.html
  124. +3 −0 example/date_views/tests.py
  125. +53 −0 example/date_views/views.py
  126. +9 −0 example/manage.py
  127. 0 example/media/empty.jpg
  128. 0 example/project/__init__.py
  129. +142 −0 example/project/settings.py
  130. +29 −0 example/project/urls.py
  131. +16 −0 example/project/wsgi.py
  132. +0 −146 quicktest.py
  133. +0 −30 requirements.txt
  134. +8 −0 setup.cfg
  135. +138 −71 setup.py
  136. +0 −12 tox.ini
20 changes: 0 additions & 20 deletions .coveragerc

This file was deleted.

11 changes: 11 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: "github-actions"
directory: "/.github/workflows"
schedule:
interval: "monthly"
121 changes: 121 additions & 0 deletions .github/workflows/continuous-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Continuous Deployment

on:
push:
workflow_dispatch:

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

jobs:
lint-python:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install flake8
run: pip install flake8

- name: Run flake8
run: flake8 bakery

test-python:
strategy:
matrix:
python: ['3.8', '3.9', '3.10', '3.11']
django: ['2.2', '3.2', '4.2', '5.0']
exclude:
- python: '3.8'
django: '5.0'
- python: '3.9'
django: '5.0'
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pipenv'

- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python

- name: Install Python dependencies
run: |
pipenv install --skip-lock --python=${{ matrix.python }}
pipenv install moto Django~=${{ matrix.django }} --skip-lock --python=${{ matrix.python }}
shell: bash

- name: Run
run: pipenv run python setup.py test
shell: bash
env:
AWS_ACCESS_KEY_ID: 'MOCK_ACCESS_KEY_ID'
AWS_SECRET_ACCESS_KEY: 'MOCK_SECRET_ACCESS_KEY'

test-build:
name: Build Python package
runs-on: ubuntu-latest
needs: [test-python]
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pipenv'

- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python

- name: Install Python dependencies
run: pipenv sync --dev
shell: bash

- name: Build release
run: |
pipenv run python setup.py sdist
pipenv run python setup.py bdist_wheel
ls -l dist
- name: Check release
run: pipenv run twine check dist/*

- name: Save artifact
uses: actions/upload-artifact@v4
with:
name: release-candidate
path: ./dist
if-no-files-found: error

tag-release:
name: Tagged PyPI release
runs-on: ubuntu-latest
needs: [test-build]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- id: fetch
name: Fetch artifact
uses: actions/download-artifact@v4
with:
name: release-candidate
path: ./dist

- name: Publish release
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
verify_metadata: false
69 changes: 69 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: "Build documentation"
on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
name: "Build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.9'

- id: install-pipenv
name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
shell: bash

- id: install-python-dependencies
name: Install Python dependencies
run: pipenv sync --dev
shell: bash

- id: build-sphinx-documentation
name: Build Sphinx documentation
run: pipenv run make html;
shell: bash
working-directory: docs

- name: Upload release candidate
uses: actions/upload-artifact@v4
with:
name: release-candidate
path: ./docs/

deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
steps:
- name: Download release candidate
uses: actions/download-artifact@v4
with:
name: release-candidate
path: ./docs/

- id: configure-aws
name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.PALEWIRE_DOCS_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PALEWIRE_DOCS_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- id: upload-to-s3
name: Upload documentation to Amazon S3
uses: datadesk/delivery-deploy-action@v1
with:
bucket: ${{ secrets.PALEWIRE_DOCS_AWS_BUCKET }}
base-path: django-bakery/
dir: ./docs/_build/html/
should-cache: false
use-accelerate-endpoint: false
public: true
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
docs/_build/
_dist/
.eggs
.env
__pycache__
*.egg-*
.tox/
@@ -8,3 +12,7 @@ dist/*
*.pyc
*.swp
.DS_Store
example/db.sqlite3
example/.build
example/.static
example/project/settings_local.py
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015 Los Angeles Times Data Desk

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
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.
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include README.md
recursive-include bakery/tests/media *
recursive-include bakery/tests/static *
recursive-include bakery/tests/templates *
24 changes: 24 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[packages]
six = "*"
celery = "*"
"boto3" = "*"
fs = "*"

[dev-packages]
django = "==4.2.*"
Sphinx = "*"
"flake8" = "*"
twine = "*"
moto = {extras = ["all", "ec2", "s3"], version = "*"}
setuptools-scm = "*"
sphinx-autobuild = "*"
myst-parser = "*"
sphinx-palewire-theme = "*"

[requires]
python_version = "3.9"
Loading