Skip to content

Commit

Permalink
src layout; dev container; fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Babb committed Nov 12, 2024
1 parent 83ea01e commit d1ff0c8
Show file tree
Hide file tree
Showing 212 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docker/base.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN python3 -m pip install pip setuptools --upgrade && \

ADD pyproject.toml .
ADD scripts/ ./scripts
ADD roundware ./roundware
ADD src ./src

RUN python3 -m pip install .
RUN python3 -m roundware.manage collectstatic
Expand Down
3 changes: 3 additions & 0 deletions docker/dev.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM roundware:latest

RUN python3 -m pip install .[test,dev]
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ dependencies = [
# https://github.com/roundware/django-admin-bootstrapped/zipball/3.0.0
# audio conversions
"ffmpeg-python==0.2.0"

]

[project.optional-dependencies]
Expand All @@ -93,4 +92,4 @@ test = [
version = { attr = "roundware.__version__"}

[tool.setuptools.packages.find]
where = ["."]
where = ["src"]
Empty file removed roundware/rw/tests/__init__.py
Empty file.
1 change: 1 addition & 0 deletions src/roundware/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '0.4.0'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion roundware/rw/models.py → src/roundware/rw/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from django.utils.safestring import mark_safe
from django.db import transaction
from django.contrib.gis.db import models
from rw.fields import ValidatedFileField
from roundware.rw.fields import ValidatedFileField
from django.conf import settings
from datetime import datetime
from django.db.models.signals import post_save
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ def setUp(self):
asset=self.asset1, type="flag")

def test_get_likes(self):
self.assertEquals(2, self.asset1.get_likes())
self.assertEquals(1, self.asset2.get_likes())
self.assertEqual(2, self.asset1.get_likes())
self.assertEqual(1, self.asset2.get_likes())

def test_get_flags(self):
self.assertEquals(1, self.asset1.get_flags())
self.assertEqual(1, self.asset1.get_flags())

def test_distance(self):
distance = self.asset1.distance({'latitude': 0, 'longitude': 0})
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d1ff0c8

Please sign in to comment.