Skip to content

feat: CI/CD and RTD#46

Closed
geminixiang wants to merge 23 commits intoBonislolz:mainfrom
geminixiang:main
Closed

feat: CI/CD and RTD#46
geminixiang wants to merge 23 commits intoBonislolz:mainfrom
geminixiang:main

Conversation

@geminixiang
Copy link
Copy Markdown
Contributor

@geminixiang geminixiang commented Feb 7, 2026

Feature

image
pip install -i https://test.pypi.org/simple/ fork-dictrack-geminixiang

打包成果跟之前一樣

vscode ➜ ~/.local/lib/python3.8/site-packages $ tree ./dictrack
./dictrack
├── conditions
│   ├── base.py
│   ├── __init__.py
│   ├── keys.py
│   └── __pycache__
│       ├── base.cpython-38.pyc
│       ├── __init__.cpython-38.pyc
│       └── keys.cpython-38.pyc
├── data_caches
│   ├── base.py
│   ├── __init__.py
│   ├── memory.py
│   ├── __pycache__
│   │   ├── base.cpython-38.pyc
│   │   ├── __init__.cpython-38.pyc
│   │   ├── memory.cpython-38.pyc
│   │   └── redis.cpython-38.pyc
│   └── redis.py
├── data_stores
│   ├── base.py
│   ├── __init__.py
│   ├── mongodb.py
│   └── __pycache__
│       ├── base.cpython-38.pyc
│       ├── __init__.cpython-38.pyc
│       └── mongodb.cpython-38.pyc
├── events.py
├── __init__.py
├── limiters
│   ├── base.py
│   ├── count.py
│   ├── __init__.py
│   ├── __pycache__
│   │   ├── base.cpython-38.pyc
│   │   ├── count.cpython-38.pyc
│   │   ├── __init__.cpython-38.pyc
│   │   └── time.cpython-38.pyc
│   └── time.py
├── manager.py
├── __pycache__
│   ├── events.cpython-38.pyc
│   ├── __init__.cpython-38.pyc
│   └── manager.cpython-38.pyc
├── trackers
│   ├── base.py
│   ├── __init__.py
│   ├── numerics
│   │   ├── accumulation.py
│   │   ├── count.py
│   │   ├── __init__.py
│   │   ├── numeric.py
│   │   └── __pycache__
│   │       ├── accumulation.cpython-38.pyc
│   │       ├── count.cpython-38.pyc
│   │       ├── __init__.cpython-38.pyc
│   │       └── numeric.cpython-38.pyc
│   └── __pycache__
│       ├── base.cpython-38.pyc
│       └── __init__.cpython-38.pyc
└── utils
    ├── errors.py
    ├── __init__.py
    ├── logger.py
    ├── __pycache__
    │   ├── errors.cpython-38.pyc
    │   ├── __init__.cpython-38.pyc
    │   ├── logger.cpython-38.pyc
    │   └── utils.cpython-38.pyc
    └── utils.py

15 directories, 54 files

Test

vscode ➜ /workspaces/dictrack (main) $ python2 -m pytest app/
============================================ test session starts ============================================
platform linux2 -- Python 2.7.18, pytest-4.6.11, py-1.11.0, pluggy-0.13.1
rootdir: /workspaces/dictrack
plugins: cov-2.12.1
collected 19 items                                                                                          

app/tests/test_conditions.py .................                                                        [ 89%]
app/tests/test_limiters.py ..                                                                         [100%]

========================================= 19 passed in 0.07 seconds =========================================
vscode ➜ /workspaces/dictrack (main) $ python3 -m pytest app/
============================================ test session starts ============================================
platform linux -- Python 3.8.10, pytest-8.3.5, pluggy-1.5.0
rootdir: /workspaces/dictrack
collected 19 items                                                                                          

app/tests/test_conditions.py .................                                                        [ 89%]
app/tests/test_limiters.py ..                                                                         [100%]

============================================ 19 passed in 0.04s =============================================

TODO

@geminixiang geminixiang marked this pull request as ready for review February 7, 2026 12:38
limiter = TimeLimiter(interval=timedelta(seconds=1))
time.sleep(2)
limiter.pre_track({}, MockTracker())
limiter.pre_track({}, MockTracker(), now_ts=limiter.start + 2)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

時好時壞的測試,直接給固定 now_ts 下去測試

@geminixiang geminixiang marked this pull request as draft February 7, 2026 12:56
@geminixiang geminixiang closed this Feb 7, 2026
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.

1 participant