Skip to content

Commit d930d89

Browse files
committed
Revert "Merge branch 'sushmey-dev-branch' of https://github.com/Sushmey/zulip-terminal into sushmey-dev-branch"
This reverts commit 13d1b95, reversing changes made to 15211e9.
1 parent 13d1b95 commit d930d89

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+902
-5323
lines changed

.github/workflows/lint-and-test.yml

Lines changed: 27 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
# Cancel previous runs within same workflow and if within a PR (all branch runs complete)
1111
# (head_ref [branch name] is unique to and only for PRs, otherwise use always-unique run_id)
12-
concurrency:
12+
concurrency:
1313
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1414
cancel-in-progress: true
1515

@@ -31,9 +31,9 @@ jobs:
3131
- name: Run mypy
3232
run: ./tools/run-mypy
3333

34-
ruff:
34+
flake8:
3535
runs-on: ubuntu-latest
36-
name: Lint - PEP8 & more (ruff)
36+
name: Lint - PEP8 & more (flake8)
3737
steps:
3838
- uses: actions/checkout@v3
3939
with:
@@ -45,8 +45,8 @@ jobs:
4545
cache-dependency-path: 'setup.py'
4646
- name: Install with linting tools
4747
run: pip install .[linting]
48-
- name: Run ruff
49-
run: ruff zulipterminal/ tests/ setup.py `tools/python_tools.py`
48+
- name: Run flake8
49+
run: flake8 zulipterminal/ tests/ setup.py `tools/python_tools.py`
5050

5151
isort:
5252
runs-on: ubuntu-latest
@@ -57,7 +57,7 @@ jobs:
5757
persist-credentials: false
5858
- uses: actions/setup-python@v4
5959
with:
60-
python-version: 3.7
60+
python-version: 3.6
6161
cache: 'pip'
6262
cache-dependency-path: 'setup.py'
6363
- name: Install with linting tools
@@ -75,31 +75,14 @@ jobs:
7575
persist-credentials: false
7676
- uses: actions/setup-python@v4
7777
with:
78-
python-version: 3.7
78+
python-version: 3.6
7979
cache: 'pip'
8080
cache-dependency-path: 'setup.py'
8181
- name: Install with linting tools
8282
run: pip install .[linting]
8383
- name: Check code & tests meet black standards
8484
run: black --check zulipterminal/ tests/ setup.py `tools/python_tools.py`
8585

86-
spellcheck:
87-
runs-on: ubuntu-latest
88-
name: Lint - Spellcheck
89-
steps:
90-
- uses: actions/checkout@v3
91-
with:
92-
persist-credentials: false
93-
- uses: actions/setup-python@v4
94-
with:
95-
python-version: 3.7
96-
cache: 'pip'
97-
cache-dependency-path: 'setup.py'
98-
- name: Install with linting tools
99-
run: pip install .[linting]
100-
- name: Check spelling
101-
run: ./tools/run-spellcheck
102-
10386
hotkeys:
10487
runs-on: ubuntu-latest
10588
name: Lint - Hotkeys linting & docs sync check
@@ -109,13 +92,13 @@ jobs:
10992
persist-credentials: false
11093
- uses: actions/setup-python@v4
11194
with:
112-
python-version: 3.7
95+
python-version: 3.6
11396
cache: 'pip'
11497
cache-dependency-path: 'setup.py'
11598
- name: Minimal install
11699
run: pip install .
117-
- name: Run lint-hotkeys
118-
run: ./tools/lint-hotkeys
100+
- name: Run generate_hotkeys
101+
run: ./tools/generate_hotkeys.py --check-only
119102

120103
docstrings:
121104
runs-on: ubuntu-latest
@@ -126,89 +109,30 @@ jobs:
126109
persist-credentials: false
127110
- uses: actions/setup-python@v4
128111
with:
129-
python-version: 3.7
112+
python-version: 3.6
130113
cache: 'pip'
131114
cache-dependency-path: 'setup.py'
132115
- name: Minimal install
133116
run: pip install .
134117
- name: Run lint-docstring
135118
run: ./tools/lint-docstring
136119

