Browse Source

Reorganize repo

master
Gabriel Augendre 1 month ago
parent
commit
ba22d5a8cb
  1. 6
      Dockerfile
  2. 3
      README.md
  3. 42
      docker/nginx.conf
  4. 1
      docker/run.sh
  5. 5
      docker/runtests.sh
  6. 36
      pyproject.toml
  7. 0
      src/articles/__init__.py
  8. 0
      src/articles/admin.py
  9. 0
      src/articles/apps.py
  10. 0
      src/articles/context_processors.py
  11. 0
      src/articles/markdown.py
  12. 0
      src/articles/migrations/0001_initial.py
  13. 0
      src/articles/migrations/0002_article.py
  14. 0
      src/articles/migrations/0003_auto_20200814_1522.py
  15. 0
      src/articles/migrations/0004_article_views_count.py
  16. 0
      src/articles/migrations/0005_article_slug.py
  17. 0
      src/articles/migrations/0006_page.py
  18. 0
      src/articles/migrations/0007_auto_20200817_0941.py
  19. 0
      src/articles/migrations/0008_auto_20200817_1748.py
  20. 0
      src/articles/migrations/0009_comment.py
  21. 0
      src/articles/migrations/0010_auto_20200818_1825.py
  22. 0
      src/articles/migrations/0011_auto_20200818_1829.py
  23. 0
      src/articles/migrations/0012_auto_20200818_1845.py
  24. 0
      src/articles/migrations/0013_auto_20200818_1912.py
  25. 0
      src/articles/migrations/0014_auto_20200818_1952.py
  26. 0
      src/articles/migrations/0015_auto_20200818_2138.py
  27. 0
      src/articles/migrations/0016_comment_user_notified.py
  28. 0
      src/articles/migrations/0017_auto_20200820_1606.py
  29. 0
      src/articles/migrations/0018_auto_20200821_1232.py
  30. 0
      src/articles/migrations/0019_article_comments_allowed.py
  31. 0
      src/articles/migrations/0020_auto_20200903_2157.py
  32. 0
      src/articles/migrations/0021_auto_20201110_1623.py
  33. 0
      src/articles/migrations/0022_article_keywords.py
  34. 0
      src/articles/migrations/0023_article_has_code.py
  35. 0
      src/articles/migrations/0024_auto_20201224_1746.py
  36. 0
      src/articles/migrations/0025_article_custom_css.py
  37. 0
      src/articles/migrations/0026_article_draft_key.py
  38. 0
      src/articles/migrations/0027_auto_20210303_1633.py
  39. 0
      src/articles/migrations/0028_remove_article_keywords.py
  40. 0
      src/articles/migrations/0029_auto_20210303_1711.py
  41. 0
      src/articles/migrations/0030_tag_slug.py
  42. 0
      src/articles/migrations/0031_auto_20210306_1449.py
  43. 0
      src/articles/migrations/0032_auto_20210306_1449.py
  44. 0
      src/articles/migrations/__init__.py
  45. 0
      src/articles/models.py
  46. 0
      src/articles/static/admin_articles.css
  47. 0
      src/articles/static/admonitions.css
  48. 0
      src/articles/static/authenticated.css
  49. 0
      src/articles/static/copy-code.js
  50. 0
      src/articles/static/edit-keymap.js
  51. 0
      src/articles/static/icons/android-chrome-96x96.png
  52. 0
      src/articles/static/icons/apple-touch-icon.png
  53. 0
      src/articles/static/icons/browserconfig.xml
  54. 0
      src/articles/static/icons/favicon-16x16.png
  55. 0
      src/articles/static/icons/favicon-32x32.png
  56. 0
      src/articles/static/icons/favicon.ico
  57. 0
      src/articles/static/icons/mstile-150x150.png
  58. 0
      src/articles/static/icons/safari-pinned-tab.svg
  59. 0
      src/articles/static/icons/site.webmanifest
  60. 0
      src/articles/static/live-preview.js
  61. 0
      src/articles/static/public.css
  62. 0
      src/articles/static/vendor/codehilite.css
  63. 0
      src/articles/static/vendor/goatcounter.js
  64. 0
      src/articles/static/vendor/newcss.css
  65. 0
      src/articles/templates/admin/articles/article/submit_line.html
  66. 0
      src/articles/templates/articles/article_change_form.html
  67. 0
      src/articles/templates/articles/article_detail.html
  68. 0
      src/articles/templates/articles/article_list.html
  69. 0
      src/articles/templates/articles/article_search.html
  70. 0
      src/articles/templates/articles/base.html
  71. 0
      src/articles/templates/articles/snippets/admin_link.html
  72. 0
      src/articles/templates/articles/snippets/analytics.html
  73. 0
      src/articles/templates/articles/snippets/analytics_head.html
  74. 0
      src/articles/templates/articles/snippets/datetime.html
  75. 0
      src/articles/templates/articles/snippets/favicon.html
  76. 0
      src/articles/templates/articles/snippets/metadata.html
  77. 0
      src/articles/templates/articles/snippets/navigation.html
  78. 0
      src/articles/templates/articles/snippets/page_metadata.html
  79. 0
      src/articles/tests/__init__.py
  80. 0
      src/articles/tests/conftest.py
  81. 0
      src/articles/tests/test_admin.py
  82. 0
      src/articles/tests/test_api_views.py
  83. 0
      src/articles/tests/test_feed_views.py
  84. 0
      src/articles/tests/test_html_views.py
  85. 0
      src/articles/tests/test_migrations.py
  86. 0
      src/articles/tests/test_models.py
  87. 0
      src/articles/urls.py
  88. 0
      src/articles/utils.py
  89. 0
      src/articles/views/__init__.py
  90. 0
      src/articles/views/api.py
  91. 0
      src/articles/views/feeds.py
  92. 0
      src/articles/views/html.py
  93. 0
      src/attachments/__init__.py
  94. 0
      src/attachments/admin.py
  95. 0
      src/attachments/apps.py
  96. 0
      src/attachments/management/commands/reprocess_all_attachments.py
  97. 0
      src/attachments/migrations/0001_initial.py
  98. 0
      src/attachments/migrations/0002_auto_20200826_1814.py
  99. 0
      src/attachments/migrations/0003_auto_20200826_1843.py
  100. 0
      src/attachments/migrations/0004_auto_20200903_2116.py

