This file contains hidden or 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
(mtx-api--EuOzVbW) bash-3.2$ docker-compose run --rm web ./manage.py importdatasets ./mtx-dataset-13.zip | |
WARNING: The DJANGO_CORS_ORIGIN_WHITELIST variable is not set. Defaulting to a blank string. | |
Starting mtx-api_postgres_1 ... done | |
Generating import commands: | |
- Generated import for `datasets_datasets` from datasets.tsv. | |
- Generated import for `datasets_biopsy_batches` from biopsy_batches.tsv. | |
- Generated import for `datasets_tumor_sites` from tumor_sites.tsv. | |
- Generated import for `datasets_treatments` from treatments.tsv. | |
- Generated import for `datasets_outcomes` from outcomes.tsv. | |
- Generated import for `datasets_cancer_types` from cancer_types.tsv. |
This file contains hidden or 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
(api-8uRqWAds) bash-3.2$ ./manage.py importdatasets /Users/guyjacks/Desktop/newexports.zip | |
Generating import commands: | |
Traceback (most recent call last): | |
File "./manage.py", line 28, in <module> | |
execute_from_command_line(sys.argv) | |
File "/Users/guyjacks/projects/venv/api-8uRqWAds/lib/python3.6/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line | |
utility.execute() | |
File "/Users/guyjacks/projects/venv/api-8uRqWAds/lib/python3.6/site-packages/django/core/management/__init__.py", line 365, in execute | |
self.fetch_command(subcommand).run_from_argv(self.argv) | |
File "/Users/guyjacks/projects/venv/api-8uRqWAds/lib/python3.6/site-packages/django/core/management/base.py", line 288, in run_from_argv |
This file contains hidden or 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
(api-8uRqWAds) bash-3.2$ ./manage.py migrate | |
Traceback (most recent call last): | |
File "./manage.py", line 28, in <module> | |
execute_from_command_line(sys.argv) | |
File "/Users/guyjacks/projects/venv/api-8uRqWAds/lib/python3.6/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line | |
utility.execute() | |
File "/Users/guyjacks/projects/venv/api-8uRqWAds/lib/python3.6/site-packages/django/core/management/__init__.py", line 365, in execute | |
self.fetch_command(subcommand).run_from_argv(self.argv) | |
File "/Users/guyjacks/projects/venv/api-8uRqWAds/lib/python3.6/site-packages/django/core/management/__init__.py", line 216, in fetch_command | |
klass = load_command_class(app_name, subcommand) |
This file contains hidden or 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
Problems: | |
Performance: | |
- extra lookups to perform joins | |
- extra lookups to manually check foreign key integrity | |
- Requires more memory for indexing on entity type | |
Complexity: | |
- The application must enforce foreign key integrity | |
Maintainability: | |
- It will be difficult to reason about the schema without examining records to determine which entity types may be referenced | |
- New applications talking to the db will also need to enforce fk integrity and may do it wrong. |
This file contains hidden or 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
{ | |
"paths": { | |
"shifty/dist/doc/assets/css/../img/spinner.gif": "shifty/dist/doc/assets/css/../img/spinner.578c56176140.gif", | |
"css/pages/../../images/home/banner-image-mobile.jpg": "css/pages/../../images/home/banner-image-mobile.d77774d63dc9.jpg", | |
"css/pages/../../images/home/banner-image-desktop.jpg": "css/pages/../../images/home/banner-image-desktop.fa7e5fea6bb4.jpg", | |
"css/pages/../../images/home/bg-icons.png": "css/pages/../../images/home/bg-icons.c08bcacc5b79.png", | |
"admin/css/widgets.css": "admin/css/widgets.a7251c097987.css", | |
"admin/css/../img/icon-addlink.svg": "admin/css/../img/icon-addlink.d519b3bab011.svg", | |
"admin/css/../img/search.svg": "admin/css/../img/search.7cf54ff789c6.svg", | |
"admin/css/fonts.css": "admin/css/fonts.cc6140298ba7.css", |
This file contains hidden or 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
from django import forms | |
from localflavor.us.forms import USZipCodeField | |
from .models import Organization | |
class OrganizationModelForm(forms.ModelForm): | |
class Meta: | |
model = Organization |
This file contains hidden or 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
import requests | |
def _url(path): | |
return 'https://api.pandapay.io/v1' + path | |
class ClientBase(object): | |
def __init__(self, auth): | |
self.auth = auth |
This file contains hidden or 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
from collections.abc import Mapping | |
import abc | |
""" | |
FEATURE IDEAS | |
add a report() method to that prints a nicely formatted output of how | |
each comparison went. | |
assert a == b |
This file contains hidden or 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
Traceback (most recent call last): | |
File "./manage.py", line 23, in <module> | |
execute_from_command_line(sys.argv) | |
File "/Users/guyjacks/.pyenv/versions/orfs/lib/python3.5/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line | |
utility.execute() | |
File "/Users/guyjacks/.pyenv/versions/orfs/lib/python3.5/site-packages/django/core/management/__init__.py", line 359, in execute | |
self.fetch_command(subcommand).run_from_argv(self.argv) | |
File "/Users/guyjacks/.pyenv/versions/orfs/lib/python3.5/site-packages/django/core/management/base.py", line 294, in run_from_argv | |
self.execute(*args, **cmd_options) | |
File "/Users/guyjacks/.pyenv/versions/orfs/lib/python3.5/site-packages/django/core/management/base.py", line 345, in execute |
This file contains hidden or 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
class Call(object): | |
def __init__(self, name, *args, **kwargs): | |
self.name = name | |
self.args = args | |
self.kwargs = kwargs | |
def __eq__(self, other): | |
names_are_equal = self.name == other.name | |
args_are_equal = self.args == other.args | |
kwargs_are_equal = self.kwargs == other.kwargs |