funcy-bear 0.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- funcy_bear-0.0.2/.claude/settings.local.json +9 -0
- funcy_bear-0.0.2/.copier-answers.yml +19 -0
- funcy_bear-0.0.2/.github/workflows/ci.yml +45 -0
- funcy_bear-0.0.2/.github/workflows/claude-code-review.yml +57 -0
- funcy_bear-0.0.2/.github/workflows/claude.yml +50 -0
- funcy_bear-0.0.2/.github/workflows/release.yml +46 -0
- funcy_bear-0.0.2/.gitignore +216 -0
- funcy_bear-0.0.2/.python_version +1 -0
- funcy_bear-0.0.2/CHANGELOG.md +8 -0
- funcy_bear-0.0.2/CLAUDE.md +121 -0
- funcy_bear-0.0.2/PKG-INFO +30 -0
- funcy_bear-0.0.2/README.md +18 -0
- funcy_bear-0.0.2/config/coverage.ini +25 -0
- funcy_bear-0.0.2/config/funcy_bear/test.toml +4 -0
- funcy_bear-0.0.2/config/git-changelog.toml +9 -0
- funcy_bear-0.0.2/config/pytest.ini +25 -0
- funcy_bear-0.0.2/config/ruff.toml +142 -0
- funcy_bear-0.0.2/directory_structure.xml +120 -0
- funcy_bear-0.0.2/hatch_build.py +122 -0
- funcy_bear-0.0.2/maskfile.md +121 -0
- funcy_bear-0.0.2/noxfile.py +64 -0
- funcy_bear-0.0.2/pyproject.toml +88 -0
- funcy_bear-0.0.2/src/funcy_bear/__init__.py +7 -0
- funcy_bear-0.0.2/src/funcy_bear/__main__.py +14 -0
- funcy_bear-0.0.2/src/funcy_bear/_internal/__init__.py +0 -0
- funcy_bear-0.0.2/src/funcy_bear/_internal/_info.py +169 -0
- funcy_bear-0.0.2/src/funcy_bear/_internal/_version.pyi +6 -0
- funcy_bear-0.0.2/src/funcy_bear/_internal/_versioning.py +111 -0
- funcy_bear-0.0.2/src/funcy_bear/_internal/cli.py +66 -0
- funcy_bear-0.0.2/src/funcy_bear/_internal/debug.py +105 -0
- funcy_bear-0.0.2/src/funcy_bear/api.py +70 -0
- funcy_bear-0.0.2/src/funcy_bear/constants/__init__.py +69 -0
- funcy_bear-0.0.2/src/funcy_bear/constants/binary_types.py +258 -0
- funcy_bear-0.0.2/src/funcy_bear/constants/exceptions.py +90 -0
- funcy_bear-0.0.2/src/funcy_bear/constants/exit_code.py +30 -0
- funcy_bear-0.0.2/src/funcy_bear/constants/file_size.py +67 -0
- funcy_bear-0.0.2/src/funcy_bear/context/__init__.py +14 -0
- funcy_bear-0.0.2/src/funcy_bear/context/arg_helpers.py +122 -0
- funcy_bear-0.0.2/src/funcy_bear/context/di/README.md +127 -0
- funcy_bear-0.0.2/src/funcy_bear/context/di/__init__.py +26 -0
- funcy_bear-0.0.2/src/funcy_bear/context/di/_container_meta.py +115 -0
- funcy_bear-0.0.2/src/funcy_bear/context/di/_param.py +98 -0
- funcy_bear-0.0.2/src/funcy_bear/context/di/container.py +90 -0
- funcy_bear-0.0.2/src/funcy_bear/context/di/container_attrs.py +65 -0
- funcy_bear-0.0.2/src/funcy_bear/context/di/plugin_containers.py +147 -0
- funcy_bear-0.0.2/src/funcy_bear/context/di/plugins.py +132 -0
- funcy_bear-0.0.2/src/funcy_bear/context/di/provides.py +118 -0
- funcy_bear-0.0.2/src/funcy_bear/context/di/provides.pyi +38 -0
- funcy_bear-0.0.2/src/funcy_bear/context/di/resources.py +243 -0
- funcy_bear-0.0.2/src/funcy_bear/context/di/types.py +30 -0
- funcy_bear-0.0.2/src/funcy_bear/context/di/wiring.py +136 -0
- funcy_bear-0.0.2/src/funcy_bear/exceptions.py +27 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/__init__.py +1 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/_di_containers.py +22 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/binarystuffs.py +189 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/collections_ops/__init__.py +1 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/collections_ops/dict_stuffs.py +128 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/collections_ops/iter_stuffs.py +549 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/collections_ops/key_counts.py +95 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/curried_ops.py +520 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/dispatch.py +109 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/func_stuffs.py +298 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/math/README.md +74 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/math/__init__.py +30 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/math/general.py +168 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/math/infinity.py +123 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/strings/README.md +100 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/strings/__init__.py +1 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/strings/dot_template.py +172 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/strings/flatten_data.py +110 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/strings/manipulation.py +337 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/strings/sorting_name.py +206 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/strings/string_stuffs.py +29 -0
- funcy_bear-0.0.2/src/funcy_bear/ops/value_stuffs.py +79 -0
- funcy_bear-0.0.2/src/funcy_bear/py.typed +0 -0
- funcy_bear-0.0.2/src/funcy_bear/randoms/README.md +63 -0
- funcy_bear-0.0.2/src/funcy_bear/randoms/__init__.py +17 -0
- funcy_bear-0.0.2/src/funcy_bear/randoms/_rnd.py +269 -0
- funcy_bear-0.0.2/src/funcy_bear/randoms/dice.py +317 -0
- funcy_bear-0.0.2/src/funcy_bear/randoms/random_bits.py +22 -0
- funcy_bear-0.0.2/src/funcy_bear/sentinels.py +168 -0
- funcy_bear-0.0.2/src/funcy_bear/system_bools.py +100 -0
- funcy_bear-0.0.2/src/funcy_bear/tools/__init__.py +10 -0
- funcy_bear-0.0.2/src/funcy_bear/tools/constant.py +122 -0
- funcy_bear-0.0.2/src/funcy_bear/tools/currying.py +52 -0
- funcy_bear-0.0.2/src/funcy_bear/tools/dispatcher.py +112 -0
- funcy_bear-0.0.2/src/funcy_bear/tools/freezing.py +91 -0
- funcy_bear-0.0.2/src/funcy_bear/tools/freezing.pyi +38 -0
- funcy_bear-0.0.2/src/funcy_bear/tools/general_base.py +186 -0
- funcy_bear-0.0.2/src/funcy_bear/tools/list_merger.py +83 -0
- funcy_bear-0.0.2/src/funcy_bear/tools/lru_cache.py +94 -0
- funcy_bear-0.0.2/src/funcy_bear/tools/names.py +222 -0
- funcy_bear-0.0.2/src/funcy_bear/tools/priority_queue.py +113 -0
- funcy_bear-0.0.2/src/funcy_bear/tools/simple_queue.py +48 -0
- funcy_bear-0.0.2/src/funcy_bear/tools/simple_stack.py +28 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/__init__.py +142 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/builtin_tools.py +49 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/constants.py +120 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/conversions/__init__.py +24 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/conversions/str_to_bool.py +21 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/conversions/string_eval.py +68 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/conversions/to_type.py +154 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/conversions/type_to_string.py +70 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/hint.py +28 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/inference/__init__.py +5 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/inference/runtime.py +245 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/introspection/__init__.py +21 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/introspection/_helpers.py +155 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/introspection/general.py +177 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/validate.py +73 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/validators/__init__.py +1 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/validators/annotations.py +46 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/validators/helpers.py +107 -0
- funcy_bear-0.0.2/src/funcy_bear/type_stuffs/validators/predicates.py +319 -0
- funcy_bear-0.0.2/tests/__init__.py +7 -0
- funcy_bear-0.0.2/tests/conftest.py +7 -0
- funcy_bear-0.0.2/tests/operations/__init__.py +1 -0
- funcy_bear-0.0.2/tests/operations/test_dispatcher.py +247 -0
- funcy_bear-0.0.2/tests/operations/test_iterstuffs.py +51 -0
- funcy_bear-0.0.2/tests/operations/test_list_merge.py +64 -0
- funcy_bear-0.0.2/tests/operations/test_operations_conditional.py +182 -0
- funcy_bear-0.0.2/tests/test_api.py +122 -0
- funcy_bear-0.0.2/tests/test_cache_freezing.py +84 -0
- funcy_bear-0.0.2/tests/test_cli.py +56 -0
- funcy_bear-0.0.2/tests/test_config.py +16 -0
- funcy_bear-0.0.2/tests/test_di_system.py +542 -0
- funcy_bear-0.0.2/tests/test_infinite.py +25 -0
- funcy_bear-0.0.2/tests/test_names.py +130 -0
- funcy_bear-0.0.2/tests/test_ops_func_stuffs.py +51 -0
- funcy_bear-0.0.2/tests/test_priority_queue.py +59 -0
- funcy_bear-0.0.2/tests/test_sentinels.py +30 -0
- funcy_bear-0.0.2/tests/test_sorting_name.py +267 -0
- funcy_bear-0.0.2/tests/test_system_bools.py +289 -0
- funcy_bear-0.0.2/tests/test_tool_container.py +63 -0
- funcy_bear-0.0.2/tests/test_typing_tools.py +280 -0
- funcy_bear-0.0.2/uv.lock +588 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changes here will be overwritten by Copier.
|
|
2
|
+
_commit: v0.3.5
|
|
3
|
+
_src_path: gh:sicksubroutine/python-template
|
|
4
|
+
author_email: git@tachyon.top
|
|
5
|
+
author_fullname: chaz
|
|
6
|
+
include_cli: true
|
|
7
|
+
include_docker: false
|
|
8
|
+
include_docs: false
|
|
9
|
+
include_fastapi: false
|
|
10
|
+
interactive_cli: false
|
|
11
|
+
minimum_python_version: '3.13'
|
|
12
|
+
project_description: A FP Based Repo
|
|
13
|
+
project_name: Funcy Bear
|
|
14
|
+
python_package_command_line_name: funcy-bear
|
|
15
|
+
python_package_distribution_name: funcy-bear
|
|
16
|
+
python_package_import_name: funcy_bear
|
|
17
|
+
setup_project: true
|
|
18
|
+
starting_version: 0.0.1
|
|
19
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
|
|
9
|
+
defaults:
|
|
10
|
+
run:
|
|
11
|
+
shell: bash
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
LANG: en_US.utf-8
|
|
15
|
+
LC_ALL: en_US.utf-8
|
|
16
|
+
PYTHONIOENCODING: UTF-8
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
quality:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
- name: Setup UV
|
|
24
|
+
uses: astral-sh/setup-uv@v5
|
|
25
|
+
with:
|
|
26
|
+
enable-cache: true
|
|
27
|
+
cache-dependency-glob: pyproject.toml
|
|
28
|
+
python-version: "3.13"
|
|
29
|
+
|
|
30
|
+
- name: Install Dependencies
|
|
31
|
+
run: |
|
|
32
|
+
uv sync
|
|
33
|
+
source .venv/bin/activate
|
|
34
|
+
|
|
35
|
+
- name: Install Nox
|
|
36
|
+
run: uv tool install nox
|
|
37
|
+
|
|
38
|
+
- name: Check the Code Quality
|
|
39
|
+
run: nox -s ruff_fix
|
|
40
|
+
|
|
41
|
+
- name: Check if the code is correctly typed
|
|
42
|
+
run: nox -s pyright
|
|
43
|
+
|
|
44
|
+
- name: Run Tests
|
|
45
|
+
run: pytest -v
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Claude Code Review
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, synchronize]
|
|
6
|
+
# Optional: Only run on specific file changes
|
|
7
|
+
# paths:
|
|
8
|
+
# - "src/**/*.ts"
|
|
9
|
+
# - "src/**/*.tsx"
|
|
10
|
+
# - "src/**/*.js"
|
|
11
|
+
# - "src/**/*.jsx"
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
claude-review:
|
|
15
|
+
# Optional: Filter by PR author
|
|
16
|
+
# if: |
|
|
17
|
+
# github.event.pull_request.user.login == 'external-contributor' ||
|
|
18
|
+
# github.event.pull_request.user.login == 'new-developer' ||
|
|
19
|
+
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
|
|
20
|
+
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
permissions:
|
|
23
|
+
contents: read
|
|
24
|
+
pull-requests: read
|
|
25
|
+
issues: read
|
|
26
|
+
id-token: write
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
- name: Checkout repository
|
|
30
|
+
uses: actions/checkout@v4
|
|
31
|
+
with:
|
|
32
|
+
fetch-depth: 1
|
|
33
|
+
|
|
34
|
+
- name: Run Claude Code Review
|
|
35
|
+
id: claude-review
|
|
36
|
+
uses: anthropics/claude-code-action@v1
|
|
37
|
+
with:
|
|
38
|
+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
39
|
+
prompt: |
|
|
40
|
+
REPO: ${{ github.repository }}
|
|
41
|
+
PR NUMBER: ${{ github.event.pull_request.number }}
|
|
42
|
+
|
|
43
|
+
Please review this pull request and provide feedback on:
|
|
44
|
+
- Code quality and best practices
|
|
45
|
+
- Potential bugs or issues
|
|
46
|
+
- Performance considerations
|
|
47
|
+
- Security concerns
|
|
48
|
+
- Test coverage
|
|
49
|
+
|
|
50
|
+
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
|
|
51
|
+
|
|
52
|
+
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
|
|
53
|
+
|
|
54
|
+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
|
55
|
+
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
|
|
56
|
+
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
|
|
57
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: Claude Code
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
issue_comment:
|
|
5
|
+
types: [created]
|
|
6
|
+
pull_request_review_comment:
|
|
7
|
+
types: [created]
|
|
8
|
+
issues:
|
|
9
|
+
types: [opened, assigned]
|
|
10
|
+
pull_request_review:
|
|
11
|
+
types: [submitted]
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
claude:
|
|
15
|
+
if: |
|
|
16
|
+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
17
|
+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
|
|
18
|
+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
|
|
19
|
+
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
pull-requests: read
|
|
24
|
+
issues: read
|
|
25
|
+
id-token: write
|
|
26
|
+
actions: read # Required for Claude to read CI results on PRs
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout repository
|
|
29
|
+
uses: actions/checkout@v4
|
|
30
|
+
with:
|
|
31
|
+
fetch-depth: 1
|
|
32
|
+
|
|
33
|
+
- name: Run Claude Code
|
|
34
|
+
id: claude
|
|
35
|
+
uses: anthropics/claude-code-action@v1
|
|
36
|
+
with:
|
|
37
|
+
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
38
|
+
|
|
39
|
+
# This is an optional setting that allows Claude to read CI results on PRs
|
|
40
|
+
additional_permissions: |
|
|
41
|
+
actions: read
|
|
42
|
+
|
|
43
|
+
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
|
|
44
|
+
# prompt: 'Update the pull request description to include a summary of changes.'
|
|
45
|
+
|
|
46
|
+
# Optional: Add claude_args to customize behavior and configuration
|
|
47
|
+
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
|
48
|
+
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
|
|
49
|
+
# claude_args: '--allowed-tools Bash(gh pr:*)'
|
|
50
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: release
|
|
2
|
+
|
|
3
|
+
on: push
|
|
4
|
+
permissions:
|
|
5
|
+
contents: write
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
release:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
11
|
+
steps:
|
|
12
|
+
- name: Checkout
|
|
13
|
+
uses: actions/checkout@v4
|
|
14
|
+
with:
|
|
15
|
+
fetch-depth: 0
|
|
16
|
+
fetch-tags: true
|
|
17
|
+
#
|
|
18
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
19
|
+
#
|
|
20
|
+
name: Setup Python
|
|
21
|
+
uses: actions/setup-python@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.13"
|
|
24
|
+
- name: Setup uv
|
|
25
|
+
uses: astral-sh/setup-uv@v5
|
|
26
|
+
- name: Update changelog
|
|
27
|
+
run: uv tool run git-changelog --config-file config/git-changelog.toml
|
|
28
|
+
- name: Commit updated changelog
|
|
29
|
+
run: |
|
|
30
|
+
git config --local user.email "action@github.com"
|
|
31
|
+
git config --local user.name "GitHub Action"
|
|
32
|
+
git add CHANGELOG.md
|
|
33
|
+
if git diff --staged --quiet; then
|
|
34
|
+
echo "No changelog changes to commit"
|
|
35
|
+
else
|
|
36
|
+
git commit -m "chore: update changelog for $(git describe --tags --abbrev=0)"
|
|
37
|
+
#
|
|
38
|
+
git push origin HEAD:${{ github.event.repository.default_branch }} || echo "Failed to push changelog update, but continuing with release"
|
|
39
|
+
#
|
|
40
|
+
fi
|
|
41
|
+
- name: Prepare release notes
|
|
42
|
+
run: uv tool run git-changelog --release-notes > release-notes.md
|
|
43
|
+
- name: Create release
|
|
44
|
+
uses: softprops/action-gh-release@v2
|
|
45
|
+
with:
|
|
46
|
+
body_path: release-notes.md
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# Created by https://www.toptal.com/developers/gitignore/api/python,macos,shell
|
|
2
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=python,macos,shell
|
|
3
|
+
|
|
4
|
+
### macOS ###
|
|
5
|
+
# General
|
|
6
|
+
.DS_Store
|
|
7
|
+
.AppleDouble
|
|
8
|
+
.LSOverride
|
|
9
|
+
|
|
10
|
+
# Icon must end with two \r
|
|
11
|
+
Icon
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# Thumbnails
|
|
15
|
+
._*
|
|
16
|
+
|
|
17
|
+
# Files that might appear in the root of a volume
|
|
18
|
+
.DocumentRevisions-V100
|
|
19
|
+
.fseventsd
|
|
20
|
+
.Spotlight-V100
|
|
21
|
+
.TemporaryItems
|
|
22
|
+
.Trashes
|
|
23
|
+
.VolumeIcon.icns
|
|
24
|
+
.com.apple.timemachine.donotpresent
|
|
25
|
+
|
|
26
|
+
# Directories potentially created on remote AFP share
|
|
27
|
+
.AppleDB
|
|
28
|
+
.AppleDesktop
|
|
29
|
+
Network Trash Folder
|
|
30
|
+
Temporary Items
|
|
31
|
+
.apdisk
|
|
32
|
+
|
|
33
|
+
### macOS Patch ###
|
|
34
|
+
# iCloud generated files
|
|
35
|
+
*.icloud
|
|
36
|
+
|
|
37
|
+
### Python ###
|
|
38
|
+
# Byte-compiled / optimized / DLL files
|
|
39
|
+
__pycache__/
|
|
40
|
+
*.py[cod]
|
|
41
|
+
*$py.class
|
|
42
|
+
|
|
43
|
+
# C extensions
|
|
44
|
+
*.so
|
|
45
|
+
|
|
46
|
+
# Distribution / packaging
|
|
47
|
+
.Python
|
|
48
|
+
build/
|
|
49
|
+
develop-eggs/
|
|
50
|
+
dist/
|
|
51
|
+
downloads/
|
|
52
|
+
eggs/
|
|
53
|
+
.eggs/
|
|
54
|
+
lib/
|
|
55
|
+
lib64/
|
|
56
|
+
parts/
|
|
57
|
+
sdist/
|
|
58
|
+
var/
|
|
59
|
+
wheels/
|
|
60
|
+
share/python-wheels/
|
|
61
|
+
*.egg-info/
|
|
62
|
+
.installed.cfg
|
|
63
|
+
*.egg
|
|
64
|
+
MANIFEST
|
|
65
|
+
|
|
66
|
+
# PyInstaller
|
|
67
|
+
# Usually these files are written by a python script from a template
|
|
68
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
69
|
+
*.manifest
|
|
70
|
+
*.spec
|
|
71
|
+
|
|
72
|
+
# Installer logs
|
|
73
|
+
pip-log.txt
|
|
74
|
+
pip-delete-this-directory.txt
|
|
75
|
+
|
|
76
|
+
# Unit test / coverage reports
|
|
77
|
+
htmlcov/
|
|
78
|
+
.tox/
|
|
79
|
+
.nox/
|
|
80
|
+
.coverage
|
|
81
|
+
.coverage.*
|
|
82
|
+
.cache
|
|
83
|
+
nosetests.xml
|
|
84
|
+
coverage.xml
|
|
85
|
+
*.cover
|
|
86
|
+
*.py,cover
|
|
87
|
+
.hypothesis/
|
|
88
|
+
.pytest_cache/
|
|
89
|
+
cover/
|
|
90
|
+
|
|
91
|
+
# Translations
|
|
92
|
+
*.mo
|
|
93
|
+
*.pot
|
|
94
|
+
|
|
95
|
+
# Django stuff:
|
|
96
|
+
*.log
|
|
97
|
+
local_settings.py
|
|
98
|
+
db.sqlite3
|
|
99
|
+
db.sqlite3-journal
|
|
100
|
+
|
|
101
|
+
# Flask stuff:
|
|
102
|
+
instance/
|
|
103
|
+
.webassets-cache
|
|
104
|
+
|
|
105
|
+
# Scrapy stuff:
|
|
106
|
+
.scrapy
|
|
107
|
+
|
|
108
|
+
# Sphinx documentation
|
|
109
|
+
docs/_build/
|
|
110
|
+
|
|
111
|
+
# PyBuilder
|
|
112
|
+
.pybuilder/
|
|
113
|
+
target/
|
|
114
|
+
|
|
115
|
+
# Jupyter Notebook
|
|
116
|
+
.ipynb_checkpoints
|
|
117
|
+
|
|
118
|
+
# IPython
|
|
119
|
+
profile_default/
|
|
120
|
+
ipython_config.py
|
|
121
|
+
|
|
122
|
+
# pyenv
|
|
123
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
124
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
125
|
+
.python-version
|
|
126
|
+
|
|
127
|
+
# pipenv
|
|
128
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
129
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
130
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
131
|
+
# install all needed dependencies.
|
|
132
|
+
#Pipfile.lock
|
|
133
|
+
|
|
134
|
+
# poetry
|
|
135
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
136
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
137
|
+
# commonly ignored for libraries.
|
|
138
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
139
|
+
#poetry.lock
|
|
140
|
+
|
|
141
|
+
# pdm
|
|
142
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
143
|
+
#pdm.lock
|
|
144
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
145
|
+
# in version control.
|
|
146
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
147
|
+
.pdm.toml
|
|
148
|
+
|
|
149
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
150
|
+
__pypackages__/
|
|
151
|
+
|
|
152
|
+
# Celery stuff
|
|
153
|
+
celerybeat-schedule
|
|
154
|
+
celerybeat.pid
|
|
155
|
+
|
|
156
|
+
# SageMath parsed files
|
|
157
|
+
*.sage.py
|
|
158
|
+
|
|
159
|
+
# Environments
|
|
160
|
+
.env
|
|
161
|
+
.venv
|
|
162
|
+
env/
|
|
163
|
+
venv/
|
|
164
|
+
ENV/
|
|
165
|
+
env.bak/
|
|
166
|
+
venv.bak/
|
|
167
|
+
|
|
168
|
+
# Spyder project settings
|
|
169
|
+
.spyderproject
|
|
170
|
+
.spyproject
|
|
171
|
+
|
|
172
|
+
# Rope project settings
|
|
173
|
+
.ropeproject
|
|
174
|
+
|
|
175
|
+
# mkdocs documentation
|
|
176
|
+
/site
|
|
177
|
+
|
|
178
|
+
# mypy
|
|
179
|
+
.mypy_cache/
|
|
180
|
+
.dmypy.json
|
|
181
|
+
dmypy.json
|
|
182
|
+
``
|
|
183
|
+
# Pyre type checker
|
|
184
|
+
.pyre/
|
|
185
|
+
|
|
186
|
+
# pytype static type analyzer
|
|
187
|
+
.pytype/
|
|
188
|
+
|
|
189
|
+
# Cython debug symbols
|
|
190
|
+
cython_debug/
|
|
191
|
+
|
|
192
|
+
# PyCharm
|
|
193
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
194
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
195
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
196
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
197
|
+
.idea/
|
|
198
|
+
|
|
199
|
+
### Python Patch ###
|
|
200
|
+
# Poetry local configuration file `
|
|
201
|
+
|
|
202
|
+
# ruff
|
|
203
|
+
.ruff_cache/
|
|
204
|
+
|
|
205
|
+
# LSP config files
|
|
206
|
+
pyrightconfig.json
|
|
207
|
+
|
|
208
|
+
.vscode/
|
|
209
|
+
|
|
210
|
+
*.db
|
|
211
|
+
*.log
|
|
212
|
+
**/_internal/_version.py
|
|
213
|
+
|
|
214
|
+
!/project/.vscode
|
|
215
|
+
|
|
216
|
+
**/prod.toml
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
<!-- insertion marker -->
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
funcy-bear A FP Based Repo
|
|
8
|
+
|
|
9
|
+
This project was generated from [python-template](https://github.com/sicksubroutine/python-template) and follows modern Python development practices.
|
|
10
|
+
|
|
11
|
+
## Development Commands
|
|
12
|
+
|
|
13
|
+
### Package Management
|
|
14
|
+
```bash
|
|
15
|
+
uv sync # Install dependencies
|
|
16
|
+
uv build # Build the package
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### CLI Testing
|
|
20
|
+
```bash
|
|
21
|
+
funcy-bear --help # Show available commands
|
|
22
|
+
funcy-bear version # Get current version
|
|
23
|
+
funcy-bear bump patch # Bump version (patch/minor/major)
|
|
24
|
+
funcy-bear debug_info # Show environment info
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Code Quality
|
|
29
|
+
```bash
|
|
30
|
+
nox -s ruff_check # Check code formatting and linting (CI-friendly)
|
|
31
|
+
nox -s ruff_fix # Fix code formatting and linting issues
|
|
32
|
+
nox -s pyright # Run static type checking
|
|
33
|
+
nox -s tests # Run test suite
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Version Management
|
|
37
|
+
```bash
|
|
38
|
+
git tag v1.0.0 # Manual version tagging
|
|
39
|
+
funcy-bear bump patch # Automated version bump with git tag
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Architecture
|
|
43
|
+
|
|
44
|
+
### Core Components
|
|
45
|
+
|
|
46
|
+
- **CLI Module** (`src/funcy_bear/_internal/cli.py`): Main CLI interface using Typer with dependency injection
|
|
47
|
+
- **Dependency Injection** (`src/funcy_bear/_internal/_di.py`): Uses `dependency-injector` for IoC container
|
|
48
|
+
- **Debug/Info** (`src/funcy_bear/_internal/debug.py`): Environment and package information utilities
|
|
49
|
+
- **Version Management** (`src/funcy_bear/_internal/_version.py`): Dynamic versioning from git tags
|
|
50
|
+
- **Configuration** (`src/funcy_bear/config.py`): Application configuration with Pydantic
|
|
51
|
+
|
|
52
|
+
### Key Dependencies
|
|
53
|
+
|
|
54
|
+
- **bear-utils**: Custom CLI utilities and logging framework
|
|
55
|
+
- **dependency-injector**: IoC container for CLI components
|
|
56
|
+
- **typer**: CLI framework with rich output
|
|
57
|
+
- **pydantic**: Data validation and settings management
|
|
58
|
+
- **ruff**: Code formatting and linting
|
|
59
|
+
- **pyright**: Static type checking
|
|
60
|
+
- **pytest**: Testing framework
|
|
61
|
+
- **nox**: Task automation
|
|
62
|
+
### Design Patterns
|
|
63
|
+
|
|
64
|
+
1. **Dependency Injection**: CLI components use DI container for loose coupling
|
|
65
|
+
2. **Resource Management**: Context managers for console and Typer app lifecycle
|
|
66
|
+
3. **Dynamic Versioning**: Git-based versioning with fallback to package metadata
|
|
67
|
+
4. **Configuration Management**: Pydantic models for type-safe configuration
|
|
68
|
+
|
|
69
|
+
## Project Structure
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
funcy_bear/
|
|
73
|
+
├── _internal/ # Internal implementation details
|
|
74
|
+
│ ├── cli.py # CLI interface
|
|
75
|
+
│ ├── debug.py # Debug utilities
|
|
76
|
+
│ ├── _di.py # Dependency injection setup
|
|
77
|
+
│ ├── _info.py # Package metadata
|
|
78
|
+
│ └── _version.py # Version information
|
|
79
|
+
├── config.py # Configuration management
|
|
80
|
+
└── __init__.py # Public API
|
|
81
|
+
|
|
82
|
+
tests/ # Test suite
|
|
83
|
+
config/ # Development configuration files
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Development Notes
|
|
87
|
+
|
|
88
|
+
- **Minimum Python Version**: 3.13
|
|
89
|
+
- **Dynamic Versioning**: Requires git tags (format: `v1.2.3`)
|
|
90
|
+
- **Modern Python**: Uses built-in types (`list`, `dict`) and `collections.abc` imports
|
|
91
|
+
- **Type Checking**: Full type hints with pyright in strict mode
|
|
92
|
+
## Configuration
|
|
93
|
+
|
|
94
|
+
The project uses environment-based configuration with Pydantic models. Configuration files are located in the `config/funcy_bear/` directory and support multiple environments (prod, test).
|
|
95
|
+
|
|
96
|
+
Key environment variables:
|
|
97
|
+
- `FUNCY_BEAR_ENV`: Set environment (prod/test)
|
|
98
|
+
- `FUNCY_BEAR_DEBUG`: Enable debug mode
|
|
99
|
+
|
|
100
|
+
## Claude Code Collaboration Patterns
|
|
101
|
+
|
|
102
|
+
### TODO(human) Pattern
|
|
103
|
+
When Claude encounters a `TODO(human)` comment in the code, it indicates a spot where human input and decision-making is specifically requested. This pattern encourages collaborative development by:
|
|
104
|
+
- Highlighting areas where human expertise or preference is valuable
|
|
105
|
+
- Creating natural breakpoints for code review and discussion
|
|
106
|
+
- Maintaining a playful, interactive development experience
|
|
107
|
+
|
|
108
|
+
Example:
|
|
109
|
+
```python
|
|
110
|
+
def complex_business_logic():
|
|
111
|
+
"""Handle complex business rules."""
|
|
112
|
+
# TODO(human) - Implement the validation logic here
|
|
113
|
+
pass
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### TODO(claude) Pattern <33333
|
|
117
|
+
When you see a `TODO(claude)` comment, it signifies that the Human is being cheeky and wants Claude to take the lead on that section of code. This pattern is a fun way to delegate tasks to Claude while keeping the Human engaged in the development process.
|
|
118
|
+
|
|
119
|
+
This pattern has become a beloved inside joke and effective collaboration tool in this codebase! 🤠✨
|
|
120
|
+
|
|
121
|
+
When making changes, ensure all tests pass and code quality checks succeed before committing.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: funcy-bear
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: Bear's functional programming playground: currying, dispatching, type magic, and chaos - all with bearly any dependencies
|
|
5
|
+
Author-email: chaz <git@tachyon.top>
|
|
6
|
+
Keywords: bear,currying,dispatcher,functional-programming,type-introspection,utilities
|
|
7
|
+
Requires-Python: >=3.13
|
|
8
|
+
Requires-Dist: lazy-bear>=0.0.7
|
|
9
|
+
Requires-Dist: rich>=14.2.0
|
|
10
|
+
Requires-Dist: singleton-base>=1.2.4
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# Funcy Bear
|
|
15
|
+
|
|
16
|
+
[](https://pypi.org/project/funcy-bear/)
|
|
17
|
+
|
|
18
|
+
A FP Based Repo
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install funcy-bear
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
With [`uv`](https://docs.astral.sh/uv/):
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
uv tool install funcy-bear
|
|
30
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
# Funcy Bear
|
|
3
|
+
|
|
4
|
+
[](https://pypi.org/project/funcy-bear/)
|
|
5
|
+
|
|
6
|
+
A FP Based Repo
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pip install funcy-bear
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
With [`uv`](https://docs.astral.sh/uv/):
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
uv tool install funcy-bear
|
|
18
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[coverage:run]
|
|
2
|
+
branch = true
|
|
3
|
+
parallel = true
|
|
4
|
+
source =
|
|
5
|
+
src/
|
|
6
|
+
tests/
|
|
7
|
+
|
|
8
|
+
[coverage:paths]
|
|
9
|
+
equivalent =
|
|
10
|
+
src/
|
|
11
|
+
.venv/lib/*/site-packages/
|
|
12
|
+
.venvs/*/lib/*/site-packages/
|
|
13
|
+
|
|
14
|
+
[coverage:report]
|
|
15
|
+
precision = 2
|
|
16
|
+
omit =
|
|
17
|
+
src/*/__init__.py
|
|
18
|
+
src/*/__main__.py
|
|
19
|
+
tests/__init__.py
|
|
20
|
+
exclude_lines =
|
|
21
|
+
pragma: no cover
|
|
22
|
+
if TYPE_CHECKING
|
|
23
|
+
|
|
24
|
+
[coverage:json]
|
|
25
|
+
output = htmlcov/coverage.json
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[pytest]
|
|
2
|
+
python_files =
|
|
3
|
+
test_*.py
|
|
4
|
+
asyncio_mode = auto
|
|
5
|
+
pythonpath = src
|
|
6
|
+
addopts =
|
|
7
|
+
-v
|
|
8
|
+
-s
|
|
9
|
+
; --cov
|
|
10
|
+
; --cov-config config/coverage.ini
|
|
11
|
+
testpaths =
|
|
12
|
+
tests
|
|
13
|
+
filterwarnings =
|
|
14
|
+
ignore::DeprecationWarning
|
|
15
|
+
ignore::PendingDeprecationWarning
|
|
16
|
+
ignore::FutureWarning
|
|
17
|
+
ignore::ImportWarning
|
|
18
|
+
ignore::ResourceWarning
|
|
19
|
+
ignore::UserWarning
|
|
20
|
+
|
|
21
|
+
# action:message_regex:warning_class:module_regex:line
|
|
22
|
+
; filterwarnings =
|
|
23
|
+
; error
|
|
24
|
+
; # TODO: remove once pytest-xdist 4 is released
|
|
25
|
+
; ignore:.*rsyncdir:DeprecationWarning:xdist
|