learn-co-curriculum / python-p3-translating-from-orms-to-sqlalchemy-lab Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
https://learning.flatironschool.com/courses/6049/assignments/195260?module_item_id=439018
When the instructions inform a student to start work with canvas instructions and test feedback it tells the student to complete work in the lib file when the repository has an app file.
I envision students looking for a lib file and not finding it and not sure of what to do (event though the working python files in lib and app are the same).
I would change the instructions in the canvas lesson/read.me from lib to app.
https://learning.flatironschool.com/courses/6049/assignments/209225?module_item_id=482537
The solution to the new_from_db method seems a little odd to me. My impression is that it simply grabs and returns the first row in the database, and that's all it can do. However, the instructions in the tests make it seem like it should be used in a more general manner - takes a database row and creates and returns a dog instance
.
Furthermore, does it even make sense to include this method in this lab? Doesn't the use of SQLAlchemy mean that we don't actually need this "new from db" method since we can use .all, .first, or a list comprehension in conjunction with a query to convert our query results into python objects?
I understand that the idea is to rewrite the same methods from the previous ORMs lab to demonstrate the difference, but I think the inclusion of this method is a little misleading / confusing. It might be more helpful to deliberately skip this method and talk about why it's been skipped - i.e., that using SQLAlchemy makes this method unnecessary. The current solution doesn't really seem like it illustrates any important concept other than how to pass this test. I could be missing something important though! Thanks!
No response
No response
https://learning.flatironschool.com/courses/6049/assignments/209225?module_item_id=482537
It looks like we don't actually have to include session.commit in our save method for our test to pass. Does our session still have access to the things that have been added to it when it runs a query, even if those things have not been persisted to the database?
No response
No response
https://learning.flatironschool.com/courses/6049/assignments/209225?module_item_id=482537
It looks like our test for our "create_table" method is passing without us having to write any code for it. Any idea as to why that might be? We do need to define the method in our dog.py, but it looks like as long as we have a "pass" placed in the method, this test will pass.
No response
No response
https://learning.flatironschool.com/courses/6049/assignments/209225?module_item_id=482537
Couple of things here that could be confusing for students:
dog
argument.new_from_db
function starter code only has one argument of session
being passed in, but on initial run of the tests, it says that it expects 2 args, but only received one. Should the starter code for this function also include the second argument like the other functions in this lab? I could see how this could be confusing for students if they were coming in thinking that most of the arguments are made for them.Just some thoughts.
No response
No response
https://learning.flatironschool.com/courses/6329/assignments/239716?module_item_id=563719
The create_table() test passes an engine argument that isn't in the templated function. had to add the engine argument in to get the test to pass. The lab specifically says the function body for this test should be composed with more than one line of code, but once you add the engine argument, you pass the test with only one line
the update_breed() template function in dog.py includes a dog argument that is unused
No response
No response
https://learning.flatironschool.com/courses/6049/assignments/204254?module_item_id=468029
Links to the solution branch instead of main.
No response
Switch the branches.
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.