This is an automated email from the ASF dual-hosted git repository. gjm pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/bloodhound-core.git
commit 3e8288f60a341dab1e997d6fd732525ba26c120d Author: Gary Martin <gary.mar...@physics.org> AuthorDate: Sat Dec 17 15:09:33 2022 +0000 Add show-urls make command to help with discovery --- Makefile | 5 ++++- bh_core/settings.py | 1 + trackers/models.py | 24 ++++++++++++++++++++++-- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1d80d0e..c446a69 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ endif .PHONY: selenium-clean functional-test: selenium-start - poetry run python functional_tests.py + $(PYTHON) functional_tests.py .PHONY: functional-test clean-deplock: @@ -86,3 +86,6 @@ endif full-clean: clean-deplock clean-venv clean-db selenium-clean .PHONY: full-clean + +show-urls: manage-show_urls +.PHONY: show-urls diff --git a/bh_core/settings.py b/bh_core/settings.py index 37ac64b..a6de119 100644 --- a/bh_core/settings.py +++ b/bh_core/settings.py @@ -60,6 +60,7 @@ INSTALLED_APPS = [ 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', + 'django_extensions', 'drf_yasg', ] diff --git a/trackers/models.py b/trackers/models.py index 373235a..443e92c 100644 --- a/trackers/models.py +++ b/trackers/models.py @@ -15,6 +15,8 @@ # specific language governing permissions and limitations # under the License. +"""Main DB models for Apache Bloodhound.""" + import logging from django.db import models @@ -23,6 +25,8 @@ logger = logging.getLogger(__name__) class Product(models.Model): + """Product table.""" + prefix = models.TextField(primary_key=True) name = models.TextField() description = models.TextField(blank=True, null=True) @@ -33,7 +37,7 @@ class Product(models.Model): class ProductConfig(models.Model): - """Possibly legacy table - keeping for now""" + """Possibly legacy table - keeping for now.""" product = models.ForeignKey(Product, on_delete=models.CASCADE) section = models.TextField() @@ -46,7 +50,7 @@ class ProductConfig(models.Model): class ProductResourceMap(models.Model): - """Possibly legacy model - keeping for now""" + """Possibly legacy model - keeping for now.""" product_id = models.ForeignKey(Product, on_delete=models.CASCADE) resource_type = models.TextField(blank=True, null=True) @@ -57,6 +61,8 @@ class ProductResourceMap(models.Model): class Component(models.Model): + """Component table.""" + name = models.TextField(primary_key=True) owner = models.TextField(blank=True, null=True) description = models.TextField(blank=True, null=True) @@ -72,6 +78,8 @@ class Component(models.Model): class Enum(models.Model): + """Enum table.""" + type = models.TextField(primary_key=True) name = models.TextField() value = models.TextField(blank=True, null=True) @@ -83,6 +91,8 @@ class Enum(models.Model): class Milestone(models.Model): + """Milestone table.""" + name = models.TextField(primary_key=True) due = models.BigIntegerField(blank=True, null=True) completed = models.BigIntegerField(blank=True, null=True) @@ -99,6 +109,8 @@ class Milestone(models.Model): class Version(models.Model): + """Version table.""" + name = models.TextField(primary_key=True) time = models.BigIntegerField(blank=True, null=True) description = models.TextField(blank=True, null=True) @@ -114,6 +126,8 @@ class Version(models.Model): class Ticket(models.Model): + """Ticket table.""" + uid = models.AutoField(primary_key=True) type = models.ForeignKey( Enum, @@ -188,6 +202,8 @@ class Ticket(models.Model): class TicketChange(models.Model): + """TicketChange table.""" + ticket = models.ForeignKey( Ticket, on_delete=models.PROTECT, @@ -211,6 +227,8 @@ class TicketChange(models.Model): class TicketCustom(models.Model): + """TicketCustom table.""" + ticket = models.ForeignKey(Ticket, on_delete=models.PROTECT) name = models.TextField() value = models.TextField(blank=True, null=True) @@ -222,6 +240,8 @@ class TicketCustom(models.Model): class Report(models.Model): + """Report table - potentially legacy.""" + author = models.TextField(blank=True, null=True) title = models.TextField(blank=True, null=True) query = models.TextField(blank=True, null=True)