Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge existing work into main branch #122

Merged
merged 352 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
352 commits
Select commit Hold shift + click to select a range
cfb9cd7
Create docker push action for main branch
May 7, 2024
a09491f
Merge pull request #43 from SADiLaR/docker_push_from_master
jrb-s2c-github May 7, 2024
9ab5035
added basic logging and updated environment variables
daniel-gray-tangent Apr 29, 2024
04fa341
Merge pull request #37 from SADiLaR/feature/logging
daniel-gray-tangent May 8, 2024
22bc5dc
Add dark mode css file, and add to admin template
May 8, 2024
d59527d
Merge pull request #44 from SADiLaR/feature/admin_dark_mode_styling
OnaMosimege May 8, 2024
a4f13ba
changed colour of breadcrumbs and side bar table active headers
May 9, 2024
986946c
Merge pull request #45 from SADiLaR/feature/breadcrumbs_colour
OnaMosimege May 10, 2024
08bd894
added pillow and updated image inputs models
daniel-gray-tangent May 8, 2024
ab60c89
Merge pull request #46 from SADiLaR/feature/downloading-logo
daniel-gray-tangent May 10, 2024
0758587
Changed some colours to assist with better lighthouse score
May 14, 2024
0bc5fed
Merge pull request #47 from SADiLaR/feature/lighthouse_contrast_fixes
OnaMosimege May 14, 2024
13817ea
TERM-213: Copy for front page
friedelwolff May 14, 2024
ec9e71b
change styling to accommodate different sized logos
May 14, 2024
8f4009b
Merge pull request #48 from SADiLaR/feature/front-page-copy
friedelwolff May 14, 2024
42d1706
Merge pull request #49 from SADiLaR/feature/institutions_logo
OnaMosimege May 14, 2024
54f29c2
Merge branch 'develop' into feature/search_page
OnaMosimege May 15, 2024
91b9cbf
Merge pull request #40 from SADiLaR/feature/search_page
OnaMosimege May 15, 2024
e6f1cf9
Allowing for deployment to prod
May 16, 2024
4009a59
Allowing for deployment to prod
May 17, 2024
d6b041f
Merge pull request #51 from SADiLaR/Changes_to_allow_deployment_to_pr…
jrb-s2c-github May 17, 2024
e861a4c
added search and filters to document files in admin
daniel-gray-tangent May 17, 2024
81a5b92
added magic to check mime_type
daniel-gray-tangent May 14, 2024
2769f47
Fix error pages views and add unit test
May 20, 2024
a97c232
Merge pull request #53 from SADiLaR/feature/error_pages
OnaMosimege May 20, 2024
1b91a90
Merge pull request #52 from SADiLaR/feature/doc-search-filter
daniel-gray-tangent May 20, 2024
82365dc
Merge pull request #50 from SADiLaR/feature/document_upload_check
daniel-gray-tangent May 20, 2024
5de494a
Add initial settings for internationalisation
May 21, 2024
0070b00
Merge pull request #54 from SADiLaR/feature/internationalisation_sett…
OnaMosimege May 22, 2024
6ffcb26
Add calculation for profile completion
May 23, 2024
d1a5ceb
saving PDF text into database
daniel-gray-tangent May 20, 2024
17ae377
Merge pull request #55 from SADiLaR/feature/profile_completion
OnaMosimege May 24, 2024
0bc6da1
Merge pull request #56 from SADiLaR/feature/pdf-package-install
daniel-gray-tangent May 24, 2024
bec2e1f
Limit TEMPLATES.DIRS to minimal needed
friedelwolff May 21, 2024
d6d6667
CI job to validate templates
friedelwolff May 27, 2024
ed0498f
Invoke the compose plugin with `docker compose`
friedelwolff May 27, 2024
ea2ebfc
Remove invocation of `clear` in every make target
friedelwolff May 27, 2024
c730089
Merge pull request #57 from SADiLaR/feature/validate_templates
friedelwolff May 27, 2024
0f26885
Merge pull request #59 from SADiLaR/feature/makefile-updates
friedelwolff May 27, 2024
fbf55c8
Add verbose names and pluralisation to models
May 27, 2024
2587039
Merge pull request #58 from SADiLaR/feature/models_internationalisation
OnaMosimege May 27, 2024
3e724ae
updated entrypoint with compilemessages
daniel-gray-tangent May 27, 2024
8c991dc
Merge pull request #61 from SADiLaR/feature/compile_messages_on_build
daniel-gray-tangent May 27, 2024
3de505e
add internationalisation for admin
May 28, 2024
c47e02e
Upated search page and views for testing
daniel-gray-tangent May 20, 2024
4baf265
Merge pull request #60 from SADiLaR/feature/document-search
daniel-gray-tangent May 28, 2024
2a010de
Merge pull request #62 from SADiLaR/feature/admin-internationalisation
OnaMosimege May 28, 2024
c3befe7
Add language toggle, and styling:
May 31, 2024
45f815a
Merge pull request #63 from SADiLaR/feature/language-toggle
OnaMosimege Jun 5, 2024
b88f5d6
add translations wrapping to templates
Jun 6, 2024
78432b2
Merge pull request #65 from SADiLaR/feature/translate_templates
OnaMosimege Jun 6, 2024
a59bc0d
add plural blocktrans in one line
Jun 6, 2024
bfe4e4d
Merge pull request #66 from SADiLaR/feature/translate_templates
OnaMosimege Jun 6, 2024
1f4eb38
remove on change event for language toggle
Jun 6, 2024
29a4a5d
Merge pull request #67 from SADiLaR/feature/remove-on-change-lang-switch
OnaMosimege Jun 6, 2024
caeda56
added mass pdf upload command for testing
daniel-gray-tangent Jun 3, 2024
6248706
Merge pull request #68 from SADiLaR/feature/pdf-mass-upload-test
daniel-gray-tangent Jun 7, 2024
589ca50
added debug tool
daniel-gray-tangent Jun 3, 2024
7c656ba
Merge pull request #64 from SADiLaR/feature/debug-tool
daniel-gray-tangent Jun 7, 2024
b072bff
Handle unexpected pypdf errors better
friedelwolff Jun 7, 2024
89c6066
Merge pull request #69 from SADiLaR/bug/handle-pypdf-errors
friedelwolff Jun 7, 2024
0af24e7
Change nav pill active colour
Jun 10, 2024
b4845c7
Merge pull request #70 from SADiLaR/feature/accessibility-fixes
OnaMosimege Jun 10, 2024
de0746e
fixed issue with uploading data and saving
daniel-gray-tangent Jun 10, 2024
be4cc1c
Merge pull request #71 from SADiLaR/feature/mass-upload-fix
daniel-gray-tangent Jun 10, 2024
9c60c3c
updated admin with GetTextFromPdf service
daniel-gray-tangent Jun 7, 2024
8f639f3
Merge pull request #72 from SADiLaR/feature/add-admin-service
daniel-gray-tangent Jun 10, 2024
e50c147
added description input to documentfile and project
daniel-gray-tangent Jun 11, 2024
9063aa3
fixed projects institution validation
daniel-gray-tangent Jun 11, 2024
6a2a1fc
Merge pull request #73 from SADiLaR/feature/add-description-fields
daniel-gray-tangent Jun 11, 2024
9a27eb0
updated settings file to use postgress
daniel-gray-tangent Jun 13, 2024
90726bf
added postgres to pipeline tests
daniel-gray-tangent Jun 13, 2024
f73f983
updated tests
daniel-gray-tangent Jun 13, 2024
833ca2b
Merge pull request #75 from SADiLaR/feature/tests-change-postges
daniel-gray-tangent Jun 13, 2024
924eda3
added vector search
daniel-gray-tangent Jun 10, 2024
1e5c910
Merge pull request #78 from SADiLaR/feature/search-vector
daniel-gray-tangent Jun 18, 2024
e018c41
added Translation Messages Check in CI pipeline
daniel-gray-tangent Jun 18, 2024
fc3e9e5
Merge pull request #80 from SADiLaR/feature/update-ci-message-check
daniel-gray-tangent Jun 18, 2024
09545c9
Add projects list page:
Jun 11, 2024
b47e31a
Merge pull request #77 from SADiLaR/feature/projects-page
OnaMosimege Jun 19, 2024
ba1b6cc
Change document files to documents, and document type to document cat…
Jun 18, 2024
f12896f
Merge pull request #79 from SADiLaR/feature/user-experience
OnaMosimege Jun 19, 2024
0a3f1df
Fix data errors in fixtures
friedelwolff Jun 21, 2024
9f5f7bf
Merge pull request #81 from SADiLaR/feature/fix-fixtures
friedelwolff Jun 21, 2024
b96ccf7
Improve Dockerfiles
friedelwolff Jun 21, 2024
4729e27
+gunicorn configuration
friedelwolff Jun 21, 2024
1037176
Enable persistent DB connections
friedelwolff Jun 21, 2024
cc64f9e
Upgrade requirements
friedelwolff Jun 21, 2024
599d705
Merge pull request #82 from SADiLaR/feature/production-improvements
friedelwolff Jun 24, 2024
abad3c7
Add individial project page, with styling and view
Jun 24, 2024
eb60543
Merge pull request #83 from SADiLaR/feature/individual-project-page
OnaMosimege Jun 26, 2024
bd146d4
Add individual institution page view, template, and styling
Jun 28, 2024
b9830d5
Merge pull request #85 from SADiLaR/feature/institution-detail-page
OnaMosimege Jun 28, 2024
9c54918
add migrations
Jul 2, 2024
d77a34b
Merge pull request #86 from SADiLaR/feature/user-experience
OnaMosimege Jul 3, 2024
de85130
Adding user management
daniel-gray-tangent Jul 1, 2024
8973156
Merge pull request #88 from SADiLaR/feature/user-management
daniel-gray-tangent Jul 4, 2024
4024d26
Add changes to styling and template according to new spec
Jun 26, 2024
fd85d90
Merge pull request #87 from SADiLaR/feature/projects-page
OnaMosimege Jul 5, 2024
e9a0bc2
Add user manangement views, templates, and styling
Jul 10, 2024
ae4fc6c
Merge pull request #89 from SADiLaR/feature/user-management-styling
OnaMosimege Jul 10, 2024
bf9258b
added Django filter plugin and updated testing pipeline
daniel-gray-tangent Jul 11, 2024
5f700a7
added filters updated search
daniel-gray-tangent Jul 11, 2024
b248001
Merge pull request #90 from SADiLaR/feature/update-search-filters
daniel-gray-tangent Jul 12, 2024
5126c40
Add document detail view, url, and template
Jul 18, 2024
c21b077
Merge pull request #91 from SADiLaR/feature/individual-document-page
OnaMosimege Jul 18, 2024
3bcbefa
Sort lists on institution page
friedelwolff Jul 22, 2024
24632d0
Enable search box on front page
friedelwolff Jul 22, 2024
963eb3f
Show project description on project detail
friedelwolff Jul 22, 2024
b628d05
Small temporary UI refresh for search page
friedelwolff Jul 22, 2024
52fa1ca
Merge pull request #94 from SADiLaR/feature/ui-tweaks-for-demo
friedelwolff Jul 22, 2024
48a1f7d
Add template, view, and responsive styling to document list page
Jul 22, 2024
d35ab0b
Merge pull request #93 from SADiLaR/feature/documents-list-page
OnaMosimege Jul 23, 2024
126da74
remove language and subjects links from project_detail and document_d…
Jul 23, 2024
3217164
Merge pull request #95 from SADiLaR/feature/remove-links-to-subjects-…
OnaMosimege Jul 23, 2024
6e39882
Simplify handling of url parameters with pagination
friedelwolff Jul 23, 2024
0c4723f
remove download button if there is no document uploaded
Jul 23, 2024
9f1b97b
Merge pull request #96 from SADiLaR/feature/documents-list-page
friedelwolff Jul 23, 2024
ccf81cd
Merge pull request #97 from SADiLaR/feature/fix-download-file-error
OnaMosimege Jul 23, 2024
5d3cb14
updating environment variables
daniel-gray-tangent Jul 23, 2024
d38faed
Merge pull request #100 from SADiLaR/feature/remove-key
daniel-gray-tangent Jul 24, 2024
c7f90bf
add language page template, view, and styling
Jul 23, 2024
cb1a749
Merge pull request #99 from SADiLaR/feature/language-detail-page
OnaMosimege Jul 24, 2024
13077b7
added projects to search filters
daniel-gray-tangent Jul 16, 2024
35317ea
Combine search queries with union
friedelwolff Jul 23, 2024
cd28611
First stab at search weighting and normalization
friedelwolff Jul 23, 2024
c2fff85
Small cleanups
friedelwolff Jul 24, 2024
8d97998
Store weights in generated documentfile.search_vector
friedelwolff Jul 24, 2024
5bdc4ee
Search performance improvements
friedelwolff Jul 25, 2024
3d9c74a
+logo_url in search results
daniel-gray-tangent Jul 25, 2024
92390b0
Update search tests for combined results
daniel-gray-tangent Jul 25, 2024
b5ae650
Merge pull request #101 from SADiLaR/feature/search-weight2
friedelwolff Jul 25, 2024
fc91495
Add view, template, unit test, and styling for subjects page
Jul 25, 2024
607aa16
Merge pull request #102 from SADiLaR/feature/subjects-page
OnaMosimege Jul 25, 2024
27d554f
Add about and legal notices pages
Jul 26, 2024
54e282e
Merge pull request #103 from SADiLaR/feature/static-pages
OnaMosimege Jul 26, 2024
7886896
Add search page template and styling
Jul 29, 2024
7b7a599
Merge pull request #104 from SADiLaR/feature/search-page-styling
OnaMosimege Jul 31, 2024
5014e2d
Allow separate toggling of DEBUG_TOOLBAR
friedelwolff Aug 1, 2024
99148b2
Rework DEBUG_TOOLBAR_CONFIG
friedelwolff Aug 1, 2024
a4e27dd
Insert DebugToolbarMiddleware at correct place
friedelwolff Aug 1, 2024
18b8fca
Insert LocaleMiddleware at correct place
friedelwolff Aug 1, 2024
ea17e4b
Rename LOGGING_FOLDER_DEFAULT -> LOGGING_DIR
friedelwolff Aug 1, 2024
3a16eab
Merge pull request #107 from SADiLaR/settings-improvement
friedelwolff Aug 1, 2024
f7ba460
Remove document_type from search
friedelwolff Aug 2, 2024
6c0d467
Rework filtering and searching for projects
friedelwolff Aug 2, 2024
0d52ebd
Merge pull request #108 from SADiLaR/bug/search-bugs
friedelwolff Aug 2, 2024
6f33ecb
Rework HTML headers
friedelwolff Jul 29, 2024
6b2b08c
+templatetag for a Bootstrap icon
friedelwolff Jul 29, 2024
ae4246f
Factor out pagination
friedelwolff Jul 29, 2024
ea4de0a
Rework header
friedelwolff Jul 29, 2024
36e153b
Rework footer
friedelwolff Jul 29, 2024
ba93407
Factor out filters
friedelwolff Jul 29, 2024
da2efd0
Drop profile completion
friedelwolff Jul 29, 2024
ae806b7
Rework static content
friedelwolff Jul 29, 2024
06b1195
Rework home page
friedelwolff Jul 29, 2024
124e331
Reimplement styling with more Bootsrap
friedelwolff Jul 29, 2024
66f5cd3
Fix issues with aspect ratio of logos
friedelwolff Jul 29, 2024
657ff70
Rework error pages
friedelwolff Jul 29, 2024
de06f01
Use project specific names for common icons
friedelwolff Jul 29, 2024
efa197d
Summarise document count on institutions list
friedelwolff Jul 29, 2024
77d62da
+ icons for project and document at /institutions/
friedelwolff Jul 29, 2024
7277d7a
Swap Bootstrap bundle for smaller version
friedelwolff Jul 29, 2024
a47080d
Reduce "no info available" messages
friedelwolff Jul 31, 2024
375d9b5
Make icons and their spacing more consistent
friedelwolff Jul 31, 2024
895b8ce
Implement more page titles
friedelwolff Jul 31, 2024
95dd02a
Reduce size of h3
friedelwolff Jul 31, 2024
c592a3d
Cosmetic changes that reduce HTML output
friedelwolff Jul 31, 2024
656a6f3
Use repr(institution) in filter dropdown
friedelwolff Jul 31, 2024
182460b
Pass view name to template for search page
friedelwolff Jul 31, 2024
f7e6c2c
Rework search page
friedelwolff Aug 3, 2024
b694f27
Layout refinement of pagination
friedelwolff Aug 3, 2024
eb4024c
Specify logo dimentions to avoid layout shift
friedelwolff Aug 4, 2024
7eb283e
Implement `limit-text-width` with rem instead of px
friedelwolff Aug 4, 2024
0a3d4aa
Simplify footer markup
friedelwolff Aug 5, 2024
11489fd
+Subresource integrity for bootstrap-icons
friedelwolff Aug 5, 2024
3b3064a
Maintain inline CSS in separate file
friedelwolff Aug 5, 2024
d8a3862
+HTMX
friedelwolff Aug 5, 2024
305cb4d
Factor out navbar items
friedelwolff Aug 5, 2024
db7e9f5
A partial base template for htmx
friedelwolff Aug 5, 2024
99c0480
Reload a part of the navbar out of band
friedelwolff Aug 5, 2024
3c3ccf0
HTMX error handling
friedelwolff Aug 6, 2024
64cda4b
Rework HTMX error handling
friedelwolff Aug 6, 2024
c369754
Avoid unnecessary spaces in HTML output
friedelwolff Aug 7, 2024
6b40e91
Improve reliability of back-forward after HTMX requests
friedelwolff Aug 7, 2024
45de0fd
Further reduce payloads with htmx on search page
friedelwolff Aug 7, 2024
c3df0d4
Only render result fields if they exist
friedelwolff Aug 7, 2024
0cc101c
Omit alt tags for images with adjacent text
friedelwolff Aug 7, 2024
bfe89d9
Avoid visual shift during rendering
friedelwolff Aug 7, 2024
9d67eea
Hide Django template comments with real comments
friedelwolff Aug 7, 2024
31f474a
Implement hx-indicator
friedelwolff Aug 7, 2024
806ec1f
Mark icon with aria-hidden="true"
friedelwolff Aug 7, 2024
ef9d604
Restructure filtering+searching
friedelwolff Aug 7, 2024
9ff196d
Add institutions to search results
friedelwolff Aug 7, 2024
abefff5
Boost objects during full-text search based on type
friedelwolff Aug 7, 2024
d591f2d
Output a diff in the pre-commit hook
friedelwolff Aug 7, 2024
78114a7
Small UI improvements
friedelwolff Aug 8, 2024
3a266a2
Make loader more accessible
friedelwolff Aug 10, 2024
ece57ac
Avoid unnecessary spaces in HTML output
friedelwolff Aug 10, 2024
d44efa8
Label <main> with aria-labelledby
friedelwolff Aug 10, 2024
fcce57a
Focus new content after htmx load
friedelwolff Aug 10, 2024
bf0eefa
Rework accessibility of search filters
friedelwolff Aug 10, 2024
99afdc9
Some cleanups of tests
friedelwolff Aug 10, 2024
77cdf9f
Basic tests of documents
friedelwolff Aug 10, 2024
0656277
Various small accessibility improvements
friedelwolff Aug 10, 2024
37004f8
Improve accessibility of pagination
friedelwolff Aug 10, 2024
f19c00c
Rework page error handling
friedelwolff Aug 13, 2024
8f678c9
Rework overflow and text breaking behaviour
friedelwolff Aug 14, 2024
065b6bd
Refine icon style
friedelwolff Aug 14, 2024
5347baf
Register "download" as project icon
friedelwolff Aug 14, 2024
954571c
+favicon
friedelwolff Aug 14, 2024
35495e7
Code simplification
friedelwolff Aug 14, 2024
e6c6865
Hide "No projects/documents" from screen readers
friedelwolff Aug 14, 2024
3385f8a
Minor template cleanup
friedelwolff Aug 14, 2024
5b503f3
Don't skip heading levels
friedelwolff Aug 14, 2024
1f1dfa0
Merge pull request #109 from SADiLaR/ui-rework2
friedelwolff Aug 14, 2024
8327d21
Fix broken filtering on documents page
friedelwolff Aug 15, 2024
bf40604
Merge pull request #110 from SADiLaR/bug/filter-documents-by-language
friedelwolff Aug 15, 2024
5c44da4
Upgrade and pin dependencies
friedelwolff Aug 15, 2024
2148b4d
Merge pull request #111 from SADiLaR/upgrades
friedelwolff Aug 16, 2024
842f71b
admin: Size and position branding logo like on front-end
friedelwolff Aug 16, 2024
8dced80
admin: +favicon
friedelwolff Aug 16, 2024
3c4d3a0
admin: Rework comments about Django templates
friedelwolff Aug 16, 2024
7f7ec5e
admin: i18n
friedelwolff Aug 16, 2024
0118920
Ensure HTML pages vary on HX-Request
friedelwolff Aug 16, 2024
14dcec0
Merge pull request #113 from SADiLaR/admin-refinements
friedelwolff Aug 17, 2024
401f92d
Merge pull request #112 from SADiLaR/bug/browser-restore
friedelwolff Aug 17, 2024
d951b01
Rework text extraction
friedelwolff Aug 17, 2024
1128177
Rename: dev_pdf_mass_upload -> import_documents
friedelwolff Aug 17, 2024
b0b2f02
Merge pull request #114 from SADiLaR/rework-text-extraction
friedelwolff Aug 17, 2024
f483aac
Rename DocumentFile -> Document
friedelwolff Aug 17, 2024
56a503e
Merge pull request #115 from SADiLaR/rename-documentfile2document
friedelwolff Aug 19, 2024
a74a486
Obtain more email settings from environment
friedelwolff Aug 21, 2024
e36730e
Merge pull request #116 from SADiLaR/more-mail-settings
friedelwolff Aug 21, 2024
dc5231f
Format ADMINS setting as Django expects
friedelwolff Aug 21, 2024
524701e
Merge pull request #117 from SADiLaR/more-mail-settings
friedelwolff Aug 21, 2024
31d187d
Infrastructure for bootstrap forms
friedelwolff Aug 29, 2024
d604d98
Rework accounts
friedelwolff Aug 29, 2024
14d213f
Expose login, logout, admin in footer
friedelwolff Aug 29, 2024
e889075
Merge pull request #118 from SADiLaR/rework-accounts
friedelwolff Aug 29, 2024
afb9987
Mark up telephone number as a tag
friedelwolff Sep 12, 2024
8f3a0fe
Remove unnecessary final slash in self-closing tags
friedelwolff Sep 12, 2024
c484fdd
Fix invalid <form> in <p>
friedelwolff Sep 12, 2024
e3db6a2
Merge pull request #119 from SADiLaR/html-fixes
friedelwolff Sep 12, 2024
502c50d
Rename project to LwimiLinks
friedelwolff Sep 13, 2024
b8b8b8c
+LwimiLinks logo
friedelwolff Sep 13, 2024
7846947
Rework front page
friedelwolff Sep 13, 2024
e7a08fe
Merge pull request #120 from SADiLaR/lwimilinks-branding
friedelwolff Sep 13, 2024
7333ee4
+LwimiLinks logo (x2)
friedelwolff Sep 16, 2024
173f335
Merge pull request #121 from SADiLaR/lwimilinks-branding
friedelwolff Sep 16, 2024
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
22 changes: 22 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
SECRET_KEY=''
DEBUG=True
DB_HOST=db
DB_PORT=5432
DB_NAME=term_db
DB_USER=sadilar
DB_PASSWORD=sadilar
LOGGING_FILE=debug.log
LOGGING_HANDLERS_LEVEL=INFO
LOGGING_LOGGERS_LEVEL=INFO
LOGGING_LOGGERS_DJANGO_LEVEL=INFO
TESTING_DIR=/app/general/tests/files/
EMAIL_HOST=''
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=''
EMAIL_HOST_PASSWORD=''
DEFAULT_FROM_EMAIL=''
SERVER_EMAIL=''
EMAIL_SUBJECT_PREFIX=''
EMAIL_BACKEND_CONSOLE='True/False'
SECRET_KEY=''
12 changes: 12 additions & 0 deletions .env.testing
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
SECRET_KEY='django-insecure-w!h85bp^$$e8gm%c23r!0%9i7yzd=6w$$s&ic+6!%306&kj8@k*5'
DEBUG=True
DB_HOST=localhost
DB_PORT=5432
DB_NAME=term_db
DB_USER=sadilar
DB_PASSWORD=sadilar
LOGGING_FILE=debug.log
LOGGING_HANDLERS_LEVEL=INFO
LOGGING_LOGGERS_LEVEL=INFO
LOGGING_LOGGERS_DJANGO_LEVEL=INFO
TESTING_DIR=/home/runner/work/term_platform/term_platform/app/general/tests/files/
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://docs.docker.com/build/ci/github-actions/push-multi-registries/
name: docker_push
name: docker_push_deploy_test

