Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 0 additions & 31 deletions .eslintrc.js

This file was deleted.

9 changes: 0 additions & 9 deletions .flake8

This file was deleted.

10 changes: 0 additions & 10 deletions .github/docker-compose.yml

This file was deleted.

40 changes: 1 addition & 39 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint code and run tests
name: Run tests

on:
push:
Expand All @@ -10,45 +10,8 @@ on:
- main

jobs:
lint:
name: Run linters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.14.3"

- name: Install Python dependencies
run: pip install black flake8

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "25"

# ESLint and Prettier must be in `package.json`
- name: Install Node.js dependencies
run: npm ci

- name: Run linters
uses: wearerequired/lint-action@v2
with:
continue_on_error: false
black: true
black_args: "--check . --exclude 'map/migrations|node_modules'"
flake8: true
flake8_args: "--config=.flake8"
eslint: true
prettier: true

test:
name: Run tests
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -57,6 +20,5 @@ jobs:
- name: Run tests
run: |
docker compose -f docker-compose.yml \
-f .github/docker-compose.yml \
-f tests/docker-compose.yml \
run --rm app
32 changes: 0 additions & 32 deletions .github/workflows/publish_docker_image.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .pre-commit-config.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions .prettierignore

This file was deleted.

6 changes: 0 additions & 6 deletions .prettierrc.json

This file was deleted.

16 changes: 0 additions & 16 deletions Dockerfile.deploy

This file was deleted.

12 changes: 0 additions & 12 deletions heroku.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Generated by Django 6.0.3 on 2026-03-12 16:12

import django.contrib.gis.db.models.fields
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('map', '0002_communityarea'),
]

operations = [
migrations.AlterField(
model_name='communityarea',
name='area_id',
field=models.IntegerField(blank=True, null=True),
),
migrations.AlterField(
model_name='communityarea',
name='name',
field=models.CharField(blank=True, max_length=32, null=True),
),
migrations.AlterField(
model_name='restaurantpermit',
name='community_area_id',
field=models.CharField(blank=True, max_length=2, null=True),
),
migrations.AlterField(
model_name='restaurantpermit',
name='issue_date',
field=models.DateField(blank=True, null=True),
),
migrations.AlterField(
model_name='restaurantpermit',
name='location',
field=django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326),
),
migrations.AlterField(
model_name='restaurantpermit',
name='permit_id',
field=models.CharField(blank=True, max_length=16, null=True),
),
migrations.AlterField(
model_name='restaurantpermit',
name='permit_type',
field=models.CharField(blank=True, max_length=64, null=True),
),
migrations.AlterField(
model_name='restaurantpermit',
name='street_direction',
field=models.CharField(blank=True, max_length=8, null=True),
),
migrations.AlterField(
model_name='restaurantpermit',
name='street_name',
field=models.CharField(blank=True, max_length=32, null=True),
),
migrations.AlterField(
model_name='restaurantpermit',
name='street_number',
field=models.CharField(blank=True, max_length=16, null=True),
),
]
20 changes: 10 additions & 10 deletions map/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@


class CommunityArea(models.Model):
name = models.CharField(max_length=32, null=False, blank=False)
area_id = models.IntegerField(null=False, blank=False)
name = models.CharField(max_length=32, null=True, blank=True)
area_id = models.IntegerField(null=True, blank=True)

def __str__(self):
return self.name.title()


class RestaurantPermit(models.Model):
permit_id = models.CharField(max_length=16, null=False, blank=False)
permit_type = models.CharField(max_length=64, null=False, blank=False)
permit_id = models.CharField(max_length=16, null=True, blank=True)
permit_type = models.CharField(max_length=64, null=True, blank=True)
application_start_date = models.DateField(null=True, blank=True)
issue_date = models.DateField(null=False, blank=False)
issue_date = models.DateField(null=True, blank=True)
work_description = models.TextField(null=True, blank=True)
street_number = models.CharField(max_length=16, null=False, blank=False)
street_direction = models.CharField(max_length=8, null=False, blank=False)
street_name = models.CharField(max_length=32, null=False, blank=False)
location = gis_models.PointField(null=False, blank=False)
community_area_id = models.CharField(max_length=2, null=False, blank=False)
street_number = models.CharField(max_length=16, null=True, blank=True)
street_direction = models.CharField(max_length=8, null=True, blank=True)
street_name = models.CharField(max_length=32, null=True, blank=True)
location = gis_models.PointField(null=True, blank=True)
community_area_id = models.CharField(max_length=2, null=True, blank=True)
2 changes: 1 addition & 1 deletion map/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class CommunityAreaSerializer(serializers.ModelSerializer):
class Meta:
model = CommunityArea
fields = ["name", "area_id", "num_permits"]
fields = ["name", "num_permits"]

num_permits = serializers.SerializerMethodField()

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gunicorn==25.1.0
pip==25.3
psycopg2-binary==2.9.11
pytest==9.0.2
pytest-django==4.12.0
sentry-sdk==2.54.0
setuptools==82.0.0
whitenoise==6.12.0
Expand Down
1 change: 1 addition & 0 deletions tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ services:
DJANGO_SECRET_KEY: test-key
# Disable manifest storage for testing
DJANGO_STATICFILES_STORAGE: django.contrib.staticfiles.storage.StaticFilesStorage
DJANGO_SETTINGS_MODULE: map.settings
command: pytest -sv
Loading
Loading