-
Notifications
You must be signed in to change notification settings - Fork 20
Cohort 22 Salma Anany and Tami Gaertner #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 14 commits
eaec270
9914158
b432ba2
f9ab1f3
458170a
586f72c
0b2d368
3ba5c57
060a092
9c30a4d
48adb54
8e38137
5947424
8d8c5c7
f9a58bc
b718e48
8152076
3876ed1
27b4595
15f540a
8bc777e
af913c5
2f8cabd
c55376c
2a22918
c4a651f
f7fe0b6
01e806c
dd45b20
631b646
40d8c58
492fa72
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,22 @@ | ||
| # from distutils.command.build_py import build_py | ||
|
|
||
| from flask import Flask | ||
| from .routes.planet_routes import planets_bp | ||
|
|
||
| # from .models.planet import Planet | ||
| # from .routes.planet_routes import planets_bp | ||
|
|
||
| def create_app(test_config=None): | ||
| app = Flask(__name__) | ||
|
|
||
| app.register_blueprint(planets_bp) | ||
| return app | ||
|
|
||
|
|
||
| def main(): | ||
| app = create_app() | ||
| app.run() | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
|
|
||
| main() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| class Planet: | ||
| def __init__(self,id, name, description, moon): | ||
| self.id = id | ||
| self.name = name | ||
| self.description = description | ||
| self.moon = moon | ||
|
|
||
| planets = [ | ||
| Planet(1, "Mercury", "the smallest planet in the solar system and orbits closest to the Sun, with extreme temperatures ranging from 430°C (800°F) during the day to -180°C (-290°F) at night.", 0), | ||
| Planet(2, "Venus", "the Sun and has a thick, toxic atmosphere composed mostly of carbon dioxide, creating a runaway greenhouse effect that makes it the hottest planet in the solar system with surface temperatures around 465°C (870°F", 0), | ||
| Planet(3, "Earth", "Our home planet, the only known planet to harbor life",1), | ||
| Planet(4,"Mars", "Red Planet due to its reddish appearance caused by iron oxide (rust) on its surface. It has a thin atmosphere composed mostly of carbon dioxide", 2 ), | ||
| Planet(4, "Pluto", " filled with icy bodies and other small objects. Once considered the ninth planet in the solar system, it was reclassified as a dwarf planet in 2006 due to its size and the fact that it hasn’t cleared its orbit of other debris. Pluto has a rocky core surrounded by a mantle of water ice and a thin atmosphere of nitrogen, methane, and carbon monoxide.", 5), | ||
| Planet(5, "Jupiter","is the largest planet in the solar system, a gas giant composed primarily of hydrogen and helium, known for its Great Red Spot—a massive storm larger than Earth", 92), | ||
| Planet(6, "Saturn","sixth planet from the Sun and is best known for its extensive and stunning ring system, made mostly of ice and rock particles. It is a gas giant composed primarily of hydrogen and helium" , 146), | ||
| Planet(7, "Uranus","is the seventh planet from the Sun, an ice giant with a blue-green color due to the presence of methane in its atmosphere. It is unique for rotating on its side, with an extreme axial tilt of about 98 degrees", 27 ), | ||
| Planet(8, "Neptune", "is a blue ice giant, the eighth planet from the Sun. Known for strong winds and dark storms", 14), | ||
| Planet(9, "Pluto", " a small, icy world in the outer solar system. It has a diverse, frozen landscape featuring a distinctive heart-shaped region", 5 ), | ||
| ] | ||
|
|
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| from flask import Blueprint, abort, make_response | ||
| from app.models import planets | ||
|
|
||
| planets_bp = Blueprint("planets_bp", __name__, url_prefix="/planets") | ||
|
|
||
| @planets_bp.get("") | ||
| def get_all_planet(): | ||
| result_list = [] | ||
| for planet in planets: | ||
| result_list.append(planet.__dict__) | ||
|
||
| return result_list | ||
|
|
||
|
|
||
| @planets_bp.get("/<planet_id>") | ||
| def get_one_planet(planet_id): | ||
|
|
||
| planet = validate_planet(planet_id) | ||
| for planet in planets: | ||
| if planet.id == int(planet_id): | ||
| return planet.__dict__ | ||
|
|
||
| def validate_planet(planet_id): | ||
| try: | ||
| planet_id = int(planet_id) | ||
|
|
||
| except: | ||
| abort(make_response( {"message": f"planet {planet_id} invalid"}, 400)) | ||
|
|
||
| for planet in planets: | ||
| if planet.id == planet_id: | ||
| return planet | ||
| abort(make_response({"message": f"planet {planet_id} not found"}, 404)) | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,44 @@ | ||
| # Coworking Agreement | ||
| .# Coworking Agreement | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for filling this out ❤️ Even if what you listed out mostly stuff you're already doing, it can be really helpful to keep in mind and help make sure folks aren't relying on assumptions about how they will work together. |
||
|
|
||
| Talk through each section with your partner. Add notes on what you discussed and agreed upon in each section. At the bottom, type your names to sign off on your agreement. | ||
|
|
||
| ## Accessibility Needs | ||
| *What does each team member need access to in order to succeed and show up the best they can?* | ||
|
|
||
| 1- Time and energy | ||
| 2- Slowness | ||
| 3- Communication | ||
| 4- Fallibility | ||
|
|
||
| ## Collaboration vs. individual work expectations | ||
| *Clarify your collaboration expectations- does your group want to write code together all of the time? Or divide work to do independently, then come together to share accomplishments? What tools and technologies can help your collaboration?* | ||
| Depends | ||
| 1- pair programming | ||
| 2- Independent- when we work independent we Communicate and share our changes via slack or zoom, etc. | ||
| 3- tools and technologies we used to collaborate is zoom and slack. | ||
|
|
||
| ## Learning Style | ||
| *How does each team member learn best in project settings?* | ||
| 1- Doing | ||
| 2- Explaining | ||
| 3- Researching | ||
| 4- Coping | ||
|
|
||
| ## Preferred Feedback Style | ||
| *How does each team member best receive feedback?* | ||
| - By being honest and open. | ||
|
|
||
| ## One Team Communication Skill to Improve | ||
| *What is a teamwork-related skill you want to work on?* | ||
| for Salma | ||
| - Speak more | ||
| - Repeat the info to make sure that I understand correctly | ||
| for Tami | ||
| - Speck clear and slowly | ||
|
|
||
| ## Optional: Other agreements | ||
| *Other co-working agreements that were not captured in the above sections.* | ||
|
|
||
| ## Signatures | ||
| ______________ _______________ | ||
| Date: _________ | ||
| Salma Anany, Tami Gaertner | ||
| Date: oct 21,2024 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some commented code that could be cleaned up in this file.