-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: set up env * feat: created ground-observations app * Refactor * Add developers documentation section * tests: CRUD tests for ground_observations model * docs: updated and added database design * fix vscode dev container settings * rename gap app and fix models * fix crud tests * fix lint * fix typescript dependency in package.json * fix docstring in tests * fix doc strings in test and factories * ensure secret key file is generated in base settings * update database diagram * change station type into a separate model * update database diagram --------- Co-authored-by: Irwan Fathurrahman <meomancer@gmail.com> Co-authored-by: Danang <danangmassandy@gmail.com>
- Loading branch information
1 parent
a476bdb
commit 85a3bd1
Showing
29 changed files
with
1,782 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,6 @@ docs/site/* | |
docks/mkdocs.yml | ||
.direnv | ||
docs/mkdocs.yml | ||
|
||
# ignore .env in root project for vscode | ||
.env |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"python.testing.pytestArgs": [ | ||
"django_project" | ||
], | ||
"python.testing.unittestEnabled": false, | ||
"python.testing.pytestEnabled": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# coding=utf-8 | ||
""" | ||
Tomorrow Now GAP. | ||
.. note:: General models | ||
""" | ||
|
||
from django.db import models | ||
|
||
|
||
class Definition(models.Model): | ||
"""Abstract model for Model that has name and description. | ||
Attributes: | ||
name (str): Name of object. | ||
description (str): Description of object. | ||
""" | ||
|
||
name = models.CharField( | ||
max_length=512 | ||
) | ||
description = models.TextField( | ||
null=True, blank=True | ||
) | ||
|
||
def __str__(self): | ||
return self.name | ||
|
||
class Meta: # noqa: D106 | ||
abstract = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ | |
INSTALLED_APPS = INSTALLED_APPS + ( | ||
'core', | ||
'frontend', | ||
'gap' | ||
) | ||
|
||
TEMPLATES[0]['DIRS'] += [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# coding=utf-8 | ||
""" | ||
Tomorrow Now GAP. | ||
.. note:: Admins | ||
""" | ||
from django.contrib import admin | ||
|
||
from .models import ( | ||
Attribute, Country, Provider, Measurement, Station | ||
) | ||
|
||
|
||
@admin.register(Attribute) | ||
class AttributeAdmin(admin.ModelAdmin): | ||
"""Attribute admin.""" | ||
|
||
list_display = ( | ||
'name', 'description' | ||
) | ||
search_fields = ('name',) | ||
|
||
|
||
@admin.register(Country) | ||
class CountryAdmin(admin.ModelAdmin): | ||
"""Country admin.""" | ||
|
||
list_display = ( | ||
'name', 'description' | ||
) | ||
search_fields = ('name',) | ||
|
||
|
||
@admin.register(Provider) | ||
class ProviderAdmin(admin.ModelAdmin): | ||
"""Provider admin.""" | ||
|
||
list_display = ( | ||
'name', 'description' | ||
) | ||
search_fields = ('name',) | ||
|
||
|
||
@admin.register(Measurement) | ||
class MeasurementAdmin(admin.ModelAdmin): | ||
"""Measurement admin.""" | ||
|
||
list_display = ( | ||
'station', 'attribute', 'date', 'value' | ||
) | ||
list_filter = ('station', 'attribute') | ||
search_fields = ('name',) | ||
|
||
|
||
@admin.register(Station) | ||
class StationAdmin(admin.ModelAdmin): | ||
"""Station admin.""" | ||
|
||
list_display = ( | ||
'name', 'country', 'provider' | ||
) | ||
list_filter = ('country',) | ||
search_fields = ('name',) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# coding=utf-8 | ||
""" | ||
Tomorrow Now GAP. | ||
.. note:: App Config | ||
""" | ||
|
||
from django.apps import AppConfig | ||
from django.utils.translation import gettext_lazy as _ | ||
|
||
|
||
class GAPConfig(AppConfig): | ||
"""App Config for GroundObservations.""" | ||
|
||
name = 'gap' | ||
verbose_name = _('Ground Observations') |
Oops, something went wrong.