Skip to content

Commit 5dfdcbc

Browse files
committed
Update project environment and fix issues for modern linting
1 parent 126fd7a commit 5dfdcbc

23 files changed

+418
-348
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,29 @@ on:
44
push:
55
branches:
66
- 'master'
7+
tags:
8+
- '**'
9+
pull_request:
10+
branches:
11+
- '**'
712

813
jobs:
914
tests:
1015

1116
env:
12-
TOXENV: py37
17+
TOXENV: py311
1318

1419
runs-on: ubuntu-latest
1520

1621
steps:
17-
- uses: actions/checkout@v1
22+
- uses: actions/checkout@v4
1823
- name: Set up Python
19-
uses: actions/setup-python@v1
24+
uses: actions/setup-python@v4
2025
with:
21-
python-version: 3.7
26+
python-version: 3.11
2227
- name: Install dependencies
2328
run: |
24-
python -m pip install --upgrade pip setuptools tox
29+
python -m pip install --upgrade pip setuptools tox build
2530
- name: Tests
2631
run: |
2732
python -m tox
@@ -34,14 +39,14 @@ jobs:
3439
runs-on: ubuntu-latest
3540

3641
steps:
37-
- uses: actions/checkout@v1
42+
- uses: actions/checkout@v4
3843
- name: Set up Python
39-
uses: actions/setup-python@v1
44+
uses: actions/setup-python@v4
4045
with:
41-
python-version: 3.7
46+
python-version: 3.11
4247
- name: Install dependencies
4348
run: |
44-
python -m pip install --upgrade pip setuptools tox
49+
python -m pip install --upgrade pip setuptools tox build
4550
- name: Lint
4651
run: |
4752
python -m tox
@@ -54,14 +59,14 @@ jobs:
5459
runs-on: ubuntu-latest
5560

5661
steps:
57-
- uses: actions/checkout@v1
62+
- uses: actions/checkout@v4
5863
- name: Set up Python
59-
uses: actions/setup-python@v1
64+
uses: actions/setup-python@v4
6065
with:
61-
python-version: 3.7
66+
python-version: 3.11
6267
- name: Install dependencies
6368
run: |
64-
python -m pip install --upgrade pip setuptools tox
69+
python -m pip install --upgrade pip setuptools tox build
6570
- name: Install Aspell
6671
run: |
6772
sudo apt-get install aspell aspell-en

.github/workflows/deploy.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v1
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
1618
- name: Set up Python
17-
uses: actions/setup-python@v1
19+
uses: actions/setup-python@v4
1820
with:
19-
python-version: 3.7
21+
python-version: 3.11
2022
- name: Install dependencies
2123
run: |
22-
python -m pip install --upgrade pip setuptools
23-
python -m pip install mkdocs-material pymdown-extensions pygments
24+
python -m pip install --upgrade pip setuptools build
25+
python -m pip install -r docs/src/requirements.txt
2426
- name: Deploy documents
2527
run: |
2628
git config user.name facelessuser

.github/workflows/pullrequest.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

.pyspelling.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,9 @@ matrix:
4949
- title
5050
- alt
5151
ignores:
52-
- 'code, pre'
53-
- '.magiclink-compare, .magiclink-commit, .magiclink-repository, .md-footer-social__link'
54-
- 'span.keys'
52+
- 'code, pre, a.magiclink, span.keys'
5553
- '.MathJax_Preview, .md-nav__link, .md-footer-custom-text, .md-source__repository, .headerlink, .md-icon'
54+
- '.md-social__link'
5655
- pyspelling.filters.url:
5756

5857
- name: markdown

CHANGES.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,46 @@
11
# HexViewer
22

3+
## 2.7.1
4+
5+
- **FIX**: Ensure `typing` dependencies for Sublime versions using Python 3.3 host.
6+
37
## 2.7.0
48

