-
Notifications
You must be signed in to change notification settings - Fork 4
Structural updates, require Python 3.8, deploy a WHEEL file #179
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
Open
FichteFoll
wants to merge
19
commits into
master
Choose a base branch
from
feature/wheel
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
f8b1720
Change folder structure
FichteFoll 9c42c28
Move .pydocstyle to root
FichteFoll 2751758
Add pyproject.toml
FichteFoll f82fa0a
Move coverage configuration to pyproject.toml
FichteFoll ae2050a
Remove .sublime-dependency file
FichteFoll bf6f0b4
Move pydocstyle config into pyproject.toml
FichteFoll 07d3187
Specify dev dependencies & use uv in CI
FichteFoll aea5fec
Remove vendor and _compat folders
FichteFoll fb11d5a
Require Python 3.8
FichteFoll 5f4af12
Migrate documentation building to pyproject.toml
FichteFoll 43cdb8a
Commit uv.lock file
FichteFoll 7c4463c
Add mypy CI job
FichteFoll 13cd256
Add release action
FichteFoll bb5a5b7
Bump versions in CI
FichteFoll f8645ae
Fix flake8 & address lints
FichteFoll 7dc09c8
Update .gitignore
FichteFoll c68b080
Forgot to install uv in CI
FichteFoll 8a52bb5
Prevent double actions from PRs within the repo
FichteFoll c94d41f
Determine version dynamically
FichteFoll File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,13 @@ | ||
| [flake8] | ||
|
|
||
| ignore = | ||
| E731, # do not assign a lambda expression, use a def | ||
| W503, # line break before binary operator | ||
| # do not assign a lambda expression, use a def | ||
| E731, | ||
| # line break before binary operator | ||
| W503, | ||
|
|
||
| exclude = | ||
| .git, | ||
| st3/sublime_lib/vendor, | ||
| .venv, | ||
|
|
||
| max-line-length = 99 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,41 +1,69 @@ | ||
| name: CI | ||
|
|
||
| on: [push, pull_request] | ||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - develop | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| flake8: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@v1 | ||
| - name: Setup Python 3.8 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: 3.x | ||
| python-version: '3.8' | ||
|
|
||
| - name: Install flake8 | ||
| run: | | ||
| python -m pip install -U pip | ||
| pip install flake8 | ||
| - name: Setup uv | ||
| uses: astral-sh/setup-uv@v7 | ||
|
|
||
| - run: flake8 . | ||
| - name: Install dev dependencies | ||
| run: uv sync --group dev | ||
|
|
||
| - name: Run flake8 | ||
| run: uv run flake8 . | ||
|
|
||
| pydocstyle: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v1 | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@v1 | ||
| - name: Setup Python 3.8 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: 3.x | ||
| python-version: '3.8' | ||
|
|
||
| - name: Setup uv | ||
| uses: astral-sh/setup-uv@v7 | ||
|
|
||
| - name: Install pydocstyle | ||
| run: | | ||
| python -m pip install -U pip | ||
| pip install pydocstyle | ||
| - name: Install dev dependencies | ||
| run: uv sync --group dev | ||
|
|
||
| - name: Run pydocstyle (allow failure) | ||
| run: pydocstyle | ||
| working-directory: st3/sublime_lib | ||
| run: uv run pydocstyle src/sublime_lib | ||
| continue-on-error: true | ||
|
|
||
| mypy: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Python 3.8 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.8' | ||
|
|
||
| - name: Setup uv | ||
| uses: astral-sh/setup-uv@v7 | ||
|
|
||
| - name: Install dev dependencies | ||
| run: uv sync --group dev | ||
|
|
||
| - name: Run mypy (allow failure) | ||
| run: uv run mypy src | ||
| continue-on-error: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: Publish Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - v* | ||
|
|
||
| jobs: | ||
| release: | ||
| name: Create and publish release | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| permissions: | ||
| contents: write | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v7 | ||
|
|
||
| - name: Build wheel | ||
| run: uv build --wheel | ||
|
|
||
| - name: Create release & upload wheel | ||
| run: | | ||
| version=$(uv version --short) | ||
| gh release create --generate-notes --latest -t "$GITHUB_REF_NAME" "$GITHUB_REF_NAME" dist/*.whl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,16 @@ | ||
| # caches | ||
| __pycache__ | ||
| .mypy_cache | ||
| docs/html/ | ||
| docs/source/modules/ | ||
| *.doctree | ||
| *.pickle | ||
| modules.rst | ||
|
|
||
| # build artifacts | ||
| dist/ | ||
| _version.py | ||
|
|
||
| # docs build artifacts | ||
| /docs/html/ | ||
| /docs/doctrees/ | ||
|
|
||
| # editor files | ||
| *.sublime-project | ||
| *.sublime-workspace | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.8 |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| [project] | ||
| name = "sublime_lib" | ||
| dynamic = ["version"] | ||
| description = "Utility library for frequently used functionality in Sublime Text" | ||
| readme = "README.md" | ||
| license = {file = "LICENSE"} | ||
| authors = [{name = "FichteFoll"}, {name = "Thom1729"}] | ||
| classifiers = [ | ||
| "Intended Audience :: Developers", | ||
| "Operating System :: OS Independent", | ||
| "Programming Language :: Python :: 3", | ||
| "Topic :: Software Development :: Libraries :: Python Modules", | ||
| ] | ||
| requires-python = ">=3.8,<=3.9" | ||
|
|
||
| [build-system] | ||
| requires = ["hatchling>=1.20", "hatch-vcs>=0.4"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [dependency-groups] | ||
| dev = [ | ||
| "flake8>=3.9.2", | ||
| "mypy>=0.720", | ||
| "pydocstyle>=4.0.0", | ||
| "sphinx==4.0.2", | ||
| "sphinxcontrib-prettyspecialmethods>=0.1.0", | ||
| ] | ||
|
|
||
| [tool.hatch.build.targets.sdist] | ||
| exclude = [ | ||
| "/.*", | ||
| "/stubs", | ||
| "*.lock", | ||
| ] | ||
|
|
||
| [tool.hatch.version] | ||
| source = "vcs" | ||
|
|
||
| [tool.hatch.build.hooks.vcs] | ||
| version-file = "src/sublime_lib/_version.py" | ||
| tag-pattern = "v{version}" | ||
|
|
||
| [tool.coverage.run] | ||
| omit = [ | ||
| "*/tests/*", | ||
| ] | ||
|
|
||
| [tool.coverage.report] | ||
| show_missing = true | ||
|
|
||
| [tool.pydocstyle] | ||
| match_dir = "^(?!_)" | ||
| match = "^(?!_).*\\.py" | ||
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions
3
st3/sublime_lib/_util/collections.py → src/sublime_lib/_util/collections.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
st3/sublime_lib/_util/enum.py → src/sublime_lib/_util/enum.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
st3/sublime_lib/_util/guard.py → src/sublime_lib/_util/guard.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
st3/sublime_lib/_util/simple_yaml.py → src/sublime_lib/_util/simple_yaml.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
st3/sublime_lib/_util/weak_method.py → src/sublime_lib/_util/weak_method.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.