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: uwcirg/truenth-portal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v18.1.24
Choose a base ref
...
head repository: uwcirg/truenth-portal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: develop
Choose a head ref
Loading
Showing 769 changed files with 213,469 additions and 101,013 deletions.
54 changes: 54 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
*.egg-info
*.egg
*.eggs
*.env
*.sqlite
*.pyc
*~
*.swp
application.cfg
site.cfg
celerybeat.pid
celerybeat-schedule
env
lib
local
include
man
pip-selfcheck.json
log
portal/test_uploads
docker/portal.env
docker/docker-compose.dev.*.yaml

geckodriver.log
coverage.xml

.coverage
.idea
.project
.pydevproject
.pytest_cache
.settings
.tox

# compiled (binary) translation files
*.mo

# generated CSS files
portal/static/css/*.css

# nodeJS virtual environment and files
node_env/
portal/node_modules/
portal/package-lock.json

# auto-generated JS eslint config when linting JS files (via command eslint) at development
portal/static/js/.eslintrc.js
portal/eproms/static/js/.eslintrc.js

# auto-generated folders housing files from the frontend build, i.e. substudy tailored content
portal/static/templates
portal/static/bundle
portal/eproms_substudy_tailored_content/node_modules
portal/eproms_substudy_tailored_content/dist
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://editorconfig.org/

[*.py]
# isort settings
# https://github.com/timothycrosley/isort/wiki/isort-Settings
line_length=100
multi_line_output=3
include_trailing_comma=True
known_first_party=tests
force_sort_within_sections=True
combine_as_imports=True
35 changes: 35 additions & 0 deletions .github/workflows/build-deliver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# docker continuous delivery
# deliver docker images to configured repo with tags to match branches and git tags
---
name: Build & Deliver
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout git commit
uses: actions/checkout@master
with:
fetch-depth: 0

- name: Set version environment variable
run: echo "PORTAL_VERSION="$(python setup.py --version)"" >> $GITHUB_ENV

- name: Publish to GitHub Container Registry
# TODO: pin to hash
uses: elgohr/Publish-Docker-Github-Action@main
with:
name: ${{ github.repository }}
registry: ghcr.io
dockerfile: docker/Dockerfile
context: ./

# configured at repo settings/secrets
# GitHub Username
username: ${{ secrets.DOCKER_USERNAME }}

# GitHub personal access token
password: ${{ secrets.DOCKER_PASSWORD }}

# push tags/release by their git name
tag_names: true
37 changes: 33 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
*.egg-info
*.egg
*.eggs
*.env
*.sqlite
*.pyc
*~
*.swp
.coverage
application.cfg
site.cfg
celerybeat.pid
celerybeat-schedule
env
lib
@@ -18,9 +19,37 @@ pip-selfcheck.json
log
portal/test_uploads
docker/portal.env
docker/docker-compose.dev.*.yaml

geckodriver.log
coverage.xml

.coverage
.idea
.tox/
.settings/
.pydevproject
.project
.pydevproject
.pytest_cache
.settings
.tox

# compiled (binary) translation files
*.mo

# generated CSS files
portal/static/css/*.css

# nodeJS virtual environment and files
node_env/
portal/node_modules/
portal/static/js/dist/*.txt

# auto-generated JS eslint config when linting JS files (via command eslint) at development
portal/static/js/.eslintrc.js
portal/eproms/static/js/.eslintrc.js

# auto-generated folders housing files from the frontend build, i.e. substudy tailored content
portal/static/templates
portal/static/bundle
portal/eproms_substudy_tailored_content/node_modules
portal/eproms_substudy_tailored_content/dist
portal/eproms_substudy_tailored_content/src/__tests__/__snapshots__
90 changes: 90 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# GitLab CI/CD Pipeline Configuration file
# https://docs.gitlab.com/ee/ci/yaml/
---
# environment variables - also set in every service for a job
# NB: setting PGHOST will cause the postgres service to fail
variables:
SECRET_KEY: static secret key
SQLALCHEMY_DATABASE_TEST_URI: postgresql://postgres:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}
REDIS_URL: redis://redis:6379/0
POSTGRES_DB: portaldb
POSTGRES_PASSWORD: wplatrop
stages:
- test
- deploy

before_script:
- pip install tox


# test templates
.test_template: &test_definition
# track debian stable version of python3
image: python:3.9
script: tox
stage: test

.unit_test_template: &unit_test_definition
<<: *test_definition
services:
- postgres:13
- redis:latest


# test jobs
unit_tests:
variables:
TOXENV: py3
<<: *unit_test_definition

unit_tests_celery_background:
variables:
TOXENV: celery_background
<<: *unit_test_definition

docgen_test:
variables:
TOXENV: docs
<<: *test_definition

i18n_test_eproms:
variables:
TOXENV: translations
PERSISTENCE_DIR: eproms
<<: *unit_test_definition

i18n_test_tnusa:
variables:
TOXENV: translations
PERSISTENCE_DIR: gil
<<: *unit_test_definition


# deploy templates
.i18n_upload_template: &i18n_upload_definition
stage: deploy
# TODO re-enable/remove when future of Smartling integration more certain
# disable Smartling string uploads
when: manual
script:
- tox
# reuse tox virtual environment to also upload translations
- FLASK_APP=manage.py .tox/${TOXENV}/bin/python -m flask translation-upload
# only upload translations from develop branch
only:
refs: [develop]

# deploy jobs
i18n_upload_eproms:
<<: *unit_test_definition
<<: *i18n_upload_definition
variables:
TOXENV: translations
PERSISTENCE_DIR: eproms

i18n_upload_tnusa:
<<: *unit_test_definition
<<: *i18n_upload_definition
variables:
TOXENV: translations
PERSISTENCE_DIR: gil
1 change: 0 additions & 1 deletion .pep8speaks.yml
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
# https://pep8speaks.com/

pycodestyle:
# Default is 79 in PEP8
max-line-length: 100

scanner:
120 changes: 0 additions & 120 deletions .travis.yml

This file was deleted.

Loading