Skip to content
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

feat: adjust conference date to 2024 #1162

Closed
wants to merge 3 commits into from

Conversation

SivanYeh
Copy link
Collaborator

@SivanYeh SivanYeh commented Feb 19, 2024

update date in 2023 to 2024

Types of changes

  • [ x ] Bugfix
  • New feature
  • Refactoring
  • Breaking change (any change that would cause existing functionality to not work as expected)
  • Documentation Update
  • Other (please describe)

Description

Describe what the change is
Current options are outdated in proposal system. latest conference dates have to be updated to
Day1: 2024/9/21
Day2: 2024/9/22

screenshot:
image

Related Issue

#1163

More Information

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Refer to:
#1120

update date in 2023 to 2024
@SivanYeh SivanYeh requested a review from mattwang44 February 19, 2024 05:26
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (913fef7) 70.59% compared to head (b674918) 70.59%.
Report is 9 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1162   +/-   ##
=======================================
  Coverage   70.59%   70.59%           
=======================================
  Files          85       85           
  Lines        3394     3394           
=======================================
  Hits         2396     2396           
  Misses        998      998           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@uranusjr
Copy link
Member

uranusjr commented Feb 19, 2024

It’s twenty-first and twenty-second, i.e. 21st and 22nd, not 21th and 22th.

Copy link
Member

@mattwang44 mattwang44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 有檢查過有沒有新的 migration scripts 嗎?(指令為 python manage.py makemigrations
    • 或者知道為何要做 DB migrations 嗎?
  • po 檔的原文變更是可以自動產出的(指令為 python manage.py makemessages -l en_US -l zh_Hant),看起來只有(手動)修改英文的 po 檔案但沒有改到中文的 po

src/core/choices.py Outdated Show resolved Hide resolved
@SivanYeh
Copy link
Collaborator Author

It’s twenty-first and twenty-second, i.e. 21st and 22nd, not 21th and 22th.

Thanks a lot! Shame of my tuition.

@SivanYeh
Copy link
Collaborator Author

SivanYeh commented Feb 19, 2024

我是參考deploy_local_env_dev.md進行中

有檢查過有沒有新的 migration scripts 嗎?(指令為 python manage.py makemigrations

這是現在在debug的地方. 執行完後會出現這段錯誤訊息:

(venv) ➜  src git:(adjust_conference_date_to_2024) ✗ python manage.py makemigrations
Traceback (most recent call last):
  File "root/pycon.tw/src/manage.py", line 16, in <module>
    execute_from_command_line(sys.argv)
  File "root/pycon.tw/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "root/pycon.tw/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 382, in execute
    settings.INSTALLED_APPS
  File "root/pycon.tw/venv/lib/python3.9/site-packages/django/conf/__init__.py", line 102, in __getattr__
    self._setup(name)
  File "root/pycon.tw/venv/lib/python3.9/site-packages/django/conf/__init__.py", line 89, in _setup
    self._wrapped = Settings(settings_module)
  File "root/pycon.tw/venv/lib/python3.9/site-packages/django/conf/__init__.py", line 217, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/Users/hsin-yunyeh/miniforge_x86_64/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "root/pycon.tw/src/pycontw2016/settings/local.py", line 1, in <module>
    from .base import (
  File "root/pycon.tw/src/pycontw2016/settings/base.py", line 15, in <module>
    import environ
  File "root/pycon.tw/venv/lib/python3.9/site-packages/environ.py", line 114
    raise ValueError, "No frame marked with %s." % fname
                    ^
SyntaxError: invalid syntax
  • 或者知道為何要做 DB migrations 嗎?

知道要更新2023 db->2024 db使資訊取用為2024版本; 不過沒有連結到這層, 並以為db migration做完, 只是db裡部分資料尚未更新.

  • po 檔的原文變更是可以自動產出的(指令為 python manage.py makemessages -l en_US -l zh_Hant),看起來只有(手動)修改英文的 po 檔案但沒有改到中文的 po

我就知道有自動化的方式!

@SivanYeh
Copy link
Collaborator Author

SivanYeh commented Feb 19, 2024

所以理想來說是以這樣的方式變更?
Josix comments

To update fields in models:
You can alter fields in your model by making changes to the relevant model file (e.g., models.py).

變更core/choices.py

Create a migration: After making changes to your model, you need to create a new migration file. This can be done using the makemigrations command, like python manage.py makemigrations.
This will generate a new migration file based on the changes you made to your model.

$ python manage.py makemigrations

@mattwang44
Copy link
Member

mattwang44 commented Feb 19, 2024

這是現在在debug的地方

我們現在用的 python 是很舊的 3.6 版本,你用的是 3.9,可能是因此而有語法上的差異

@SivanYeh
Copy link
Collaborator Author

這是現在在debug的地方

我們現在用的 python 是很舊的 3.6 版本,你用的是 3.9,可能是因此而有語法上的差異

尚未解決. 不過更新下新發現:
local env:
OS: macOS v11.4
chip: Apple M1

macOS v11無法使用3.6.14之前的版本. 於是用3.6.15來跑.
不過以pip install安裝套件的過程中會遇到Pillow安裝不順的問題:

  Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/rz/_v__631s4pz7gj7pcg7b2g4h0000gn/T/pip-install-u0jrybdz/pillow_2c4a7280b7854d8491677fb995b19a8d/setup.py", line 914, in <module>
        raise RequiredDependencyException(msg)
    __main__.RequiredDependencyException:
    
    The headers or library files could not be found for zlib,
    a required dependency when compiling Pillow from source.
    
    Please see the install instructions at:
       https://pillow.readthedocs.io/en/latest/installation.html
    
    
    ----------------------------------------
  Rolling back uninstall of Pillow
  Moving to usr/.pyenv/versions/3.6.15/lib/python3.6/site-packages/PIL/
   from usr/.pyenv/versions/3.6.15/lib/python3.6/site-packages/~IL
  Moving to usr/.pyenv/versions/3.6.15/lib/python3.6/site-packages/Pillow-8.4.0-py3.6.egg-info
   from usr/.pyenv/versions/3.6.15/lib/python3.6/site-packages/~illow-8.4.0-py3.6.egg-info
ERROR: Command errored out with exit status 1: usr/.pyenv/versions/3.6.15/bin/python3.6 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/rz/_v__631s4pz7gj7pcg7b2g4h0000gn/T/pip-install-u0jrybdz/pillow_2c4a7280b7854d8491677fb995b19a8d/setup.py'"'"'; __file__='"'"'/private/var/folders/rz/_v__631s4pz7gj7pcg7b2g4h0000gn/T/pip-install-u0jrybdz/pillow_2c4a7280b7854d8491677fb995b19a8d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/rz/_v__631s4pz7gj7pcg7b2g4h0000gn/T/pip-record-yyoafwjz/install-record.txt --single-version-externally-managed --compile --install-headers usr/.pyenv/versions/3.6.15/include/python3.6m/Pillow Check the logs for full command output.

執行$python manage makemigrations, 會出現

    from typing import Literal, Union
ImportError: cannot import name 'Literal'

參考自stack overflow, 這可能是3.8前的版本會遇到的錯誤

@josix josix self-requested a review February 21, 2024 06:35
@SivanYeh SivanYeh closed this Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants