diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 2672f45..efae1e8 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -12,20 +12,23 @@ jobs: - name: Run 'pre-commit' uses: dycw/action-pre-commit@latest with: + token-checkout: ${{github.token}} + token-uv: ${{github.token}} repos: |- dycw/conformalize pre-commit/pre-commit-hooks - token-checkout: ${{secrets.GITHUB_TOKEN}} - token-uv: ${{secrets.GITHUB_TOKEN}} + sleep: 1 pyright: runs-on: ubuntu-latest steps: - name: Run 'pyright' uses: dycw/action-pyright@latest with: + token-checkout: ${{github.token}} + token-uv: ${{github.token}} python-version: "3.14" - token-checkout: ${{secrets.GITHUB_TOKEN}} - token-uv: ${{secrets.GITHUB_TOKEN}} + resolution: highest + prerelease: disallow pytest: env: CI: "1" @@ -36,10 +39,11 @@ jobs: - name: Run 'pytest' uses: dycw/action-pytest@latest with: + token-checkout: ${{github.token}} + token-uv: ${{github.token}} python-version: ${{matrix.python-version}} resolution: ${{matrix.resolution}} - token-checkout: ${{secrets.GITHUB_TOKEN}} - token-uv: ${{secrets.GITHUB_TOKEN}} + prerelease: disallow strategy: fail-fast: false matrix: @@ -50,11 +54,12 @@ jobs: - "3.14" resolution: - highest + - lowest-direct ruff: runs-on: ubuntu-latest steps: - name: Run 'ruff' uses: dycw/action-ruff@latest with: - token-checkout: ${{secrets.GITHUB_TOKEN}} - token-ruff: ${{secrets.GITHUB_TOKEN}} + token-checkout: ${{github.token}} + token-ruff: ${{github.token}} diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 95eb1ed..9ae844d 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -10,5 +10,7 @@ jobs: - name: Tag latest commit uses: dycw/action-tag@latest with: - token-checkout: ${{secrets.GITHUB_TOKEN}} - token-uv: ${{secrets.GITHUB_TOKEN}} + token-checkout: ${{github.token}} + token-uv: ${{github.token}} + user-name: github-actions-bot + user-email: noreply@github.com diff --git a/.gitignore b/.gitignore index 3f958f0..3bad797 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ +#### STANDARD GITIGNORE ####################################################### + # Byte-compiled / optimized / DLL files __pycache__/ -*.py[cod] +*.py[codz] *$py.class # C extensions @@ -27,8 +29,8 @@ share/python-wheels/ MANIFEST # PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec @@ -46,7 +48,7 @@ htmlcov/ nosetests.xml coverage.xml *.cover -*.py,cover +*.py.cover .hypothesis/ .pytest_cache/ cover/ @@ -92,22 +94,37 @@ ipython_config.py # However, in case of collaboration, if having platform-specific dependencies or dependencies # having no cross-platform support, pipenv may install dependencies that don't work, or not # install all needed dependencies. -#Pipfile.lock +# Pipfile.lock + +# UV +# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# uv.lock # poetry # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. # This is especially recommended for binary packages to ensure reproducibility, and is more # commonly ignored for libraries. # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock +# poetry.lock +# poetry.toml # pdm # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/#use-with-ide -.pdm.toml +# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python. +# https://pdm-project.org/en/latest/usage/project/#working-with-version-control +# pdm.lock +# pdm.toml +.pdm-python +.pdm-build/ + +# pixi +# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control. +# pixi.lock +# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one +# in the .venv directory. It is recommended not to include this directory in version control. +.pixi # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm __pypackages__/ @@ -116,11 +133,23 @@ __pypackages__/ celerybeat-schedule celerybeat.pid +# Redis +*.rdb +*.aof +*.pid + +# RabbitMQ +mnesia/ +rabbitmq/ +rabbitmq-data/ + +# ActiveMQ +activemq-data/ + # SageMath parsed files *.sage.py # Environments -.env .venv env/ venv/ @@ -153,13 +182,63 @@ dmypy.json cython_debug/ # PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +# .idea/ + +# Abstra +# Abstra is an AI-powered process automation framework. +# Ignore directories containing user credentials, local state, and settings. +# Learn more at https://abstra.io/docs +.abstra/ + +# Visual Studio Code +# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore +# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore +# and can be added to the global gitignore or merged into this file. However, if you prefer, +# you could uncomment the following to ignore the entire vscode folder +# .vscode/ + +# Ruff stuff: +.ruff_cache/ -# extra +# PyPI configuration file +.pypirc + +# Marimo +marimo/_static/ +marimo/_lsp/ +__marimo__/ + +# Streamlit +.streamlit/secrets.toml + +#### END OF STANDARD GITIGNORE ################################################ + +#### CUSTOM GITIGNORE ######################################################### + +**/*.csv +**/*.db +**/*.gz +**/*.html +**/*.ipc +**/*.ipynb +**/*.pdf +**/*.pickle +**/*.shelf +**/*.sqlite +**/*.tar.gz +**/*.tar.lz +**/*.tmp .direnv/ -.ruff_cache/ -Untitled.ipynb +.logs/ +htmls/ +ipcs/ +pdfs/ +pickles/ +shelves/ +tmp/ + +#### END OF CUSTOM GITIGNORE ################################################## diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 53d32f6..f7c74fe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/dycw/conformalize - rev: 0.12.0 + rev: 0.13.6 hooks: - args: - --description=Template for Python packages @@ -8,11 +8,11 @@ repos: - --envrc--uv - --github--pull-request--pre-commit - --github--pull-request--pyright - - --github--pull-request--pytest--os--macos - - --github--pull-request--pytest--os--ubuntu - - --github--pull-request--pytest--resolution--highest + - --github--pull-request--pytest--macos + - --github--pull-request--pytest--ubuntu - --github--pull-request--ruff - --github--push--tag + - --gitignore - --package-name=dycw-template-python - --pre-commit--dycw - --pre-commit--prettier @@ -44,7 +44,7 @@ repos: - --autofix - id: trailing-whitespace - repo: https://github.com/dycw/actions - rev: 0.3.31 + rev: 0.3.40 hooks: - id: format-requirements - id: replace-sequence-strs diff --git a/pyproject.toml b/pyproject.toml index 54ca062..0f356ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ [project] authors = [{ email = "d.wan@icloud.com", name = "Derek Wan" }] - dependencies = [] + dependencies = ["dycw-utilities >=0.176.1, <1"] description = "Template for Python packages" name = "dycw-template-python" readme = "README.md" diff --git a/uv.lock b/uv.lock index 4338401..affd0eb 100644 --- a/uv.lock +++ b/uv.lock @@ -113,6 +113,9 @@ wheels = [ name = "dycw-template-python" version = "0.1.0" source = { editable = "." } +dependencies = [ + { name = "dycw-utilities" }, +] [package.dev-dependencies] dev = [ @@ -122,6 +125,7 @@ dev = [ ] [package.metadata] +requires-dist = [{ name = "dycw-utilities", specifier = ">=0.176.1,<1" }] [package.metadata.requires-dev] dev = [ @@ -132,7 +136,7 @@ dev = [ [[package]] name = "dycw-utilities" -version = "0.175.38" +version = "0.176.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "atomicwrites" }, @@ -141,7 +145,7 @@ dependencies = [ { name = "whenever" }, ] wheels = [ - { url = "https://files.pythonhosted.org/packages/b4/a9/56a536e32392eb42d33ae3e48085072c47276304356b57809adc772a714b/dycw_utilities-0.175.38-py3-none-any.whl", hash = "sha256:8ce1ae95f8ee62d3ab5db8f38ae39b953cb1e81e0b984a456b81e6ee2890879b", size = 205397, upload-time = "2026-01-02T23:54:51.429Z" }, + { url = "https://files.pythonhosted.org/packages/25/bd/4238185b48ab5b294c55eca494b131bfff7ef06995e1088e4aaa19c80236/dycw_utilities-0.176.1-py3-none-any.whl", hash = "sha256:8d842aaaaf68f04cbe0da08051ade530d33021e1d0805a0e2bd0fdd56dec940d", size = 205359, upload-time = "2026-01-04T16:21:53.657Z" }, ] [package.optional-dependencies] @@ -183,14 +187,14 @@ wheels = [ [[package]] name = "hypothesis" -version = "6.148.11" +version = "6.148.13" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "sortedcontainers" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/d2/98/ccbc8a02b4e2c27e40e61718419aa0195b55bcd69260e81270b9ff39d61e/hypothesis-6.148.11.tar.gz", hash = "sha256:4f3c38030d0f0b38c8b7153d6907892e6fcac9ecb0410e627d6af2cea677f92c", size = 471909, upload-time = "2026-01-03T21:10:45.114Z" } +sdist = { url = "https://files.pythonhosted.org/packages/13/19/e21b48bcfd048dae16476890e7cf697349aa62045fbb983c6a12bb847401/hypothesis-6.148.13.tar.gz", hash = "sha256:490912e6201a1acce037cd1357431de18e717d8f1f5d17bc1b704789dadaebb5", size = 472902, upload-time = "2026-01-05T05:20:26.053Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/44/da/cf5888306ed6cfd76b50c736e996400b5ede43f28da967986b9f1138fabd/hypothesis-6.148.11-py3-none-any.whl", hash = "sha256:397b3fd13d0906cf5ece76f5da340a0fbb07bd18ab61ac41a7982ceb080312f0", size = 538838, upload-time = "2026-01-03T21:10:42.843Z" }, + { url = "https://files.pythonhosted.org/packages/08/c6/0db1433a008f9a4bb946c7e90be70fe7b761f42439c4a4c7c853002791d2/hypothesis-6.148.13-py3-none-any.whl", hash = "sha256:ab3ad77ffc4fdbcdecee225f68ff4893f9f83cfaae35f0a00b6797097a0e14d2", size = 540183, upload-time = "2026-01-05T05:20:24.156Z" }, ] [[package]]