| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 个月前 | ||
| 4 个月前 | ||
| 3 个月前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 1 年前 | ||
| 1 年前 |
Coding style rules
- Prefer using strong typing
- Prefer using type hinting for the first time the variable is declared, and for functions paremeters and return types
- Use
-> Noneto explicitly indicate no return value
Ideas
- Recommended to integrate your IDE with PEP8 to highlight PEP8 violations in real-time
- Enforcing PEP8 via
pylint flake8 pycodestyleand via pre commit hooks
Writing New testcases
- Just create a file ending with
_test.pyintestsdirectory- Any subclass of BaseTest with name ending with
Testwill be executed - see
run_testsandget_testcasesincore/runner.pyfor more info
- Any subclass of BaseTest with name ending with
Setup
Requires python 3.9 or later.
Setup for macOS / Linux
Install tmux
- You need to have tmux installed. See https://github.com/tmux/tmux/wiki
Python virtual env setup
# cd to this directory
cd <path/to/here>
python3 -m venv .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install -r requirements.txt
Make sure you build spf
# cd to the superfile repo root (parent of this)
cd <superfile_root>
./build.sh
Running testsuite
.venv/bin/python3 main.py
Setup for Windows
Coming soon.
Python virtual env setup
# cd to this directory
cd <path/to/here>
# If your python command refers to python3, you can use 'python' below
python3 -m venv .venv
.venv\Scripts\python -m pip install --upgrade pip
.venv\Scripts\pip install -r requirements.txt
Make sure you build spf
# cd to the superfile repo root (parent of this)
cd <superfile_root>
go build -o bin/spf.exe
Running testsuite
Notes
- You must keep your focus on the terminal for the entire duration of test run.
pyautoguisends keypress to process on focus.
.venv\Scripts\python main.py
Tips while running tests
- Use
-dor--debugto enable debug logs during test run. - If you see flakiness in test runs due to superfile being still open, consider using
--close-wait-timeoptions to increase wait time for superfile to close. Note : For now we have enforcing superfile to close within a specific time window in tests to reduce test flakiness - Make sure that your hotkeys are set to default hotkeys. Tests use default hotkeys for now.
- Use
-tor--teststo only run specific tests- Example
python main.py -d -t RenameTest CopyTest
- Example
- If you see
libtmuxerrors likelibtmux.exc.LibTmuxException: ['no server running on /private/tmp/tmux-501/superfile']Make sure your python version is up to date