-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from LegoStormtroopr/draft_0_4
Draft 0 4
- Loading branch information
Showing
18 changed files
with
359 additions
and
180 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM python:3.8-buster | ||
|
||
# Install python package management tools | ||
RUN pip install --upgrade setuptools pip poetry | ||
|
||
COPY ./* /usr/src/app/ | ||
WORKDIR /usr/src/app | ||
|
||
ENV PYTHONPATH=/usr/src/app/django_spaghetti DJANGO_SETTINGS_MODULE=tests.settings |
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,47 @@ | ||
name: Testing | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
python_lint: | ||
name: Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout PR | ||
uses: actions/checkout@v1 | ||
- name: Setup Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- name: Install flake8 | ||
run: pip install flake8 | ||
- name: Lint | ||
run: flake8 | ||
|
||
test: | ||
needs: | ||
- python_lint | ||
name: Testing | ||
strategy: | ||
matrix: | ||
django: | ||
- '2.2' | ||
- '3.0' | ||
- '3.1' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install tox | ||
run: pip install --upgrade setuptools pip poetry | ||
|
||
- name: Run tests | ||
run: poetry config virtualenvs.create false && poetry install && django-admin test |
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 |
---|---|---|
@@ -1,19 +0,0 @@ | ||
__version_info__ = { | ||
'major': 0, | ||
'minor': 3, | ||
'micro': 1, | ||
'releaselevel': 'final', | ||
'serial': 0 | ||
} | ||
|
||
|
||
def get_version(release_level=True): | ||
""" | ||
Return the formatted version information | ||
""" | ||
vers = ["%(major)i.%(minor)i.%(micro)i" % __version_info__] | ||
if release_level and __version_info__['releaselevel'] != 'final': | ||
vers.append('%(releaselevel)s%(serial)i' % __version_info__) | ||
return ''.join(vers) | ||
|
||
__version__ = get_version() | ||
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,64 @@ | ||
<html> | ||
<head> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/vis/4.7.0/vis.min.js"></script> | ||
<link href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.7.0/vis.min.css" rel="stylesheet" type="text/css" /> | ||
</head> | ||
<body> | ||
<h1>Django Spaghetti and Meatballs Demo</h1> | ||
|
||
<ul> | ||
<li> | ||
<a href="{% url 'test_plate_settings' %}">Plate settings override</a> | ||
</li> | ||
<li> | ||
<a href="{% url 'test_plate_show_m2m_field_detail' %}">M2M override test</a> | ||
</li> | ||
<li> | ||
<a href="{% url 'test_plate_override' %}">Plate override test</a> | ||
</li> | ||
<li> | ||
<a href="{% url 'spaghetti:plate' %}">Generic plate view</a> | ||
</li> | ||
</ul> | ||
|
||
|
||
<hr> | ||
|
||
<div id="visualization" style="max-height:500px"></div> | ||
|
||
<script> | ||
var nodes = new vis.DataSet( | ||
{{ meatballs|safe }} | ||
); | ||
|
||
var edges = new vis.DataSet( | ||
{{ spaghetti|safe }} | ||
); | ||
|
||
var data = { | ||
nodes: nodes, | ||
edges: edges | ||
}; | ||
|
||
var container = document.getElementById('visualization'); | ||
var options = { | ||
"edges": { | ||
"smooth": { | ||
"type": "dynamic" | ||
} | ||
}, | ||
|
||
"layout": { | ||
hierarchical: { | ||
sortMethod: 'hubsize', | ||
direction:'LR' | ||
} | ||
}, | ||
|
||
}; | ||
|
||
var timeline = new vis.Network(container, data, options); | ||
|
||
</script> | ||
</body> | ||
</html> |
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 @@ | ||
Overriden to have nothing for testing purposes |
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
Oops, something went wrong.