5-
- **NEW**: HexViewer no longer triggers on files with extension `hex`. Instead it uses a custom extension `hxv`.
6-
- **NEW**: Add new timestamp output in the hex inspector.
7-
- **NEW**: Only use `sublime-syntax` files to highlight HexViewer related syntaxes.
9+
- **NEW**: HexViewer no longer triggers on files with extension `hex`. Instead it uses a custom extension `hxv`.
10+
- **NEW**: Add new timestamp output in the hex inspector.
11+
- **NEW**: Only use `sublime-syntax` files to highlight HexViewer related syntaxes.
812

913
## 2.6.5
1014

11-
- **FIX**: Thread should be idle when Sublime Text is idle.
15+
- **FIX**: Thread should be idle when Sublime Text is idle.
1216

1317
## 2.6.4
1418

15-
- **FIX**: Fix issue with with selecting the correct hex byte when a character in the ASCII column is selected on the last row.
19+
- **FIX**: Fix issue with with selecting the correct hex byte when a character in the ASCII column is selected on the
20+
last row.
1621

1722
## 2.6.3
1823

19-
- **FIX**: Fix change log auto-linking issue.
24+
- **FIX**: Fix change log auto-linking issue.
2025

2126
## 2.6.2
2227

23-
- **FIX**: Log rendering.
28+
- **FIX**: Log rendering.
2429

2530
## 2.6.1
2631

27-
- **FIX**: Update dependencies.
32+
- **FIX**: Update dependencies.
2833

2934
## 2.6.0
3035

31-
- **NEW**: Can now toggle image files to hex view, but still cannot auto detect them on open.
32-
- **FIX**: Misspelling of the setting `inspector_float_format`. Update your settings accordingly.
36+
- **NEW**: Can now toggle image files to hex view, but still cannot auto detect them on open.
37+
- **FIX**: Misspelling of the setting `inspector_float_format`. Update your settings accordingly.
3338

3439
## 2.5.0
3540

36-
- **NEW**: Popup support limited to 3124+
41+
- **NEW**: Popup support limited to 3124+
3742

3843
## 2.4.0
3944

40-
- **NEW**: New support commands.
41-
- **FIX**: Fixed race condition.
45+
- **NEW**: New support commands.
46+
- **FIX**: Fixed race condition.

