Skip to content

Commit 56add41

Browse files
committed
Merge branch 'development' of https://github.com/cmu-delphi/signal_documentation into OKRS24-115-Add-new-fields-to-the-signals-app
2 parents 164d1f9 + 4c2b552 commit 56add41

33 files changed

+52741
-438
lines changed

.github/workflows/build-and-deploy.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ jobs:
66
runs-on: ubuntu-latest
77
# CI/CD will run on these branches
88
if: >
9-
github.ref == 'refs/heads/master' ||
9+
github.ref == 'refs/heads/main' ||
10+
github.ref == 'refs/heads/staging' ||
1011
github.ref == 'refs/heads/development'
1112
strategy:
1213
matrix:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/.vscode/
44
/src/media/
55
/src/staticfiles/
6+
*log
67
*.mo
78
*.pyc
89
htmlcov/

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:latest
1+
FROM ubuntu:22.04
22

33
ENV PYTHONDONTWRITEBYTECODE=1
44
ENV PYTHONUNBUFFERED=1
@@ -21,4 +21,4 @@ COPY /src .
2121
COPY /gunicorn/gunicorn.py .
2222
ENV PATH="/home/python/.local/bin:${PATH}"
2323
EXPOSE 8000
24-
CMD ["gunicorn", "signal_documentation.wsgi:application", "-c", "gunicorn.py"]
24+
CMD ["gunicorn", "signal_documentation.wsgi:application", "-c", "gunicorn.py"]

Pipfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ crispy-bootstrap5 = "*"
3838
django-celery-beat = "*"
3939
celery = {version = "*", extras = ["redis"]}
4040
flower = "*"
41-
django-htmx = "*"
4241
gunicorn = "*"
4342
types-requests = "*"
4443

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,15 @@ Each environment is essentially a bunch of different services all governed by `d
200200

201201
### Basic workflow
202202

203-
- A PR merged to either `development` or `master` will trigger CI to build container images that are then tagged (based on the branch name and ":latest" respectively) and stored in our GitHub Packages container image repository.
203+
- A PR merged to either `development`, `staging`, or `main` will trigger CI to build container images that are then tagged with the branch name (or ":latest", in the cast of `main`), and stored in our GitHub Packages container image repository.
204204
- CI triggers a webhook that tells the host systems to pull and run new container images and restart any services that have been updated.
205205

206+
As a developer, your path to getting changes into production should be something like this:
207+
208+
- Source your working branch from `development`, do work, PR and merge when complete
209+
- PR and merge to `staging` in order to get your changes deployed to https://staging.delphi.cmu.edu/signals for review
210+
- PR and merge to `main` to go to production
211+
206212
**IMPORTANT!** - The CI/CD process uses Docker Compose to build the specific container images that will be used in external environments. Success of the the build-and-deploy workflow is dependent on constructed services in `docker-compose.yaml`. If considering making changes there, please have a PR reviewed by devops folks :pray: :pray: :pray:
207213

208214
### Control of the deployed environment

docker-compose.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ services:
3636
python3 /usr/src/signal_documentation/src/manage.py loaddata ./fixtures/signal_types.json &&
3737
python3 /usr/src/signal_documentation/src/manage.py loaddata ./fixtures/signal_categories.json &&
3838
python3 /usr/src/signal_documentation/src/manage.py loaddata ./fixtures/demographic_scopes.json &&
39+
python3 /usr/src/signal_documentation/src/manage.py loaddata ./fixtures/county.json &&
40+
python3 /usr/src/signal_documentation/src/manage.py loaddata ./fixtures/hhs.json &&
41+
python3 /usr/src/signal_documentation/src/manage.py loaddata ./fixtures/hrr.json &&
42+
python3 /usr/src/signal_documentation/src/manage.py loaddata ./fixtures/msa.json &&
43+
python3 /usr/src/signal_documentation/src/manage.py loaddata ./fixtures/state.json &&
3944
python3 /usr/src/signal_documentation/src/manage.py runserver 0.0.0.0:8000"
4045
volumes:
4146
- .:/usr/src/signal_documentation

src/assets/css/custom.css

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@
6767
padding: 0;
6868
}
6969

70+
.pt-05 {
71+
padding-top: 0.5rem;
72+
}
73+
7074
.border-left {
7175
border-left: 1px solid #e4e4e4;
7276
}
@@ -86,4 +90,47 @@
8690

8791
.padding-top-1rem {
8892
padding-top: 1rem;
89-
}
93+
}
94+
95+
96+
.select2 {
97+
display: block;
98+
width: 100%!important;
99+
padding: 0.375rem 2.25rem 0.375rem 0.75rem;
100+
-moz-padding-start: calc(0.75rem - 3px);
101+
font-size: 1rem;
102+
font-weight: 400;
103+
line-height: 1.5;
104+
color: #212529;
105+
background-color: #fff;
106+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
107+
background-repeat: no-repeat;
108+
background-position: right 0.75rem center;
109+
background-size: 16px 12px;
110+
border: 1px solid #ced4da;
111+
border-radius: 0.25rem;
112+
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
113+
-webkit-appearance: none;
114+
-moz-appearance: none;
115+
appearance: none;
116+
}
117+
118+
.select2-container--default .select2-selection--single {
119+
border: none!important;
120+
}
121+
122+
.select2-container--default .select2-selection--multiple {
123+
border: none!important;
124+
}
125+
126+
.select2-container--default .select2-selection--single .select2-selection__arrow {
127+
display: none!important;
128+
}
129+
130+
.select2-container .select2-selection--single .select2-selection__rendered {
131+
padding-left: 0px!important;
132+
}
133+
134+
.popover {
135+
max-width: 50%;
136+
}

src/assets/floating-scrollbar/jquery.floatingscroll.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/assets/floating-scrollbar/jquery.floatingscroll.min.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/datasources/admin.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ class SourceSubdivisionAdmin(ImportExportModelAdmin):
1717
resource_classes: list[type[SourceSubdivisionResource]] = [SourceSubdivisionResource]
1818

1919

20-
data_source_search_fields_type = tuple[Literal['name'], Literal['source_subdivision__db_source'], Literal['source_subdivision__name'], Literal['description']]
21-
22-
2320
@admin.register(DataSource)
2421
class DataSourceAdmin(ImportExportModelAdmin):
2522
"""
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 5.0.3 on 2024-06-05 10:09
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('datasources', '0004_alter_datasource_options_and_more'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='sourcesubdivision',
15+
name='external_name',
16+
field=models.CharField(help_text='External Name', max_length=128, null=True),
17+
),
18+
]

src/datasources/models.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ class SourceSubdivision(TimeStampedModel):
1717
max_length=128,
1818
unique=True
1919
)
20+
external_name: models.CharField = models.CharField(
21+
help_text=_('External Name'),
22+
max_length=128,
23+
null=True,
24+
)
2025
description: models.TextField = models.TextField(
2126
help_text=_('Source description'),
2227
max_length=1000,

src/datasources/resources.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
class SourceSubdivisionResource(resources.ModelResource):
1313
name = Field(attribute='name', column_name='Source Subdivision')
1414
display_name = Field(attribute='display_name', column_name='Source Subdivision')
15+
external_name = Field(attribute='external_name', column_name='External Name')
1516
description = Field(attribute='description', column_name='Description')
1617
db_source = Field(attribute='db_source', column_name='DB Source')
1718
data_source = Field(

0 commit comments

Comments
 (0)