{"id":44413243,"url":"https://github.com/douglasdcm/tdd_detroid","last_synced_at":"2026-02-12T07:51:07.227Z","repository":{"id":64358087,"uuid":"364789540","full_name":"douglasdcm/tdd_detroid","owner":"douglasdcm","description":"This project aims to exercise the \"code smells\" related to unit tests using an application that simulates a real business. The code will be developed with the Detroit-style TDD technique","archived":false,"fork":false,"pushed_at":"2025-11-14T04:10:03.000Z","size":23438,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-14T04:29:06.166Z","etag":null,"topics":["kubernetes","pyscript","python","tdd"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/douglasdcm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-05-06T04:58:51.000Z","updated_at":"2025-08-20T02:42:35.000Z","dependencies_parsed_at":"2024-04-19T20:25:10.326Z","dependency_job_id":"d1a57c77-4cbc-47c6-bb04-4b8aaf67dc55","html_url":"https://github.com/douglasdcm/tdd_detroid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/douglasdcm/tdd_detroid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasdcm%2Ftdd_detroid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasdcm%2Ftdd_detroid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasdcm%2Ftdd_detroid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasdcm%2Ftdd_detroid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/douglasdcm","download_url":"https://codeload.github.com/douglasdcm/tdd_detroid/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/douglasdcm%2Ftdd_detroid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29361810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T01:03:07.613Z","status":"online","status_checked_at":"2026-02-12T02:00:06.911Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kubernetes","pyscript","python","tdd"],"created_at":"2026-02-12T07:51:04.968Z","updated_at":"2026-02-12T07:51:07.218Z","avatar_url":"https://github.com/douglasdcm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"{Translated from Portuguese to English using AI}\n# College Student Grade Control\n## Introduction\nThis project aims to practice development skills using an application that simulates a real business scenario.\nThe code will be developed using the TDD technique in the Detroit style, hence the name of the repository.\nThe application simulates the control of grades for university students.\n\n# Experimentation\nThis application has been used to exercise skills relates to Python, ORM, TDD, Kubernetes and other tools. Each exercise is hosted in specific branches. This is the list of them:\n- [first_version](https://github.com/douglasdcm/tdd_detroid/tree/first_version): was the first attempt to build the application in Python using TDD. It almost does not use any 3rd-party library, just built-in and personal code. The code is in Portuguese.\n- [postgres_orm](https://github.com/douglasdcm/tdd_detroid/tree/postgres_orm): A similar implementation of the 1st version, but using SqlAlchemy as a ORM and Alembic to handle database migrations. It also uses Docker, Kubernetes, VSCode Live Server for debug, Flask and PyScript. Ti is the most complete and complex architecture.\n- [calico](https://github.com/douglasdcm/tdd_detroid/tree/calico): The attempt to integrate Calico K8s Network and Kubernetes Cluster to allow the communication of containers in different Pods. It is incomplete.\n- [kubernetes](https://github.com/douglasdcm/tdd_detroid/tree/kubernetes): more specialized exercises with Kubernetes, but not so different of `postgres_orm`.\n- [kubernetes-no-postgres](https://github.com/douglasdcm/tdd_detroid/tree/kubernetes-no-postgrest): exercise using Kubernetes and the database PostgreSQL. The other branches use SqLite.\n- [pyscript-postgrest](https://github.com/douglasdcm/tdd_detroid/tree/pyscript-postgrest): The implementation of a Web app using PyScript and Postgres as a REST API (PostgREST). PyScript web pages does not connects to Postgres as the ones created with Javascript do.\n- [architecture](https://github.com/douglasdcm/tdd_detroid/tree/architecture): In this branch I exercised my skills of sofware architecture. I tried to do sufficient design up-front to ilustrate the relationship of the entities and features. I found some inconsistences in the app requirements list that I fixed and replicated to this branch. I also implemented the authentication and authorization features.\n- [architecture-design](https://github.com/douglasdcm/tdd_detroid/tree/architecture-design): In this branch I exercised my skills of sofware architecture using DrawIO, PyReverse to check the code in UML and make many versions of the same code in different approaches. I noticed many issues in the requirements while drawing the diagrams like State Machines, Sequence Diagram and UMLs.\n- [c-implementation-1](https://github.com/douglasdcm/tdd_detroid/tree/c-implementation-1): First version of the App in C language. The other ones use Python. \n\n# Application specification\n## Architecture\n[Slides with specifications (Libre Office file)](architecture.odp)\n\n\nBelow is the specification of the application:\nDefinition of Done:\n1. Unit tests cover the functionality.\n2. The functionality is developed to be used via CLI (Command Line Interface).\n3. Data is being saved in the database.\n## Deliverables\nConstruction of the basic functions of the system\n1. Each student will have a grade control called \"grade point average\" (GPA).\n2. The GPA is the average of the student's grades in the ~~courses~~ subjects already taken.\n3. The student is considered approved at the university if their GPA is above or equal to 7 (seven) at the end of the course.\n4. If a student takes the same subject more than once, the highest grade will be considered in the GPA calculation.\n\u003c!-- Required setup to allow enrollments --\u003e\n5. Initially, the university will have 3 courses with 3 subjects each.\n6. Subjects in each course may have the same names but will be differentiated by a unique identifier (niu).\n7. The system must calculate the student's situation taking into account the subjects taken and the total number of subjects in each course.\n8. The student can only take subjects from their course.\n9. Courses must have a unique identifier and name.\n\u003c!-- \nSame as requirement 6\n10. ~~Course~~ Subject names can be the same, but the unique identifier for each ~~course~~ subject must be different. --\u003e\n\u003c!-- \nSame as requirement 6\n11. A course cannot have two subjects with the same name, even if the niu is different. --\u003e\n12. The maximum grade for a student in a subject is 10.\n13. The minimum grade for a student in a subject is 0.\n14. The student can lock the course, and in this case, they cannot update their grades or the subjects taken.\n15.  The course coordinator can list the students, grades in each subject, and GPAs of the students.\n16. The student can unlock the course, and their situation returns to the previous state.\n17. Students must have names.\n18. The general coordinator can list all courses, students, grades in each subject, and GPAs of each student.\n19. The course coordinator can remove subjects, and in this case, students cannot update their grades in that subject.\n20. Students can only update their grades in the subjects they are enrolled in.\n21. Course and subject names must have a maximum of 10 letters.\n\u003c!-- What are units? Not clear --\u003e\n22. Courses can have the same names if they are from different units.\n\u003c!-- The student can do it any time. Don't need to wait the next semester --\u003e\n23. The student can only enroll in one course.\n24. The coordinator can coordinate a maximum of three courses.\n25. The coordinator can list the students, subjects, grades, and GPAs of all their courses (coordinator of more than one course).\n\u003c!-- this requirement wasn't informing the actor. Figured out while making the diagrams of use cases --\u003e\n\u003c!-- 26. The course can be canceled. --\u003e\n26. The course can be canceled by the general cordinator.\n27. Canceled courses cannot accept student enrollments.\n\u003c!-- How o set coordinators? --\u003e\n28. Canceled courses cannot have coordinators.\n29. Each subject can have a maximum of 30 enrolled students.\n\u003c!-- ... 3 subjects per semester --\u003e\n30. The student must enroll in a minimum of 3 subjects.\n31. If the number of subjects missing for a student is less than 3, they can enroll in 1 subject.\n32. If the student does not enroll in the minimum number of subjects per semester, they will be automatically ~~failed~~ locked.\n33. The student must have a validated CPF (Brazilian Social Security Number) in the external CPF validation system (government system).\n34. Add the course name to the coordinator's reports.\n35. The students are only approved if they achieve the minimum grade in all course subjects, even if their GPA is above the minimum.\n\u003c!-- The user can create student with cpf and name. Considering DONE --\u003e\n36. The ~~user~~ student (person) must be able to create students with basic information.\n\u003c!-- The basic information is enough for enrollment --\u003e\n37. ~~The user must be able to enroll the student in a course.~~\n38. The ~~user~~ general coordinator must be able to create courses with the minimum number of subjects.\n39. The administrator, and only the administrator, must be able to list all students with detailed information (all available information).\n40. The administrator, and only the administrator, must be able to list all courses with all available information.\n41. The administrator, and only the administrator, must be able to list the list of students per course.\n42. The administrator, and only the administrator, must be able to list the list of subjects per student.\n43. The students must be able to list all subjects only from their course.\n44. The students must be able to list all subjects they have taken.\n45. The students must be able to list the missing subjects.\n\u003c!-- The course coordinator is not an entity yet. What are his/her properties? --\u003e\n46. The administrator must be able to list all course coordinators with available information.\n47. The student has 10 semesters to graduate.\n48. If the student exceeds the 10 semesters, they are automatically failed.\n\u003c!-- Duplicated with requirement 24 --\u003e\n49. ~~The coordinator can only coordinate a maximum of 3 courses~~.\n50. The general coordinator cannot be a coordinator of courses.\n\u003c!-- # Features add after architecture analisys\nThese features were introduced after analysis in architecture and specifications. Some features does not make sense without them: --\u003e\n51. The teacher sets thes grade for all students of his/her subjects\n52. Each teacher may teach in 3 subjects at maximum\n53. The general coordinator is responsible to open and close the semesters\n54. The general coordinator is responible to add students to enrollment list after manual analysis of thier documentation\n55. The corse coordinator is responsible to add new subjects to his/her course\n56. The general coordinator is responsible to add new courses to the university\n57. The student, teacher and coordinators need to authenticate with valid credentials before perfom any action in the system\n58. The course need a minimum enrollment of 100 students\n59. The subject need a minimum enrollment of 10 students\n60. Student can enroll to course again after fail it losing all his/her history\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglasdcm%2Ftdd_detroid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdouglasdcm%2Ftdd_detroid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdouglasdcm%2Ftdd_detroid/lists"}