6
Dockerfile

@ -43,11 +43,9 @@ COPY --from=venv /app/venv /app/venv/
ENV PATH /app/venv/bin:$PATH
WORKDIR /app
COPY manage.py LICENSE pyproject.toml ./
COPY LICENSE pyproject.toml ./
COPY docker ./docker/
COPY blog ./blog/
COPY attachments ./attachments/
COPY articles ./articles/
COPY src ./src/
COPY --from=git /version /app/.version
ENV SECRET_KEY "changeme"

3
README.md

@ -9,6 +9,5 @@ Hosted at https://gabnotes.org
## Development
```shell
inv test-cov
inv publish
inv deploy
inv build publish deploy
```

42
docker/nginx.conf

@ -1,42 +0,0 @@
server {
server_name localhost:8000;
client_max_body_size 10M;
gzip on;
gzip_types
application/javascript
application/x-javascript
application/json
application/rss+xml
application/xml
application/vnd.ms-fontobject
application/font-sfnt
image/svg+xml
image/x-icon
text/xml
text/javascript
text/css
text/plain;
gzip_min_length 256;
gzip_comp_level 5;
gzip_http_version 1.1;
gzip_vary on;
location /media/ {
alias /app/media/;
expires 30d;
}
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://django:8000;
proxy_redirect off;
}
listen [::]:80;
listen 80;
}

1
docker/run.sh

@ -1,5 +1,4 @@
#!/bin/bash
set -eux
python manage.py migrate --noinput
python manage.py collectstatic --noinput --clear
gunicorn blog.wsgi -b 0.0.0.0:8000 --log-file -

5
docker/runtests.sh

@ -1,5 +0,0 @@
#!/bin/sh
set -euxo pipefail
python -m pytest
pre-commit run --all-files
python manage.py makemigrations --check

36
pyproject.toml

@ -1,22 +1,3 @@
[tool.black]
target-version = ['py38']
[tool.isort]
profile = "black"
[tool.pytest.ini_options]
addopts = "--color=yes"
minversion = "6.0"
DJANGO_SETTINGS_MODULE = "blog.settings"
testpaths = [
"articles",
"blog",
"attachments",
]
env = [
"GOATCOUNTER_DOMAIN=gc.gabnotes.org"
]
[tool.poetry]
name = "blog"
version = "0.1.0"
@ -54,6 +35,23 @@ pytest-env = "^0.6.2"
poetry-deps-scanner = "^1.0.1"
invoke = "^1.6.0"
[tool.black]
target-version = ['py38']
[tool.isort]
profile = "black"
[tool.pytest.ini_options]
addopts = "--color=yes"
minversion = "6.0"
DJANGO_SETTINGS_MODULE = "blog.settings"
testpaths = [
"src",
]
env = [
"GOATCOUNTER_DOMAIN=gc.gabnotes.org"
]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

