-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from amjith/pyproject
Pyproject
- Loading branch information
Showing
16 changed files
with
239 additions
and
230 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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,32 @@ | ||
name: fuzzyfinder | ||
|
||
on: | ||
pull_request: | ||
paths-ignore: | ||
- '**.rst' | ||
- 'docs' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: astral-sh/setup-uv@v1 | ||
with: | ||
version: "latest" | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Run unit tests | ||
run: uvx tox -e py${{ matrix.python-version }} | ||
|
||
- name: Run Style Checks | ||
run: uvx tox -e style |
This file contains 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,77 @@ | ||
name: Publish Python Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: astral-sh/setup-uv@v1 | ||
with: | ||
version: "latest" | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Run unit tests | ||
run: uvx tox -e py${{ matrix.python-version }} | ||
|
||
- name: Run Style Checks | ||
run: uvx tox -e style | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: astral-sh/setup-uv@v1 | ||
with: | ||
version: "latest" | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Install dependencies | ||
run: uv sync -p 3.12 | ||
|
||
- name: Build | ||
run: uv build | ||
|
||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-packages | ||
path: dist/ | ||
|
||
publish: | ||
name: Publish to PyPI | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
needs: [build] | ||
environment: release | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Download distribution packages | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-packages | ||
path: dist/ | ||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file was deleted.
Oops, something went wrong.
This file contains 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 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 |
---|---|---|
|
@@ -55,29 +55,21 @@ Ready to contribute? Here's how to set up `fuzzyfinder` for local development. | |
|
||
$ git clone [email protected]:your_name_here/fuzzyfinder.git | ||
|
||
3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: | ||
|
||
$ mkvirtualenv fuzzyfinder | ||
$ cd fuzzyfinder/ | ||
$ pip install -r dev-requirements.txt | ||
|
||
4. Create a branch for local development:: | ||
3. Create a branch for local development:: | ||
|
||
$ git checkout -b name-of-your-bugfix-or-feature | ||
|
||
Now you can make your changes locally. | ||
|
||
5. When you're done making changes, check that your changes pass the tests. This project uses py.test for testing and tox for running the tests on multiple versions of python:: | ||
4. When you're done making changes, check that your changes pass the tests. | ||
This project uses tox for running the tests on multiple versions of python:: | ||
|
||
$ py.test | ||
$ tox | ||
|
||
To get tox, just pip install tox into your virtualenv. | ||
|
||
6. Commit your changes and push your branch to GitHub:: | ||
5. Commit your changes and push your branch to GitHub:: | ||
|
||
$ git add . | ||
$ git commit -m "Your detailed description of your changes." | ||
$ git push origin name-of-your-bugfix-or-feature | ||
|
||
7. Submit a pull request through the GitHub website. | ||
6. Submit a pull request through the GitHub website. |
This file contains 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 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 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,15 +1,15 @@ | ||
# -*- coding: utf-8 -*- | ||
# ruff: noqa | ||
|
||
__author__ = 'Amjith Ramanujam' | ||
__email__ = '[email protected]' | ||
__version__ = '2.1.0' | ||
__version__ = "2.1.0" | ||
|
||
__all__ = [] | ||
|
||
|
||
def export(defn): | ||
"""Decorator to explicitly mark functions that are exposed in a lib.""" | ||
globals()[defn.__name__] = defn | ||
__all__.append(defn.__name__) | ||
return defn | ||
|
||
|
||
from . import main |
This file contains 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 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,29 @@ | ||
[project] | ||
name = "fuzzyfinder" | ||
dynamic = ["version"] | ||
description = "Fuzzy Finder implemented in Python." | ||
readme = "README.rst" | ||
requires-python = ">=3.8" | ||
license = {text = "BSD"} | ||
authors = [ | ||
{name = "Amjith Ramanujam", email = "[email protected]"} | ||
] | ||
urls = { "homepage" = "https://github.com/amjith/fuzzyfinder" } | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"coverage>=7.2.7", | ||
"pytest>=7.4.4", | ||
"pytest-cov>=4.1.0", | ||
"pdbpp>=0.10.3", | ||
] | ||
|
||
[tool.setuptools.packages.find] | ||
exclude = ["screenshots"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "fuzzyfinder.__version__"} | ||
|
||
[tool.ruff] | ||
line-length = 140 | ||
exclude = ["docs"] |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.