From d70c98cbef5c86a2f6af9b08f7145dc41c2bfcb1 Mon Sep 17 00:00:00 2001 From: Adam Ma Date: Thu, 7 Nov 2024 03:26:15 -0500 Subject: [PATCH 01/15] docs(changelog): update the changelog --- CHANGELOG.md | 105 ++++++++++++--------------------------------------- 1 file changed, 24 insertions(+), 81 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54b01e6dd..398bd0638 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,132 +1,72 @@ -# 0.3.0 (2024-11-07) +# [0.3.0](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/compare/v0.2.0...v0.3.0) (2024-11-07) ### Bug Fixes -* **[cd]:** add sudo before docker commands ([7566b1d](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/7566b1d820d6fc6e334f59bab7cbaad210849cb1)) -* add emojis ([3b352f1](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/3b352f116654a7a6dab934dc6f56f6ec4e0a96f4)) * **cd:** change the EC2 ip to a Github secret ([dd55d38](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/dd55d38bfa789713cdd39cae8f569265ff18b958)) -* change pages ([0fc4403](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/0fc4403c73553e5436b6b56dccb29259ca607494)) -* **configuration:** fix build errors ([c68eeb3](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/c68eeb3935e3b372466e83aa4aff7cce06c69ab7)) -* **configuration:** hide the license badge ([5073059](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/5073059ca76dc4632be4ef3b706be0fac030fb6a)) -* **configuration:** update badges ([47e28bf](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/47e28bfff23965f1f9cbe8f633d7444426d70c0f)) -* ignore the .vite folder ([d204ef0](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/d204ef0574c2b4efdaacd2d47614aa8a0b509ca5)) ### Features -* Backend, Database upload and Resume embedding. ([4f6f2e4](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/4f6f2e4111cf8c7afe7d08c7081a0215e6cd75a4)) -* add CORS for API calls, add requirements.txt for faster deployment ([ff95333](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/ff9533391f6d23dc9525bd538da0c842c5862801)) -* add module resume upload and parse ([e3ea242](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/e3ea242c69bd57848f3318c91b67c5ecd7034d72)) * add path and working-directory ([6edc47d](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/6edc47d7aedc884cfc7b4ddf849ae4cd8ed5695f)) * add resume analysis with JD ([95b973a](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/95b973ab4bc462642e92e897592ef49679692f43)) -* add testing for analyze(), remove TODO ([54eecc1](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/54eecc1390bd95485ecc387ac90a59d2a0d47172)) -* add textarea and upload files ([db2effc](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/db2effc4306e366fed205fc7247e9b4b3500f835)) +* add unit test for parser ([78559de](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/78559deeda7f3c643cd4030acf6141b45dd9f7bb)) * add XSS protection for lab3 ([cec0258](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/cec0258e5098eb12209189226f524c1a3259ab67)) -* adjust code for backend api and better visualization ([b9f8093](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/b9f8093c53fc185f801b79f9bd677749293516ec)) -* adjust code for backend api and better visualization ([14febaf](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/14febafe0f84c94417ce938e6ab9015360dceab2)) -* adjust code for backend api and better visualization ([430be43](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/430be439d86548beb8af605f00321618c33d6af4)) -* adjust code for backend api and better visualization ([b7a8f90](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/b7a8f905dd0e1a26bcb6786182d00f90813a9243)) -* analyze resume ([5e1b41a](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/5e1b41a9ff0dead4a092930a788236804038dfb5)) -* basic layout ([9251331](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/925133191fcd56f09fc6c0e16ebb84ac95a6c7a6)) -* **configuration:** add a plugin to apply the Conventional commit ([7e2612d](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/7e2612dc36a088b48146dc27f5bc88120a8a2307)), closes [#18](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/issues/18) -* **configuration:** add auto deploy ([1e06a83](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/1e06a837c3f40c9e8fe567ba2e2299994c603d6c)) -* **configuration:** add config.json ([95d5e9e](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/95d5e9ea85baa453bafb20cd9a7d77487108cb38)) -* **configuration:** integrate docker for fe_repo ([5ace0ea](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/5ace0ea2b8c25f6f416a535dec24ddfc3ec09dee)) -* **configuration:** integrate the docker-compose ([77811ed](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/77811ed4955c015d00ef3a745ce98bc550682429)) -* **configuration:** integrate vitest and ci ([dca6163](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/dca616351b382cc79d8a2d981b5a3403ca8f2aad)) -* Enhance the README.md ([5fa632d](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/5fa632da3d2798dd4f63b53f301dfe4d9eeebba6)) -* evaluator - return result in json ([d5dbe5e](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/d5dbe5ee942a42653bf11f513d1f5f4f11ed022b)) -* first version of fe ([23ac3a1](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/23ac3a101e3dec0fbe8a4ec2fa8341c17c81a9d6)) +* CI for E2E ([ba928e7](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/ba928e7a97133378ad5b157b45153becbd3254d3)) +* e2e test ([fe10060](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/fe10060f33e4930b83c59a6620326d4b7cd7348e)) * implement /ask api ([7196d29](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/7196d290905a39b43dba9040724795491bdb9e5c)) * implement /login api ([6a2918e](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/6a2918ebf28bcebc164b3cf3926a54d745300df8)) * implement /login api ([9fbb5d6](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/9fbb5d6d61757e8d1f2f5609882ec5acca6a1eee)) * implement /login api ([89d01b2](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/89d01b21fc2a874e01529a306b1acf5388acc484)) -* implement login functionality ([68b24f1](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/68b24f135fb7bb0ecf838ea104941933ca0b9a79)) -* implement login functionality ([5b95291](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/5b952911ab9ce29e43749f42e817df1699d861c0)) -* implement login functionality ([6f1fe19](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/6f1fe1903fa887579309bd9507146cc49b520e01)) -* implement Q&A state prompt ([6eaf4bb](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/6eaf4bb7b49e39d60253eda0e6856471619e7931)) +* integration test - resume evaluate ([ba01186](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/ba0118678f068c20e446da710586999bd03f9037)) * job description keywords extraction ([bac4e90](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/bac4e901223d0a6428bca49ca6229eb40a539498)) * just a showcase ([9da26aa](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/9da26aab8120619bef2d87899b33a3f6f3c0f65a)) * **lab3:** docker for be and test in docker ([79bc522](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/79bc52251b64a889e37c3cba6ddef6d3e46523a4)) * move backend code from /code to /be_repo ([793eb89](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/793eb89e4fc91eb99b8f933b551b52906b1b8d29)) -* PR and ISSUE templates ([e99d544](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/e99d54485b0d356183967d23ab1bd58ec0f9fa93)) -* Preprocessing, use ChatGPT to evaluate the resume dataset ([75ba183](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/75ba183ebd5988f6935e08c2a66c5e5f77ba27ee)) -* put response in the correct position ([41a06c6](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/41a06c6691af2184d1ddb67ef2f52462b726426f)) -* resume analysis ([5467367](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/54673670f3b2aa47386c523be3b31c59481ac938)) +* new logic for compute correlated score ([7d67acb](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/7d67acb4d92de18a0999c8c305c7b08878803966)) * resume-evaluate-with-JD Step1 ([c7e9476](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/c7e94767dfdc62cf93debd9359ba09a947e9d037)) * resume-evaluate-with-JD Step2 ([c56cebb](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/c56cebbbce4fba48814bf6cfbd2af13098ef95f9)) * save API_KEY in MongoDB ([a96a551](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/a96a5515c52fcec2c91dd3803b59fccb9f192286)) -* solve build error ([7c394cd](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/7c394cd3b28329aa23123707aee00a5c686b123e)) -* solve lint check ([2f497f3](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/2f497f36ed0d9042d64bfc755162113d8a7f4d40)) -* solve vite check ([0ca4a87](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/0ca4a87c68623c9dc265e61c73b0a680ce6124b3)) -* transform styles into tailwind classNames ([c0877d1](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/c0877d1121e4f1986c9560c048a4681f53869801)) -* transform styles into tailwind classNames ([91df546](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/91df546145ca02f4f9384956561023519b17ff4a)) * unit test - evaluator ([2decdf2](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/2decdf2d122a8bca18169a1ba1bc87a3882c49fe)) * unit test for upload ([ff6b9ea](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/ff6b9eaf741df4d3017017c5623dd4a287cf7491)) -* update the README and add the BE design ([a304e80](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/a304e80b100270933a8224225565ef70841d08ee)) -* update the team.md ([5cdf566](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/5cdf5660a62a9810e6fb19888fd9aa439936b490)) -# [0.2.0](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/compare/v0.1.2...v0.2.0) (2024-10-14) +# [0.2.0](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/compare/5cdf5660a62a9810e6fb19888fd9aa439936b490...v0.2.0) (2024-10-14) ### Bug Fixes * **[cd]:** add sudo before docker commands ([7566b1d](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/7566b1d820d6fc6e334f59bab7cbaad210849cb1)) - - -### Features - -* Backend, Database upload and Resume embedding. ([4f6f2e4](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/4f6f2e4111cf8c7afe7d08c7081a0215e6cd75a4)) -* add CORS for API calls, add requirements.txt for faster deployment ([ff95333](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/ff9533391f6d23dc9525bd538da0c842c5862801)) -* **configuration:** add config.json ([95d5e9e](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/95d5e9ea85baa453bafb20cd9a7d77487108cb38)) -* evaluator - return result in json ([d5dbe5e](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/d5dbe5ee942a42653bf11f513d1f5f4f11ed022b)) -* resume analysis ([5467367](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/54673670f3b2aa47386c523be3b31c59481ac938)) - - - -## [0.1.2](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/compare/v0.1.1...v0.1.2) (2024-10-11) - - -### Bug Fixes - -* **configuration:** hide the license badge ([5073059](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/5073059ca76dc4632be4ef3b706be0fac030fb6a)) -* **configuration:** update badges ([47e28bf](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/47e28bfff23965f1f9cbe8f633d7444426d70c0f)) -* ignore the .vite folder ([d204ef0](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/d204ef0574c2b4efdaacd2d47614aa8a0b509ca5)) - - -### Features - -* add testing for analyze(), remove TODO ([54eecc1](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/54eecc1390bd95485ecc387ac90a59d2a0d47172)) -* analyze resume ([5e1b41a](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/5e1b41a9ff0dead4a092930a788236804038dfb5)) -* **configuration:** add auto deploy ([1e06a83](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/1e06a837c3f40c9e8fe567ba2e2299994c603d6c)) -* transform styles into tailwind classNames ([c0877d1](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/c0877d1121e4f1986c9560c048a4681f53869801)) -* transform styles into tailwind classNames ([91df546](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/91df546145ca02f4f9384956561023519b17ff4a)) - - - -## [0.1.1](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/compare/5cdf5660a62a9810e6fb19888fd9aa439936b490...v0.1.1) (2024-10-11) - - -### Bug Fixes - * add emojis ([3b352f1](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/3b352f116654a7a6dab934dc6f56f6ec4e0a96f4)) * change pages ([0fc4403](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/0fc4403c73553e5436b6b56dccb29259ca607494)) * **configuration:** fix build errors ([c68eeb3](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/c68eeb3935e3b372466e83aa4aff7cce06c69ab7)) +* **configuration:** hide the license badge ([5073059](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/5073059ca76dc4632be4ef3b706be0fac030fb6a)) +* **configuration:** update badges ([47e28bf](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/47e28bfff23965f1f9cbe8f633d7444426d70c0f)) +* ignore the .vite folder ([d204ef0](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/d204ef0574c2b4efdaacd2d47614aa8a0b509ca5)) ### Features +* Backend, Database upload and Resume embedding. ([4f6f2e4](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/4f6f2e4111cf8c7afe7d08c7081a0215e6cd75a4)) +* add CORS for API calls, add requirements.txt for faster deployment ([ff95333](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/ff9533391f6d23dc9525bd538da0c842c5862801)) * add module resume upload and parse ([e3ea242](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/e3ea242c69bd57848f3318c91b67c5ecd7034d72)) +* add testing for analyze(), remove TODO ([54eecc1](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/54eecc1390bd95485ecc387ac90a59d2a0d47172)) * add textarea and upload files ([db2effc](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/db2effc4306e366fed205fc7247e9b4b3500f835)) +* adjust code for backend api and better visualization ([b9f8093](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/b9f8093c53fc185f801b79f9bd677749293516ec)) +* adjust code for backend api and better visualization ([14febaf](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/14febafe0f84c94417ce938e6ab9015360dceab2)) +* adjust code for backend api and better visualization ([430be43](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/430be439d86548beb8af605f00321618c33d6af4)) +* adjust code for backend api and better visualization ([b7a8f90](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/b7a8f905dd0e1a26bcb6786182d00f90813a9243)) +* analyze resume ([5e1b41a](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/5e1b41a9ff0dead4a092930a788236804038dfb5)) * basic layout ([9251331](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/925133191fcd56f09fc6c0e16ebb84ac95a6c7a6)) * **configuration:** add a plugin to apply the Conventional commit ([7e2612d](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/7e2612dc36a088b48146dc27f5bc88120a8a2307)), closes [#18](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/issues/18) +* **configuration:** add auto deploy ([1e06a83](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/1e06a837c3f40c9e8fe567ba2e2299994c603d6c)) +* **configuration:** add config.json ([95d5e9e](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/95d5e9ea85baa453bafb20cd9a7d77487108cb38)) * **configuration:** integrate docker for fe_repo ([5ace0ea](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/5ace0ea2b8c25f6f416a535dec24ddfc3ec09dee)) * **configuration:** integrate the docker-compose ([77811ed](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/77811ed4955c015d00ef3a745ce98bc550682429)) * **configuration:** integrate vitest and ci ([dca6163](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/dca616351b382cc79d8a2d981b5a3403ca8f2aad)) * Enhance the README.md ([5fa632d](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/5fa632da3d2798dd4f63b53f301dfe4d9eeebba6)) +* evaluator - return result in json ([d5dbe5e](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/d5dbe5ee942a42653bf11f513d1f5f4f11ed022b)) * first version of fe ([23ac3a1](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/23ac3a101e3dec0fbe8a4ec2fa8341c17c81a9d6)) * implement login functionality ([68b24f1](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/68b24f135fb7bb0ecf838ea104941933ca0b9a79)) * implement login functionality ([5b95291](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/5b952911ab9ce29e43749f42e817df1699d861c0)) @@ -135,9 +75,12 @@ * PR and ISSUE templates ([e99d544](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/e99d54485b0d356183967d23ab1bd58ec0f9fa93)) * Preprocessing, use ChatGPT to evaluate the resume dataset ([75ba183](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/75ba183ebd5988f6935e08c2a66c5e5f77ba27ee)) * put response in the correct position ([41a06c6](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/41a06c6691af2184d1ddb67ef2f52462b726426f)) +* resume analysis ([5467367](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/54673670f3b2aa47386c523be3b31c59481ac938)) * solve build error ([7c394cd](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/7c394cd3b28329aa23123707aee00a5c686b123e)) * solve lint check ([2f497f3](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/2f497f36ed0d9042d64bfc755162113d8a7f4d40)) * solve vite check ([0ca4a87](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/0ca4a87c68623c9dc265e61c73b0a680ce6124b3)) +* transform styles into tailwind classNames ([c0877d1](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/c0877d1121e4f1986c9560c048a4681f53869801)) +* transform styles into tailwind classNames ([91df546](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/91df546145ca02f4f9384956561023519b17ff4a)) * update the README and add the BE design ([a304e80](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/a304e80b100270933a8224225565ef70841d08ee)) * update the team.md ([5cdf566](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/commit/5cdf5660a62a9810e6fb19888fd9aa439936b490)) From edcbdc31e9b2ad954da1ff7fb0f36e40f314f595 Mon Sep 17 00:00:00 2001 From: Adam Ma Date: Thu, 7 Nov 2024 04:40:53 -0500 Subject: [PATCH 02/15] fix(cd): force remove container --- docker_auto_start.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker_auto_start.sh b/docker_auto_start.sh index b178b45ff..d7a8a72b0 100644 --- a/docker_auto_start.sh +++ b/docker_auto_start.sh @@ -22,9 +22,9 @@ stop_and_remove() { echo "Stopping the current container for $image_tag" CURRENT_CONTAINER=$(docker ps -q -f ancestor=$image_tag) if [ -n "$CURRENT_CONTAINER" ]; then - docker stop $CURRENT_CONTAINER + docker stop $CURRENT_CONTAINER -f echo "Removing the current container for $CURRENT_CONTAINER" - docker rm $CURRENT_CONTAINER + docker rm $CURRENT_CONTAINER -f else echo "No running container found for $REPO." fi @@ -50,7 +50,7 @@ pull_and_start() { } # Main function to handle command-line arguments -function main() { +main() { case "$1" in stop) stop_and_remove From 097b84f7bb8ed3f69ba162a4eee35d7710efe084 Mon Sep 17 00:00:00 2001 From: Stanford997 <545255309@qq.com> Date: Thu, 7 Nov 2024 10:40:17 -0500 Subject: [PATCH 03/15] Merging! --- .github/workflows/ci_be.yml | 42 +++++++++++++--- .github/workflows/ci_e2e.yml | 4 +- README.md | 7 +++ be_repo/app.py | 2 +- be_repo/requirements.txt | 4 +- be_repo/tests/test_e2e.py | 92 ++++++++++++++++++------------------ 6 files changed, 93 insertions(+), 58 deletions(-) diff --git a/.github/workflows/ci_be.yml b/.github/workflows/ci_be.yml index 1b8e794f7..9645b4c87 100644 --- a/.github/workflows/ci_be.yml +++ b/.github/workflows/ci_be.yml @@ -7,10 +7,13 @@ on: - 'be_repo/**' permissions: - contents: read + contents: write + checks: write + pull-requests: write jobs: - build: + live-test: + name: Live Test runs-on: ubuntu-latest defaults: @@ -19,15 +22,15 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.10 + - name: Set up Python 3.9 uses: actions/setup-python@v3 with: - python-version: "3.10" + python-version: "3.9" - name: Install dependencies run: | python -m pip install --upgrade pip - pip install flake8 pytest + pip install flake8 pytest pytest-cov if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 @@ -37,6 +40,31 @@ jobs: # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Test with pytest + - name: Build coverage file run: | - pytest --ignore=tests/test_e2e.py + pytest --ignore=tests/test_e2e.py --junitxml=pytest.xml \ + --cov=app --cov=modules \ + --cov-report=term-missing:skip-covered tests/ | tee pytest-coverage.txt + + - name: Pytest coverage comment + id: coverageComment + uses: MishaKav/pytest-coverage-comment@main + with: + pytest-coverage-path: ./be_repo/pytest-coverage.txt + junitxml-path: ./be_repo/pytest.xml + + - uses: actions/checkout@v3 + with: + persist-credentials: false + fetch-depth: 0 + + - name: Update Readme with Coverage Html + run: | + sed -i '//,//c\\n\${{ steps.coverageComment.outputs.coverageHtml }}\n' ../README.md + + - name: Commit & Push changes to Readme + uses: actions-js/push@master + with: + branch: dev/backend + message: Update coverage on Readme + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci_e2e.yml b/.github/workflows/ci_e2e.yml index 34cb16105..2e00c0a30 100644 --- a/.github/workflows/ci_e2e.yml +++ b/.github/workflows/ci_e2e.yml @@ -69,11 +69,11 @@ jobs: run: sudo apt purge google-chrome-stable - name: Installing all necessary packages - run: pip install chromedriver-autoinstaller selenium pyvirtualdisplay + run: pip install chromedriver-autoinstaller selenium pyvirtualdisplay pytest - name: Install xvfb run: sudo apt-get install xvfb - name: Run E2E tests run: | - python ./be_repo/tests/test_e2e.py \ No newline at end of file + pytest ./be_repo/tests/test_e2e.py \ No newline at end of file diff --git a/README.md b/README.md index 6f15a4ee6..6fdf35cc0 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,16 @@ # CVCoach [![CI for FE](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/actions/workflows/ci_fe.yml/badge.svg)](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/actions/workflows/ci_fe.yml) +[![CI for BE](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/actions/workflows/ci_be.yml/badge.svg)](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/actions/workflows/ci_be.yml) +[![CI for E2E](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/actions/workflows/ci_e2e.yml/badge.svg)](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/actions/workflows/ci_e2e.yml) + [![CD Pipeline](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/actions/workflows/cd.yml/badge.svg)](https://github.com/BUMETCS673/seprojects-cs673a2f24_team5/actions/workflows/cd.yml) [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org) + +Coverage
Coverage Report
FileStmtsMissCoverMissing
app.py853658%34–35, 40–48, 52–82, 88, 92, 97, 101, 112, 117, 119, 124, 128, 136
modules
   evaluator.py561475%96–97, 104–122
   parser.py12192%20
   upload.py23387%23, 39–40
