eddies5 / wcdb Goto Github PK
View Code? Open in Web Editor NEWCS373 Software Engineering Project
Home Page: http://immense-oasis-7538.herokuapp.com/
CS373 Software Engineering Project
Home Page: http://immense-oasis-7538.herokuapp.com/
Research & create unit tests for models.
Issue Tracker is being created as the issues come up.
research & begin to use minixsv
Maybe make our site responsive?
Learn how to check if a file passed to import is a valid xml file and be able to export the data in the models as xml to the front end.
We need to use pydoc to document the interfaces.
Create a template dir in the project root. Create a default template for the project.
We decided to use the schema that was posted on Piazza, so hopefully we'll be using the same schema as the rest of the class and wouldn't have to change it.
Brandon and my python interpretors both failed to import Django
shaelyn@Laptop:~/Soft_Eng/cs373-wcdb$ python
Python 2.7.4 (default, Apr 19 2013, 18:32:33)
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/django/db/init.py", line 11, in
if settings.DATABASES and DEFAULT_DB_ALIAS not in settings.DATABASES:
File "/usr/local/lib/python2.7/dist-packages/django/conf/init.py", line 53, in getattr
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/init.py", line 46, in _setup
% (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
SOLUTION: When you use Django, you have to tell it which settings you’re using. This is done by using an environment variable, DJANGO_SETTINGS_MODULE. You set this environment variable to the path of the settings you wish to use. The following code was inserted to fix the error:
os.environ["DJANGO_SETTINGS_MODULE"] = "cs373_ATeam.settings"
Our report should contain Title, Introduction, Design (XML Schema), Implementation (Import/export facility), Testing.
Need to write (and name) a file *.py that uses an element tree when parsing xml. This parsed xml stored in the tree is then used to fill Django models with the parsed information.
Before this code is written, we should verify that the xml we wrote is in the format that we want it and that we want to progress at this point (rewriting how the models are filled will be difficult)
We try to run manage.py and we receive the following error:
django.core.exceptions.ImproperlyConfigured: You haven't set the database ENGINE setting yet.
The shared xsd has had major changes over night, our xml and xsd needs to be brought up to date. @shanrgupta
Right now, if an assert fails within our tests.py unittests, the entire Unittest page from website fails to load and gives a nasty error page. Since this project is focused so much on usability, this would be a fatal error.
Two options:
Have absolute confidence in our submission (why would well-written unit tests fail?)
Handle this case (shit happens)
Hey, we may have to actually use a db for phase 1? It's not clear on the project page, it just says, "load into Django Models." Who knows what that means.
But in a regular web development set up, we'd save our models to the database.
Investigate saving the models to the database.
You'll have to have mysql access or use sqlite3.
Make sure to run "python manage.py syncdb" to create the necessary model tables.
Using an html form POST to a backend url the input file.
Create homepage.
At least 15 pages.
We added urls.py and views.py and set up links in index.html, so we can view People and Organizations pages.
For some reason, models are being populated twice over, so every list's elements are duplicated
Solution: Originally the error seemed to be related to lists, as they had the duplicates. However, it was actually related to populate models getting called twice. The reason it was believed that it was more of a list related error is because non-list attributes were correct. There was a simple explanation to this however, since overriding a non-list value with a copy doesn't really show a change, even though it was assigned twice.
Export is outputting XML through the website, but verification and thoughts are needed on the formatting and inclusion/exclusion of terms within the output.
We'll need to use assert to check pre-conditions, post-conditions, argument validity, return-value validity, and invariants.
shaelyn@Laptop:/Soft_Eng/cs373-wcdb/cs373_ATeam$ vim settings.py/Soft_Eng/cs373-wcdb/cs373_ATeam$ python manage.py syncdb
shaelyn@Laptop:
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb
Where the settings.py holds the following db information
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'cs373_shaelyn', # Or path to database file if using sqlite3.
'USER': 'shaelyn', # Not used with sqlite3.
'PASSWORD': 'SNdHe8EBVv', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}
create development branch. explain the dev cycle we'll use.
pydoc
Rename the xml and xsd files to match the required names.
Make Li into a model, have it know what crisis, person or organization it belongs to, let it know what kind of Li it is, e.g. location, human impact, etc. Also, add citation numbers,
We're learning how to make Django models using
https://docs.djangoproject.com/en/dev/ref/models/instances/
The Unittest tab on the website is currently failing to run with this version of the project. Whats up??
Host the django site on the home directory of your CS account.
Upgrade xml instance.
We'll need to create unit tests for our code.
Git Repository was created by Eddie, and he invited the rest of the group as contributors.
To effectively comment on our functions and generate a beautiful pydoc, following the following formatting scheme"
def f_to_comment()
...."""
....Description : what, with what, returning what
...."""
....code
....code
where the .... represents an indent on a git issue commnent
When I copy-pasted the XML from the xmlInstance google doc into a run-able xml file, import into our website failed.
I got the following output error:
TypeError at /import/
cannot concatenate 'str' and 'XsvalError' objects
I have not the slightest clue what this is or where exactly it is coming from (it is triggered from a loadModel.py exception but where in the code). My egypt-related XML code imported and exprted from the website successfully so I am not expecting any errors like this from egypt stuff.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.