Skip to content

Commit

Permalink
chore: Expose __version__ (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonagestam authored Jul 26, 2024
1 parent bc0b80f commit 3367dd7
Show file tree
Hide file tree
Showing 7 changed files with 298 additions and 16 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,32 @@ jobs:
with:
python-version: "3.12"

type-check:
name: Type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip
cache-dependency-path: requirements.txt
check-latest: true
- name: mypy cache
uses: actions/cache@v4
with:
path: .mypy_cache
key: >-
${{ runner.os }}
-mypy
-3.12
-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-mypy-3.12
${{ runner.os }}-mypy
- run: pip install -r requirements.txt
- run: mypy --strict

check-build:
name: Check packaging metadata
uses: less-action/reusables/.github/workflows/python-test-build.yaml@main
Expand Down
15 changes: 0 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,6 @@ repos:
rev: "0.27.3"
hooks:
- id: check-github-workflows
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.7.1"
hooks:
- id: mypy
args: ["--strict"]
pass_filenames: false
additional_dependencies:
- pytest==7.4.3
- types-setuptools==69.0.0.0
- abcattrs==0.4.0
- typing-extensions==4.9.0
- hypothesis==6.92.1
- pydantic==2.5.2
- pydantic-core==2.14.5
- types-babel==2.11.0.15
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.1.0"
hooks:
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ recursive-exclude tests *
recursive-include src py.typed
exclude *.yaml
exclude *.yml
exclude *.txt
include README.md
include LICENSE
exclude generate-currencies.py
exclude generate-requirements.txt
exclude .gitignore
exclude setup.cfg
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.PHONY: requirements
requirements: export CUSTOM_COMPILE_COMMAND='make requirements'
requirements:
@pip-compile --all-extras
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,23 @@ test = [
"coverage",
"hypothesis",
]
type-check = [
"mypy",
"types-setuptools",
"types-babel",
]

[project.urls]
"Source Repository" = "https://github.com/antonagestam/immoney/"
"Bug Tracker" = "https://github.com/antonagestam/immoney/issues"


[tool.pip-tools]
generate-hashes = true
strip-extras = true
upgrade = true


[tool.black]
target-version = ["py310"]

Expand Down
252 changes: 252 additions & 0 deletions requirements.txt

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/immoney/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
from ._base import ParsableMoneyValue
from ._base import Round
from ._base import SubunitFraction
from ._version import __version__
from ._version import __version_tuple__

__all__ = (
"__version__",
"__version_tuple__",
"Money",
"Currency",
"SubunitFraction",
Expand Down

0 comments on commit 3367dd7

Please sign in to comment.