TOTAL1765469% 
+ +

docker-pull-count diff --git a/be_repo/app.py b/be_repo/app.py index f27666e4b..024449fc7 100644 --- a/be_repo/app.py +++ b/be_repo/app.py @@ -23,7 +23,7 @@ PERMANENT_SESSION_LIFETIME=timedelta(minutes=30), ) -GOOGLE_CLIENT_ID = '' +GOOGLE_CLIENT_ID = '120137358324-l62fq2hlj9r31evvitg55rcl4rf21udd.apps.googleusercontent.com' # Test MongoDB connection try: diff --git a/be_repo/requirements.txt b/be_repo/requirements.txt index 86f5eaccc..1ef059715 100644 --- a/be_repo/requirements.txt +++ b/be_repo/requirements.txt @@ -8,4 +8,6 @@ qdrant_client==1.12.0 tqdm==4.66.2 selenium==4.26.1 google-auth==2.36.0 -google-auth-oauthlib==1.2.1 \ No newline at end of file +google-auth-oauthlib==1.2.1 +chromedriver-autoinstaller==0.6.4 +pyvirtualdisplay \ No newline at end of file diff --git a/be_repo/tests/test_e2e.py b/be_repo/tests/test_e2e.py index 32807d195..ebf877b55 100644 --- a/be_repo/tests/test_e2e.py +++ b/be_repo/tests/test_e2e.py @@ -1,60 +1,69 @@ +import pytest +import os +import time from selenium import webdriver import chromedriver_autoinstaller from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait -from selenium.webdriver.chrome.options import Options -from selenium.webdriver.chrome.service import Service from selenium.webdriver.support import expected_conditions as EC -import time -import os from pyvirtualdisplay import Display FRONTEND_URL = "http://localhost:3001" +keywords = [ + "Analysis Result", + "Consistency and Chronology", + "Education", + "Project and Work Experience", + "Resume Structure and Presentation", + "Skills and Certifications", + "Soft Skills" +] -display = Display(visible=0, size=(800, 800)) -display.start() -chromedriver_autoinstaller.install() +@pytest.fixture(scope="module") +def driver(): + # Start display + display = Display(visible=0, size=(800, 800)) + display.start() -chrome_options = webdriver.ChromeOptions() -options = [ - "--window-size=1200,1200", - "--ignore-certificate-errors" - "--headless", -] + # Install and set up Chrome driver + chromedriver_autoinstaller.install() + chrome_options = webdriver.ChromeOptions() + chrome_options.add_argument("--window-size=1200,1200") + chrome_options.add_argument("--ignore-certificate-errors") + chrome_options.add_argument("--headless") -for option in options: - chrome_options.add_argument(option) + driver = webdriver.Chrome(options=chrome_options) + yield driver + driver.quit() + display.stop() -driver = webdriver.Chrome(options=chrome_options) -driver.get(FRONTEND_URL) -wait = WebDriverWait(driver, 20) +@pytest.fixture +def wait(driver): + return WebDriverWait(driver, 20) -try: - wait.until( - lambda driver: driver.execute_script("return document.readyState") == "complete" - ) - # Google login - # google_login_button = driver.find_element(By.CSS_SELECTOR, '[aria-labelledby="button-label"]') - # google_login_button.click() +def test_resume_upload(driver, wait): + driver.get(FRONTEND_URL) + wait.until(lambda d: d.execute_script("return document.readyState") == "complete") - # Upload Resume + # Upload resume upload_div = driver.find_element(By.CSS_SELECTOR, "div[style*='cursor: pointer'][style*='display: flex']") - # upload_div.click() - file_input = wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, "input[type='file']"))) file_path = os.path.join(os.path.dirname(__file__), 'test_resume.pdf') file_input.send_keys(file_path) + # Check for alert after upload alert = wait.until(EC.alert_is_present()) alert_text = alert.text assert "Resume uploaded successfully" in alert_text alert.accept() + +def test_analyze_resume(driver, wait): # Analyze resume analyze_button = driver.find_element(By.CLASS_NAME, "cursor-pointer") analyze_button.click() @@ -62,40 +71,29 @@ submit_button = driver.find_element(By.CLASS_NAME, "mt-6") submit_button.click() - time.sleep(20) - - keywords = [ - "Analysis Result", - "Consistency and Chronology", - "Education", - "Project and Work Experience", - "Resume Structure and Presentation", - "Skills and Certifications", - "Soft Skills" - ] + time.sleep(20) # Ensure analysis completes elements = driver.find_elements(By.CLASS_NAME, "font-bold") content_text = " ".join([element.text for element in elements]) for keyword in keywords: count = content_text.count(keyword) - assert count == 1, f"'{keyword}' does not appear exactly twice in the content (found {count} times)" + assert count == 1, f"'{keyword}' does not appear exactly once in the content (found {count} times)" + +def test_analyze_resume_with_jd(driver, wait): # Analyze resume with JD + analyze_button = driver.find_element(By.CLASS_NAME, "cursor-pointer") analyze_button.click() - textarea = wait.until( - EC.presence_of_element_located((By.CSS_SELECTOR, "textarea.w-full.h-40.p-4.border-2")) - ) + textarea = wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, "textarea.w-full.h-40.p-4.border-2"))) textarea.send_keys("Sample job description text") + submit_button = driver.find_element(By.CLASS_NAME, "mt-6") submit_button.click() - time.sleep(20) + time.sleep(20) # Ensure analysis completes elements = driver.find_elements(By.CLASS_NAME, "font-bold") content_text = " ".join([element.text for element in elements]) for keyword in keywords: count = content_text.count(keyword) assert count == 2, f"'{keyword}' does not appear exactly twice in the content (found {count} times)" - -finally: - driver.quit() From 596603bacf62b34ba89229fbd4d7a3f08903ebf6 Mon Sep 17 00:00:00 2001 From: Stanford997 <545255309@qq.com> Date: Mon, 4 Nov 2024 22:25:11 -0500 Subject: [PATCH 04/15] feat: integration test - resume evaluate --- test.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test.py diff --git a/test.py b/test.py new file mode 100644 index 000000000..59b31d68e --- /dev/null +++ b/test.py @@ -0,0 +1,30 @@ +@patch('fetch_file') +def test_file_to_string(file, app): + file = 'mock_file' # File content + file_to_text = file_to_string(text) + + assert file_to_text == 'abcdefg' + +@patch('de_encryption_1') +def test_de_encryption(text, app): + text = 'abcdefg' # Set up the application context + encrypted_text = encryption_1(text) + + assert encrypted_text == 'gfedcba' + + original_text = decryption_1(encrypted_text) + + assert encrypted_text == 'abcdefg' + + +@patch('de_encryption_2') +def test_de_encryption(text, app): + text = 'abcdefg' # Set up the application context + encrypted_text = encryption_2(text) + + assert encrypted_text == '123456' + + original_text = decryption_2(encrypted_text) + + assert encrypted_text == 'abcdefg' + From 522eaaebdc4a648210131dd9e6a7b364daa34e65 Mon Sep 17 00:00:00 2001 From: Stanford997 <545255309@qq.com> Date: Mon, 4 Nov 2024 22:26:32 -0500 Subject: [PATCH 05/15] remove unnecessary file --- test.py | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 test.py diff --git a/test.py b/test.py deleted file mode 100644 index 59b31d68e..000000000 --- a/test.py +++ /dev/null @@ -1,30 +0,0 @@ -@patch('fetch_file') -def test_file_to_string(file, app): - file = 'mock_file' # File content - file_to_text = file_to_string(text) - - assert file_to_text == 'abcdefg' - -@patch('de_encryption_1') -def test_de_encryption(text, app): - text = 'abcdefg' # Set up the application context - encrypted_text = encryption_1(text) - - assert encrypted_text == 'gfedcba' - - original_text = decryption_1(encrypted_text) - - assert encrypted_text == 'abcdefg' - - -@patch('de_encryption_2') -def test_de_encryption(text, app): - text = 'abcdefg' # Set up the application context - encrypted_text = encryption_2(text) - - assert encrypted_text == '123456' - - original_text = decryption_2(encrypted_text) - - assert encrypted_text == 'abcdefg' - From 8ecc3ff2381d45ec6072b8f20ee562501fafecef Mon Sep 17 00:00:00 2001 From: zihan zhou <95243748+andyasdd1@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:03:16 -0500 Subject: [PATCH 06/15] Update: app.py Add in login methods for backend --- be_repo/app.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/be_repo/app.py b/be_repo/app.py index 024449fc7..68e1bbb79 100644 --- a/be_repo/app.py +++ b/be_repo/app.py @@ -36,11 +36,11 @@ @app.route('/upload', methods=['POST', 'OPTIONS']) -def upload_resume(): +def upload_resume(): if request.method == 'OPTIONS': # Allows the preflight request to succeed return jsonify({'status': 'OK'}), 200 - + user_id = request.form.get('user_id') if not user_id: return jsonify({"error": "No user ID provided."}), 400 @@ -52,15 +52,15 @@ def login(): if request.method == 'OPTIONS': # Allows the preflight request to succeed return jsonify({'status': 'OK'}), 200 - + token = request.form.get('access_token') if not token: return jsonify({'status': 'error', 'message': 'ID token is missing'}), 400 - + try: # Verify the token with Google idinfo = id_token.verify_oauth2_token(token, google_requests.Request(), GOOGLE_CLIENT_ID) - + if idinfo['aud'] != GOOGLE_CLIENT_ID: return jsonify({'status': 'error', 'message': 'Token audience mismatch'}), 400 @@ -70,12 +70,12 @@ def login(): name = idinfo.get('name', 'No name available') # Create a session or JWT for the user - session.permanent = True + session.permanent = True session['user'] = {'userid': userid, 'email': email, 'name': name} # Respond with success and optional user data return jsonify({'status': 'success', 'email': email, 'name': name}), 200 - + except ValueError as e: # Token verification failed print(f"Error verifying token: {str(e)}") @@ -86,11 +86,11 @@ def resume_evaluate(): if request.method == 'OPTIONS': # Allows the preflight request to succeed return jsonify({'status': 'OK'}), 200 - + user_id = request.form.get('user_id') if not user_id: return jsonify({"error": "No user ID provided."}), 400 - + # Load resume from database resume = resume_collection.find_one({"user_id": user_id}) if not resume: @@ -110,7 +110,7 @@ def resume_evaluate_with_JD(): if request.method == 'OPTIONS': # Allows the preflight request to succeed return jsonify({'status': 'OK'}), 200 - + user_id = request.form.get('user_id') jd_text = request.form.get('jd_text') if not user_id: From dbaea6de9e6e926fd5ca40921e2cc95ccc5a70b7 Mon Sep 17 00:00:00 2001 From: Stanford997 <545255309@qq.com> Date: Wed, 6 Nov 2024 18:30:03 -0500 Subject: [PATCH 07/15] feat: e2e test --- fe_repo/src/pages/ChatBox.tsx | 48 +++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/fe_repo/src/pages/ChatBox.tsx b/fe_repo/src/pages/ChatBox.tsx index 9dec15c94..801b03a41 100644 --- a/fe_repo/src/pages/ChatBox.tsx +++ b/fe_repo/src/pages/ChatBox.tsx @@ -33,30 +33,30 @@ export const ChatBox = ({onSendMessage, onAnalyze}: IChatBoxProps) => { return ( -

- {/* Overlay and Modal for Job Description */ - showPrompt && ( - <> -
setShowPrompt(false)} - /> -
-

Enter a Job Description

-