0
articles/__init__.py → src/articles/__init__.py

0
articles/admin.py → src/articles/admin.py

0
articles/apps.py → src/articles/apps.py

0
articles/context_processors.py → src/articles/context_processors.py

0
articles/markdown.py → src/articles/markdown.py

0
articles/migrations/0001_initial.py → src/articles/migrations/0001_initial.py

0
articles/migrations/0002_article.py → src/articles/migrations/0002_article.py

0
articles/migrations/0003_auto_20200814_1522.py → src/articles/migrations/0003_auto_20200814_1522.py

0
articles/migrations/0004_article_views_count.py → src/articles/migrations/0004_article_views_count.py

0
articles/migrations/0005_article_slug.py → src/articles/migrations/0005_article_slug.py

0
articles/migrations/0006_page.py → src/articles/migrations/0006_page.py

0
articles/migrations/0007_auto_20200817_0941.py → src/articles/migrations/0007_auto_20200817_0941.py

0
articles/migrations/0008_auto_20200817_1748.py → src/articles/migrations/0008_auto_20200817_1748.py

0
articles/migrations/0009_comment.py → src/articles/migrations/0009_comment.py

0
articles/migrations/0010_auto_20200818_1825.py → src/articles/migrations/0010_auto_20200818_1825.py

0
articles/migrations/0011_auto_20200818_1829.py → src/articles/migrations/0011_auto_20200818_1829.py

0
articles/migrations/0012_auto_20200818_1845.py → src/articles/migrations/0012_auto_20200818_1845.py

0
articles/migrations/0013_auto_20200818_1912.py → src/articles/migrations/0013_auto_20200818_1912.py

0
articles/migrations/0014_auto_20200818_1952.py → src/articles/migrations/0014_auto_20200818_1952.py

0
articles/migrations/0015_auto_20200818_2138.py → src/articles/migrations/0015_auto_20200818_2138.py

0
articles/migrations/0016_comment_user_notified.py → src/articles/migrations/0016_comment_user_notified.py

0
articles/migrations/0017_auto_20200820_1606.py → src/articles/migrations/0017_auto_20200820_1606.py

0
articles/migrations/0018_auto_20200821_1232.py → src/articles/migrations/0018_auto_20200821_1232.py

0
articles/migrations/0019_article_comments_allowed.py → src/articles/migrations/0019_article_comments_allowed.py

0
articles/migrations/0020_auto_20200903_2157.py → src/articles/migrations/0020_auto_20200903_2157.py

0
articles/migrations/0021_auto_20201110_1623.py → src/articles/migrations/0021_auto_20201110_1623.py

0
articles/migrations/0022_article_keywords.py → src/articles/migrations/0022_article_keywords.py

0
articles/migrations/0023_article_has_code.py → src/articles/migrations/0023_article_has_code.py

0
articles/migrations/0024_auto_20201224_1746.py → src/articles/migrations/0024_auto_20201224_1746.py

0
articles/migrations/0025_article_custom_css.py → src/articles/migrations/0025_article_custom_css.py

0
articles/migrations/0026_article_draft_key.py → src/articles/migrations/0026_article_draft_key.py

0
articles/migrations/0027_auto_20210303_1633.py → src/articles/migrations/0027_auto_20210303_1633.py

0
articles/migrations/0028_remove_article_keywords.py → src/articles/migrations/0028_remove_article_keywords.py

0
articles/migrations/0029_auto_20210303_1711.py → src/articles/migrations/0029_auto_20210303_1711.py

0
articles/migrations/0030_tag_slug.py → src/articles/migrations/0030_tag_slug.py

0
articles/migrations/0031_auto_20210306_1449.py → src/articles/migrations/0031_auto_20210306_1449.py

0
articles/migrations/0032_auto_20210306_1449.py → src/articles/migrations/0032_auto_20210306_1449.py

0
articles/migrations/__init__.py → src/articles/migrations/__init__.py

0
articles/models.py → src/articles/models.py

0
articles/static/admin_articles.css → src/articles/static/admin_articles.css

0
articles/static/admonitions.css → src/articles/static/admonitions.css

0
articles/static/authenticated.css → src/articles/static/authenticated.css

0
articles/static/copy-code.js → src/articles/static/copy-code.js

0
articles/static/edit-keymap.js → src/articles/static/edit-keymap.js

