Skip to content

Commit d6901ec

Browse files
committed
Merge branch 'saulshanabrook-feature/docker-testing'
2 parents 8338fab + e89c406 commit d6901ec

File tree

4 files changed

+40
-7
lines changed

4 files changed

+40
-7
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
*.pyc
22
settings_local.py
3+
coverage.xml
4+
django_setuptest-*.egg/
5+
django_simple_import.egg-info/
6+
*.egg/
7+
pep8.txt
8+
import_file/

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM python:2
2+
3+
RUN mkdir -p /usr/src/app
4+
WORKDIR /usr/src/app
5+
6+
COPY setup.py /usr/src/app/
7+
RUN pip install -e .
8+
9+
COPY . /usr/src/app
10+
11+
# include RUN for tests as well as CMD so that all test dependencies are
12+
# installed on the image and wont have to be downloaded again every time
13+
# the image is RUN
14+
RUN python setup.py test
15+
CMD python setup.py test

README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
django-simple-import
22
====================
33

4-
An import tool easy enough your users could use it. django-simple-import aims to keep track of logs
5-
and user preferences in the database.
4+
An import tool easy enough your users could use it. django-simple-import aims to keep track of logs
5+
and user preferences in the database.
66

77
Project is now stable and feature complete. Of course it's always a good idea to test before deploying.
88

@@ -16,7 +16,7 @@ Project is now stable and feature complete. Of course it's always a good idea to
1616

1717
# News
1818

19-
1.17 is released. The most apparent changes are 1.7 compatibility and migration to Django's
19+
1.17 is released. The most apparent changes are 1.7 compatibility and migration to Django's
2020
atomic transactions. Please report any issues. I test against mysql innodb, postgres, and sqlite.
2121

2222
## Features
@@ -47,7 +47,7 @@ Define allowed methods to be "imported". Example:
4747
def set_bar(self, value):
4848
self.bar = value
4949
simple_import_methods = ('set_bar',)
50-
50+
5151
### settings.py
5252
SIMPLE_IMPORT_LAZY_CHOICES: Default True. If enabled simple_import will look up choices when importing. Example:
5353

@@ -56,13 +56,13 @@ SIMPLE_IMPORT_LAZY_CHOICES: Default True. If enabled simple_import will look up
5656
If the spreadsheet value is "Monday" it will set the database value to "M."
5757

5858
If you need any help, we do consulting and custom development. Just email us at david at burkesoftware.com.
59-
59+
6060

6161
## Usage
6262

6363
Go to /simple_import/start_import/ or use the admin interface.
6464

65-
The screenshots have a django-grappelli like theme. The base templates have no style and are very basic.
65+
The screenshots have a django-grappelli like theme. The base templates have no style and are very basic.
6666
See an example of customization [here](https://github.com/burke-software/django-sis/tree/master/templates/simple_import).
6767

6868
There is also a log of import records. Check out /admin/simple_import/.
@@ -75,7 +75,15 @@ saving a hash.
7575
User has some required fields that...aren't really required. Hardcoded to let them pass.
7676

7777
### Security
78-
I'm working on the assumption staff users are trusted. Only users with change permission
78+
I'm working on the assumption staff users are trusted. Only users with change permission
7979
to a field will see it as an option. I have not spent much time looking for ways users could
8080
manipulate URLs to run unauthorized imports. Feel free to contribute changes.
8181
All import views do require admin "is staff" permission.
82+
83+
## Testing
84+
85+
If you have [Fig](http://www.fig.sh/) and [Docker](https://www.docker.com/)
86+
installed, then just running `fig up` will do everything you need to test
87+
the packages.
88+
89+
Otherwise look at the `.travis.yml` file for test dependencies.

fig.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
app:
2+
build: .
3+
volumes:
4+
- .:/usr/src/app

0 commit comments

Comments
 (0)