dependencies.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
{
22
"*": {
33
">=3124": [
4-
"pygments",
5-
"python-markdown",
64
"mdpopups",
7-
"python-jinja2",
8-
"markupsafe",
9-
"pyyaml",
10-
"pymdownx"
5+
"typing"
116
]
127
}
138
}
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Contributing & Support
2+
3+
## Overview
4+
5+
Sublime\ Versions | Description
6+
----------------- |------------
7+
ST2 | Supported on a separate branch, but not actively. Any further fixes or enhancements must come from the community. Issues for versions less than ST3 will not be addressed moving forward by me. Pull requests are welcome for back-porting features, enhancements, or fixes to the old branch, but the content of the pull **must** already exist on the main, actively developed branch. I will not allow an older branch to exceed the main branch in regards to functionality.
8+
ST3 | Fully supported and actively maintained.
9+
10+
Contribution from the community is encouraged and can be done in a variety of ways:
11+
12+
- Become a sponsor.
13+
- Bug reports.
14+
- Reviewing code.
15+
- Code patches via pull requests.
16+
- Documentation improvements via pull requests.
17+
18+
## Become a Sponsor :octicons-heart-fill-16:{: .heart-throb}
19+
20+
Open source projects take time and money. Help support the project by becoming a sponsor. You can add your support at
21+
any tier you feel comfortable with. No amount is too little. We also accept one time contributions via PayPal.
22+
23+
[:octicons-mark-github-16: GitHub Sponsors](https://github.com/sponsors/facelessuser){: .md-button .md-button--primary }
24+
[:fontawesome-brands-paypal: PayPal](https://www.paypal.me/facelessuser){ .md-button}
25+
26+
## Bug Reports
27+
28+
1. Please **read the documentation** and **search the issue tracker** to try to find the answer to your question
29+
**before** posting an issue.
30+
31+
2. When an issue is created, a minimal reproducible example is required. If the request for such is ignored, the
32+
issue will be marked `Invalid` and closed.
33+
34+
3. When creating an issue on the repository, please provide as much info as possible:
35+
36+
- Provide environment information by running `Preferences->Package Settings->ColorHelper->Support Info`. The
37+
information will be copied to the clipboard; paste the info in issue.
38+
- Errors in console.
39+
- Detailed description of the problem.
40+
- Examples for reproducing the error. You can post pictures, but if specific text or code is required to
41+
reproduce the issue, please provide the text in a plain text format for easy copy/paste.
42+
- Provide links to 3rd party syntax highlighting package you are using if applicable.
43+
44+
The more info provided, the greater the chance someone will take the time to answer, implement, or fix the issue.
45+
46+
4. Be prepared to answer questions and provide additional information if required. Issues in which the creator refuses
47+
to respond to follow up questions will be marked as stale and closed.
48+
49+
## Reviewing Code
50+
51+
Take part in reviewing pull requests and/or reviewing direct commits. Make suggestions to improve the code and discuss
52+
solutions to overcome weakness in the algorithm.
53+
54+
## Pull Requests
55+
56+
Pull requests are welcome, and if you plan on contributing directly to the code, there are a couple of things to be
57+
mindful of.
58+
59+
1. Please describe the change in as much detail as possible so I can understand what is being added or modified.
60+
61+
2. If you are solving a bug that does not already have an issue, please describe the bug in detail and provide info on
62+
how to reproduce if applicable (this is good for me and others to reference later when verifying the issue has been
63+
resolved).
64+
65+
3. Please reference and link related open bugs or feature requests in this pull if applicable.
66+
67+
4. Make sure you've documented or updated the existing documentation if introducing a new feature or modifying the
68+
behavior of an existing feature that a user needs to be aware of. I will not accept new features or changes to
69+
existing features if you have not provided documentation describing the feature.
70+
71+
Continuous integration tests on are run on all pull requests and commits via Travis CI. When making a pull request, the
72+
tests will automatically be run, and the request must pass to be accepted. You can (and should) run these tests before
73+
pull requesting. If it is not possible to run these tests locally, they will be run when the pull request is made, but
74+
it is strongly suggested that requesters make an effort to verify before requesting to allow for a quick, smooth merge.
75+
76+
### Running Validation Tests
77+
78+
/// tip | Tip
79+
If you are running Sublime on a Mac OS or Linux/Unix system, you run all tests by by running the shell script
80+
(assuming you have installed your environment fulfills all requirements below):
81+
82+
```
83+
chmod +x run_tests.sh
84+
./run_tests.sh
85+
```
86+
///
87+
88+
There are a couple of dependencies that must be present before running the tests.
89+
90+
1. As ST3 is the only current, actively supported version, Python 3.3 must be used to validate the tests.
91+
92+
2. Unit tests are run with `pytest`. You can install `pytest` via:
93+
94+
```
95+
pip install pytest
96+
```
97+
98+
The tests should be run from the root folder of the plugin by using the following command:
99+
100+
```
101+
py.test .
102+
```
103+
104+
3. Linting is performed on the entire project with `flake8`, `flake8-docstrings`, and `pep8-naming`. These can be
105+
installed via:
106+
107+
```
108+
pip install flake8
109+
pip install flake8-docstrings
110+
pip install pep8-naming
111+
```
112+
113+
Linting is performed with the following command:
114+
115+
```
116+
flake8 .
117+
```
118+
119+
## Documentation Improvements
120+
121+
A ton of time has been spent not only creating and supporting this plugin, but also spent making this documentation. If
122+
you feel it is still lacking, show your appreciation for the plugin by helping to improve the documentation. Help with
123+
documentation is always appreciated and can be done via pull requests. There shouldn't be any need to run validation
124+
tests if only updating documentation.
125+
126+
You don't have to render the docs locally before pull requesting, but if you wish to, I currently use a combination of
127+
[MkDocs][mkdocs], the [Material theme][mkdocs-material], and [PyMdown Extensions][pymdown-extensions] to render the
128+
docs. You can preview the docs if you install these two packages. The command for previewing the docs is
129+
`mkdocs serve` from the root directory. You can then view the documents at `localhost:8000`.
130+
131+
--8<-- "refs.md"

0 commit comments

Comments
 (0)