0
articles/static/icons/android-chrome-96x96.png → src/articles/static/icons/android-chrome-96x96.png

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

0
articles/static/icons/apple-touch-icon.png → src/articles/static/icons/apple-touch-icon.png

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

0
articles/static/icons/browserconfig.xml → src/articles/static/icons/browserconfig.xml

0
articles/static/icons/favicon-16x16.png → src/articles/static/icons/favicon-16x16.png

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

0
articles/static/icons/favicon-32x32.png → src/articles/static/icons/favicon-32x32.png

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

0
articles/static/icons/favicon.ico → src/articles/static/icons/favicon.ico

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

0
articles/static/icons/mstile-150x150.png → src/articles/static/icons/mstile-150x150.png

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

0
articles/static/icons/safari-pinned-tab.svg → src/articles/static/icons/safari-pinned-tab.svg

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

0
articles/static/icons/site.webmanifest → src/articles/static/icons/site.webmanifest

0
articles/static/live-preview.js → src/articles/static/live-preview.js

0
articles/static/public.css → src/articles/static/public.css

0
articles/static/vendor/codehilite.css → src/articles/static/vendor/codehilite.css

0
articles/static/vendor/goatcounter.js → src/articles/static/vendor/goatcounter.js

0
articles/static/vendor/newcss.css → src/articles/static/vendor/newcss.css

0
articles/templates/admin/articles/article/submit_line.html → src/articles/templates/admin/articles/article/submit_line.html

0
articles/templates/articles/article_change_form.html → src/articles/templates/articles/article_change_form.html

0
articles/templates/articles/article_detail.html → src/articles/templates/articles/article_detail.html

0
articles/templates/articles/article_list.html → src/articles/templates/articles/article_list.html

0
articles/templates/articles/article_search.html → src/articles/templates/articles/article_search.html

0
articles/templates/articles/base.html → src/articles/templates/articles/base.html

0
articles/templates/articles/snippets/admin_link.html → src/articles/templates/articles/snippets/admin_link.html

0
articles/templates/articles/snippets/analytics.html → src/articles/templates/articles/snippets/analytics.html

0
articles/templates/articles/snippets/analytics_head.html → src/articles/templates/articles/snippets/analytics_head.html

0
articles/templates/articles/snippets/datetime.html → src/articles/templates/articles/snippets/datetime.html

0
articles/templates/articles/snippets/favicon.html → src/articles/templates/articles/snippets/favicon.html

0
articles/templates/articles/snippets/metadata.html → src/articles/templates/articles/snippets/metadata.html

0
articles/templates/articles/snippets/navigation.html → src/articles/templates/articles/snippets/navigation.html

0
articles/templates/articles/snippets/page_metadata.html → src/articles/templates/articles/snippets/page_metadata.html

0
articles/tests/__init__.py → src/articles/tests/__init__.py

0
articles/tests/conftest.py → src/articles/tests/conftest.py

0
articles/tests/test_admin.py → src/articles/tests/test_admin.py

0
articles/tests/test_api_views.py → src/articles/tests/test_api_views.py

0
articles/tests/test_feed_views.py → src/articles/tests/test_feed_views.py

0
articles/tests/test_html_views.py → src/articles/tests/test_html_views.py

0
articles/tests/test_migrations.py → src/articles/tests/test_migrations.py

0
articles/tests/test_models.py → src/articles/tests/test_models.py

0
articles/urls.py → src/articles/urls.py

0
articles/utils.py → src/articles/utils.py

0
articles/views/__init__.py → src/articles/views/__init__.py

0
articles/views/api.py → src/articles/views/api.py

0
articles/views/feeds.py → src/articles/views/feeds.py

0
articles/views/html.py → src/articles/views/html.py

0
attachments/__init__.py → src/attachments/__init__.py

0
attachments/admin.py → src/attachments/admin.py

0
attachments/apps.py → src/attachments/apps.py

0
attachments/management/commands/reprocess_all_attachments.py → src/attachments/management/commands/reprocess_all_attachments.py

0
attachments/migrations/0001_initial.py → src/attachments/migrations/0001_initial.py

0
attachments/migrations/0002_auto_20200826_1814.py → src/attachments/migrations/0002_auto_20200826_1814.py

0
attachments/migrations/0003_auto_20200826_1843.py → src/attachments/migrations/0003_auto_20200826_1843.py

0
attachments/migrations/0004_auto_20200903_2116.py → src/attachments/migrations/0004_auto_20200903_2116.py

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save