on:
workflow_dispatch:
Expand All @@ -8,7 +8,7 @@ on:
- "develop"

jobs:
docker:
deploy_test:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -34,4 +34,4 @@ jobs:
with:
url: https://api.bitbucket.org/2.0/repositories/team_sadilar/ansible/pipelines/
headers: '{"Authorization": "Bearer ${{ secrets.BITBUCKET_PIPELINE_SECRET }}"}'
body: '{"target": {"ref_type": "branch", "type": "pipeline_ref_target", "ref_name": "master", "selector": {"type": "custom", "pattern": "deploy_term_platform" } }}'
body: '{"target": {"ref_type": "branch", "type": "pipeline_ref_target", "ref_name": "master", "selector": {"type": "custom", "pattern": "deploy_term_platform_test" } }}'
30 changes: 30 additions & 0 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# https://docs.docker.com/build/ci/github-actions/push-multi-registries/
name: docker_push_prod

on:
push:
tags:
- v**

jobs:
docker_push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to SADiLaR Container Registry
uses: docker/login-action@v3
with:
registry: docker.sadilar.org
username: ${{ vars.SADILAR_DOCKER_REPOSITORY_USER }}
password: ${{ secrets.SADILAR_DOCKER_REPOSITORY_SECRET }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
push: true
tags: |
docker.sadilar.org/term_platform:prod
57 changes: 57 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Testing Django
on: [ pull_request, push ] # activates the workflow when there is a push or pull request in the repo
jobs:
test_project:
runs-on: ubuntu-latest # operating system your code will run on
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: sadilar
POSTGRES_PASSWORD: sadilar
POSTGRES_DB: test_db_1
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-test.txt
sudo apt-get install -y gettext
- name: Run linting tools
run: |
cd app/
ruff format .
- name: Create logging folder
run: |
sudo mkdir -p /logging
sudo chown runner:runner /logging
- name: Compile Translation Messages
run: |
cp .env.testing app/.env
cd app/
python manage.py makemessages --all
python manage.py compilemessages
- name: Run validate_templates
run: |
export DJANGO_TEST_PROCESSES=1
cp .env.testing app/.env
cd app/
mkdir -p static_files
python manage.py validate_templates --ignore-app django_filters
- name: Run Tests
run: |
cp .env.testing app/.env
cd app/
mkdir -p static_files
python manage.py test
env:
DJANGO_SETTINGS_MODULE: app.settings
DATABASE_URL: postgres://sadilar:sadilar@localhost:5432/test_db
- name: Manager Check
run: |
cd app/
python manage.py check
73 changes: 32 additions & 41 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,50 +1,41 @@
# These are some examples of commonly ignored file patterns.
# You should customize this list as applicable to your project.
# Learn more about .gitignore:
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore

# Node artifact files
node_modules/
dist/

# Compiled Java class files
*.class

# Compiled Python bytecode
*.py[cod]

# Log files
*.log

# Package files
*.jar

# Maven
target/
dist/

# JetBrains IDE
.idea/

# Unit test reports
TEST*.xml

# Generated by MacOS
.DS_Store

# Generated by Windows
Thumbs.db

# Applications
*.app
*.exe
*.war

# Large media files
*.mp4
*.tiff
*.avi
*.flv
*.mov
*.wmv

# Django template
*.pot
*.mo
*.pyc
__pycache__/
local_settings.py
db.sqlite3
db.sqlite3-journal
media

# General Files
.DS_Store
.AppleDouble
.LSOverride

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

#folders
app/static_files/
/app/documents/
app/media/
/app/logging/
/logging/
/pdf_uploads/
/pdf_upload_completed/
27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
repos:
# Linting and formatting for Python.
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.2.2
hooks:
# Run the linter.
- id: ruff
args: [ --diff ]
# Run the formatter.
- id: ruff-format
args: [ --diff ]

# Automatically sort python imports
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: [ --profile, black ]

# Lint: YAML
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args: ["-d {extends: relaxed, rules: {line-length: disable}}", "-s"]
files: \.(yaml|yml)$
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* @friedelwolff
.github @friedelwolff @jrb-s2c-github
30 changes: 30 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# A minimalist image usable as a base for a production deployment.
FROM python:3.12

# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

SHELL ["/bin/bash", "-c"]

# Set work directory
WORKDIR /app

# Install dependencies
COPY requirements.txt /app/

RUN <<EOF
set -exo pipefail
apt-get update
apt-get -y upgrade
apt-get install -y --no-install-recommends libmagic1 gettext
pip install --upgrade pip
pip install -r requirements.txt
EOF

# Copy project
COPY ./app /app/
COPY ./entrypoint.sh /

# Run the application
ENTRYPOINT ["bash", "/entrypoint.sh"]
30 changes: 30 additions & 0 deletions Dockerfile-dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# A development image with extras for development.
# Don't use in production.
FROM python:3.12

# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

SHELL ["/bin/bash", "-c"]

# Set work directory
WORKDIR /app

# Install dependencies
COPY requirements.txt requirements-dev.txt /app/

RUN <<EOF
set -exo pipefail
apt-get update
apt-get -y upgrade
apt-get install -y --no-install-recommends libmagic1 gettext graphviz graphviz-dev
pip install --upgrade pip
pip install -r requirements-dev.txt
EOF

# Copy project
COPY ./app /app/

# Run the application
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
Loading
Loading