From da900182ddcd7efd282ead8bf9f785d4dcf2e99a Mon Sep 17 00:00:00 2001 From: _Kevin_Zhang_ <49049813+kevinrczhang@users.noreply.github.com> Date: Thu, 24 Oct 2024 17:42:35 -0400 Subject: [PATCH 1/8] Create django.yml --- .github/workflows/django.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/django.yml diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml new file mode 100644 index 0000000..9766b45 --- /dev/null +++ b/.github/workflows/django.yml @@ -0,0 +1,30 @@ +name: Django CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.7, 3.8, 3.9] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Run Tests + run: | + python manage.py test From c0b97a40c6254a07b985f46c992e45edc2a4fb54 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 24 Oct 2024 17:48:27 -0400 Subject: [PATCH 2/8] test github actions file --- .github/workflows/django.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 9766b45..be4f76b 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -13,7 +13,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9, 3.10, 3.11, 3.12] steps: - uses: actions/checkout@v4 @@ -27,4 +27,5 @@ jobs: pip install -r requirements.txt - name: Run Tests run: | - python manage.py test + cd core + python manage.py test \ No newline at end of file From ee1fb51e86b8f75ccc15aefe1fa5649f56bb5cca Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 24 Oct 2024 17:49:21 -0400 Subject: [PATCH 3/8] remove python version --- .github/workflows/django.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index be4f76b..d975918 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -13,7 +13,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.7, 3.8, 3.9, 3.10, 3.11, 3.12] + python-version: [3.9, 3.12] steps: - uses: actions/checkout@v4 From c4a581a625f1ab594c4b0a78286b629b3065eb46 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 24 Oct 2024 17:51:25 -0400 Subject: [PATCH 4/8] add cd --- .github/workflows/django.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index d975918..92f9edc 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -23,6 +23,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Dependencies run: | + cd core python -m pip install --upgrade pip pip install -r requirements.txt - name: Run Tests From ba514ca87e4aa1f386022b503d73fa9b75f781df Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 24 Oct 2024 17:52:20 -0400 Subject: [PATCH 5/8] version --- .github/workflows/django.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 92f9edc..07df126 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -13,7 +13,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.9, 3.12] + python-version: [3.12] steps: - uses: actions/checkout@v4 From b3c59283f3da0abe5944a38e5668d5112759475f Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 24 Oct 2024 17:53:42 -0400 Subject: [PATCH 6/8] fix typos --- core/i18nilize/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/i18nilize/models.py b/core/i18nilize/models.py index c225700..a2d98fa 100644 --- a/core/i18nilize/models.py +++ b/core/i18nilize/models.py @@ -11,7 +11,7 @@ def __str__(self): return str(self.value) class Translation(models.Model): - token = models.foreignKey(Token, on_delete=models.CASCADE) - original_word = models.charField(max_length = 255) - translated_word = models.charField(max_length = 255) - language = models.charField(max_length = 255) \ No newline at end of file + token = models.ForeignKey(Token, on_delete=models.CASCADE) + original_word = models.CharField(max_length = 255) + translated_word = models.CharField(max_length = 255) + language = models.CharField(max_length = 255) \ No newline at end of file From 1ab19d848994e1e1923bb53161a61090944caa39 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 24 Oct 2024 17:59:55 -0400 Subject: [PATCH 7/8] pip tests --- .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 180 bytes .../__pycache__/helpers.cpython-312.pyc | Bin 0 -> 1662 bytes .../__pycache__/localize.cpython-312.pyc | Bin 0 -> 710 bytes .../tests/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 165 bytes .../__pycache__/test_parse_json.cpython-312.pyc | Bin 0 -> 8955 bytes .../__pycache__/test_read_file.cpython-312.pyc | Bin 0 -> 2065 bytes 6 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 i18nilize/src/internationalize/__pycache__/__init__.cpython-312.pyc create mode 100644 i18nilize/src/internationalize/__pycache__/helpers.cpython-312.pyc create mode 100644 i18nilize/src/internationalize/__pycache__/localize.cpython-312.pyc create mode 100644 i18nilize/tests/__pycache__/__init__.cpython-312.pyc create mode 100644 i18nilize/tests/__pycache__/test_parse_json.cpython-312.pyc create mode 100644 i18nilize/tests/__pycache__/test_read_file.cpython-312.pyc diff --git a/i18nilize/src/internationalize/__pycache__/__init__.cpython-312.pyc b/i18nilize/src/internationalize/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6350b0b6284f68424da7be1d3b0cd9e0ca94e380 GIT binary patch literal 180 zcmX@j%ge<81Y!q&rh(|kAOanHW&w&!XQ*V*Wb|9fP{ah}eFmxd6|5gxoLW?@pP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}n-Lx$~R%lqe52?iwFax?hUhF)Q|qCuy>W)3-jx5pG`Da*_osu zlkL9l9uBmTwmDKZr+gGtbUC`s^_KqETWS)!%?}=5WvuTLupHmPGThD7M=b|;Z1R}p XITXK(o91pJBZPjz?lhyKyD|MQjikKo literal 0 HcmV?d00001 diff --git a/i18nilize/tests/__pycache__/__init__.cpython-312.pyc b/i18nilize/tests/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..92ab8343071b94eb46dd76390c2a2819d7fe3493 GIT binary patch literal 165 zcmX@j%ge<81lb3Frh(|kAOanHW&w&!XQ*V*Wb|9fP{ah}eFmxd<)R;2oLW?@pPgEk znOBvOn3t~alAm0fo0?Zrte=ygoS2hYl~|IQpQoQ`Xpxr*^!g=l8(LVoXo| z<3X<7S@tQd)Z}Y8&ly%>ALM$RVPb`TrkMyAebPi!L!Tles?lk}Jm~6n;1WkX7N;AQ zFe#g3mRE@rO-`zo6pP)AC)8NX62|qoX4TM2$a9~w1Vc^Sw0t8|gs7SsgE|KG8xB9Y z*m>1ZiP1Tsz8lw4W3o2dc}5?ZN&=hFnb1e%L_9^eu`}M)r^Vq*rNhY$YEmYKY7cF4 z+7b=bygHexcddH|&BEm}4gtBvtnO%EH1WcCtUszyeeFN6IiA) zr|EUo;jvD>ZAEa^WffYch{!R^Rc>pBQ#`a+ud8O|@o|boIcuumtfid3DmeX=GvMOP zk2{DZv-}3*=5yn&bJeUoZaz2eEeFqvt_^{GU7>kSQ79Ry$#9temwxmhOduK|IKSFu2yjLb=EpCii!l0gzBLYE*B6V2glMT=X z^XxlQa>C*hss^R?SRg2}DO(LUX?JcjW^Fa>*4&u}nwKynvK1=_s3PX=V=ClUj-nz& z0plwmpd@vTcZ5%acY{lH2j_$@CI5=ll#!b5Y`Zghw>jMw%}SRa<}*LpdS~cfN2a-J zDb&6AQdT@4e7C6(PLkkx&p<|ylWu<|l-1C`G&tg0)oi55flL>V# z_GYEyMY(4)(9eae^x~H-`|kB;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8HNQKESAuGy>r9O$i;q?vqNb)S$!+l8Yur;2m^a0Ra%D5BlxY`vly)(O1yWa}0^uy`V!OvuR_irk-i zp&HFFl5!%^agtsm82#{KS02Vzal5{~#e7n?Agr{V%Cw#O?EP%hAQk3E{{YvE-ddPR z)ADFj$r~z3HNHwADm)ZVs^Kfxau`qKPE-*H-Vb~y!(w?%=p$~DQ!qxCl_`w@EuW2= zF=VF!A;sCZ!3EC6g3TKl8M-p5NY#sY1()oP_L5b3gR&{;e!XM&eDZek@AZQZw>CZ& z`NrBg-{V@QCYTN$T-cSBdMlu^+w?4acO+hxUi`nQf*oX-|2b2YYA%URld?ALoUHz! zM$GaK$)j>YA0=mDsY!_iBj+G9b-WtAyAdBPH(iMB6-?K3w&@ir+~hoVI*6TYciXFh z_-M{ry@m{UY-M>b%E>9il3FCE|cQ0pkHzrL&n_YG z8w`dVLV`F-dXV%XIf0}f$pDflk~e_dXY9R4>?L?rObPCWf%QIM);LbQ%&tj6@x`?; zCq~vJK|HYLuY=EhqBy{=1q1Nf;t|iWYg_8X)9m`bI?=u(qfOzklX6^(#o$*B(v%iA zacgZ%>&E_G1!CK7c1;2gGi5`L-AxgOaFUxS>Ne6rl z8xXJ$g6Qnb2O!^Grhf7^6o5m?7^i`J!?P^=1+#aB+4}|aW`=q5u}5Rs{*T*M8d@_A mt&bV}`sQt(5&Uzhzw)7nLjA454=?@f($6n{1DQK%5B~!Bw&}V6 literal 0 HcmV?d00001 diff --git a/i18nilize/tests/__pycache__/test_read_file.cpython-312.pyc b/i18nilize/tests/__pycache__/test_read_file.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6c479b7731a0bc265bd8f5f861942cea5d32118f GIT binary patch literal 2065 zcmd5-O>7%Q6rR~1dlHSOKhnD_P41)d$UzYXmINo%<>&~nz zVihS!L2%@j3x{$*5aj?z4jg)n#HE!JH5$|tCvH{UQ%}5EZ(=7nm%@QLyqS6L&3ilF z`{wQMBO}8I#t*+uEPbXS^rzhH4Lw?P8n9SLHnOpc%5qj*Tvy5pmTT2j>sndENI@5n zt*s$jr)W8hx)-QBZ>rt798(Z@j2^Vg-Daf1Xa#3tf5}}bgGF+Q21dY4kGp2z_#UW+ zLY04$dRBBMoN%=1yatPP$Wq2ODl0ZFtG2R+%9^c$)a6%}V=HIo zHls6l@TStW!QD|tDYd4GbEoo!>iojYY%#wuQ>YYYXNr|MYsQ|-&(F@<#nZHKI-`mg zOwK6_-n-Q_T_!V#p{nCjqhSWMj3P8n-KrR+pEsx#P}>M3W?be! zqz6xfSVg<3cfT3kC5eY*`~eyNE_Ju?0UvY#`#2~k`-J zz}?2Svd2eT?P34i(X{<&`hO5DwjVA2ucMK^n-2A&0n3ITYA{(2HUwe=v#_$VB59TY zDPHcYeD4YK*6T;nqt8jU2!0y`uw<;OcgQs+^AG0UU9kL5xTo3rK3if3>KiYyWAL5q zB@nHX(@|}w)1DustA5k7(~g&p2oOKdLME^mrSsTywC!_dDH&@51n(Idq z6WXC65{4mrWY-e1m5s<7y&}aVhz%4*2x-e=QY(dQH(XwQ4ecI#d-c*2P0`QcCq&b) z<4!`+Dej(Z&w+GvdTRA9#xmXv^JhP9%tD zP3Y4ygV5@x<1zVr>wWAqa;AIBMfMgLWOaBB#A6j>{0B-tLJN;j{wYafioY#B9GiMD YHuV(A-QzbA9$h70k9;}uRWc0tH=upXCIA2c literal 0 HcmV?d00001 From b3dd0804314522047a36dd7bc9633f8adec1fc91 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Thu, 24 Oct 2024 18:01:35 -0400 Subject: [PATCH 8/8] add pip tests --- .github/workflows/django.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 07df126..5cf262c 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -26,7 +26,12 @@ jobs: cd core python -m pip install --upgrade pip pip install -r requirements.txt - - name: Run Tests + - name: Run Django Tests run: | cd core - python manage.py test \ No newline at end of file + python manage.py test + - name: Run PIP Tests + run: | + cd i18nilize + python3 -m tests.test_read_file + python3 -m tests.test_parse_json \ No newline at end of file