137-
base_pytest:
138-
runs-on: ubuntu-latest
139-
name: Install & test - CPython 3.7 (ubuntu), codecov
140-
steps:
141-
- uses: actions/checkout@v3
142-
with:
143-
persist-credentials: false
144-
- name: Install Python version
145-
uses: actions/setup-python@v4
146-
with:
147-
python-version: 3.7
148-
cache: 'pip'
149-
cache-dependency-path: 'setup.py'
150-
- name: Output Python version
151-
run: python --version
152-
- name: Upgrade pip
153-
run: python -m pip install --upgrade pip
154-
- name: Ensure regular package installs from checkout
155-
run: pip install .
156-
- name: Install test dependencies
157-
run: pip install .[testing]
158-
- name: Run tests with pytest
159-
run: pytest --cov-report=xml
160-
- name: Upload coverage to Codecov
161-
uses: codecov/codecov-action@v3
162-
163-
isolated-commits:
164-
runs-on: ubuntu-latest
165-
name: Ensure isolated PR commits
166-
needs:
167-
- mypy
168-
- ruff
169-
- isort
170-
- black
171-
- spellcheck
172-
- hotkeys
173-
- docstrings
174-
- base_pytest
175-
steps:
176-
- uses: actions/checkout@v3
177-
if: github.event_name == 'pull_request'
178-
with:
179-
persist-credentials: false
180-
ref: ${{ github.event.pull_request.head.sha }}
181-
fetch-depth: 0
182-
- uses: actions/setup-python@v4
183-
if: github.event_name == 'pull_request'
184-
with:
185-
python-version: 3.7
186-
cache: 'pip'
187-
cache-dependency-path: 'setup.py'
188-
- name: Run check-branch
189-
if: github.event_name == 'pull_request'
190-
# Note that we install at each step since dependencies may change
191-
run:
192-
git fetch https://github.com/zulip/zulip-terminal main;
193-
CHECK="pip install .[linting,testing,typing] && ./tools/lint-all && pytest" ./tools/check-branch FETCH_HEAD
194-
195-
pytest-on-other-platforms:
196-
needs: isolated-commits
120+
pytest:
197121
strategy:
198122
# Not failing fast allows all matrix jobs to try & finish even if one fails early
199123
fail-fast: false
200124
matrix:
201125
env:
202-
- {PYTHON: 3.8, OS: ubuntu-latest, NAME: "CPython 3.8 (ubuntu)", EXPECT: "Linux"}
203-
- {PYTHON: 3.9, OS: ubuntu-latest, NAME: "CPython 3.9 (ubuntu)", EXPECT: "Linux"}
204-
- {PYTHON: "3.10", OS: ubuntu-latest, NAME: "CPython 3.10 (ubuntu)", EXPECT: "Linux"}
205-
- {PYTHON: "3.11", OS: ubuntu-latest, NAME: "CPython 3.11 (ubuntu)", EXPECT: "Linux"}
206-
- {PYTHON: 'pypy-3.7', OS: ubuntu-latest, NAME: "PyPy 3.7 (ubuntu)", EXPECT: "Linux"}
207-
- {PYTHON: 'pypy-3.8', OS: ubuntu-latest, NAME: "PyPy 3.8 (ubuntu)", EXPECT: "Linux"}
208-
- {PYTHON: 'pypy-3.9', OS: ubuntu-latest, NAME: "PyPy 3.9 (ubuntu)", EXPECT: "Linux"}
209-
- {PYTHON: '3.x', OS: macos-latest, NAME: "CPython 3.x [latest] (macos)", EXPECT: "MacOS"}
210-
env:
211-
EXPECT: ${{ matrix.env.EXPECT }}
126+
- {PYTHON: 3.6, OS: ubuntu-latest, NAME: "CPython 3.6 (ubuntu)"}
127+
- {PYTHON: 3.7, OS: ubuntu-latest, NAME: "CPython 3.7 (ubuntu)"}
128+
- {PYTHON: 3.8, OS: ubuntu-latest, NAME: "CPython 3.8 (ubuntu)"}
129+
- {PYTHON: 3.9, OS: ubuntu-latest, NAME: "CPython 3.9 (ubuntu)", CODECOV: true}
130+
- {PYTHON: "3.10", OS: ubuntu-latest, NAME: "CPython 3.10 (ubuntu)"}
131+
- {PYTHON: 'pypy-3.6', OS: ubuntu-latest, NAME: "PyPy 3.6 (ubuntu)"}
132+
- {PYTHON: 'pypy-3.7', OS: ubuntu-latest, NAME: "PyPy 3.7 (ubuntu)"}
133+
- {PYTHON: 'pypy-3.8', OS: ubuntu-latest, NAME: "PyPy 3.8 (ubuntu)"}
134+
- {PYTHON: 'pypy-3.9', OS: ubuntu-latest, NAME: "PyPy 3.9 (ubuntu)"}
135+
- {PYTHON: 3.9, OS: macos-latest, NAME: "CPython 3.9 (macos)"}
212136
runs-on: ${{ matrix.env.OS }}
213137
name: Install & test - ${{ matrix.env.NAME}}
214138
steps:
@@ -230,9 +154,11 @@ jobs:
230154
run: sudo apt install libxml2-dev libxslt1-dev
231155
- name: Ensure regular package installs from checkout
232156
run: pip install .
233-
- name: Check we detect the platform correctly
234-
run: python -c "from zulipterminal.platform_code import detected_platform; import os; e, d = os.environ['EXPECT'], detected_platform(); assert d == e, f'{d} != {e}'"
235157
- name: Install test dependencies
236158
run: pip install .[testing]
237159
- name: Run tests with pytest
238-
run: pytest --cov-report=
160+
run: pytest --cov-report=xml
161+
- name: Upload coverage to Codecov
162+
uses: codecov/codecov-action@v2
163+
# We avoid extra work by just running codecov on one python version
164+
if: matrix.env.CODECOV

.gitlint

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ ignore=title-trailing-punctuation, body-is-missing, body-min-length, title-must-
44
# ZT: These are custom rules written for Zulip-Terminal, included by default
55
extra-path=tools/gitlint-extra-rules.py
66

7-
# Added to acknowledge that eg. ignore-by-title regex
8-
regex-style-search=True
9-
107
# verbosity should be a value between 1 and 3, the commandline -v flags take precedence over this
118
# verbosity = 2
129

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ While not composed of as many significant changes as 0.5.0, this is a meaningful
364364
- Support nested lists (bulleted and numbered)
365365
- Style reaction counts which include yourself differently (inverted colors, typically)
366366
- Sort reactions alphabetically for consistency
367-
- Support color depths other than 256-colors; try --color-depth=1 for a retro, high-contrast experience!
367+
- Support color depths other than 256-colors; try --color-depth=1 for a retro, high-constrast experience!
368368
- Improve specificity of colors in default theme, enhancing rendering and consistency in 256 color mode
369369
- Use triangle symbol (▶) to separate streams and topics, instead of simply '>'
370370
- The 'bar' extending from topics or private message recipients is now thinner and colored if a stream

0 commit comments

Comments
 (0)