timevec 0.3.0__tar.gz → 0.3.1__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.
Files changed (43) hide show
  1. {timevec-0.3.0 → timevec-0.3.1}/.github/workflows/pypi-publish.yml +6 -15
  2. {timevec-0.3.0 → timevec-0.3.1}/.github/workflows/python-test.yml +11 -17
  3. {timevec-0.3.0 → timevec-0.3.1}/.gitignore +6 -10
  4. timevec-0.3.1/.gitignore.in +5 -0
  5. {timevec-0.3.0 → timevec-0.3.1}/LICENSE +1 -1
  6. {timevec-0.3.0 → timevec-0.3.1}/PKG-INFO +18 -10
  7. {timevec-0.3.0 → timevec-0.3.1}/mypy.ini +1 -1
  8. timevec-0.3.1/pyproject.toml +82 -0
  9. timevec-0.3.1/setup.cfg +4 -0
  10. {timevec-0.3.0 → timevec-0.3.1}/timevec/__init__.py +21 -0
  11. {timevec-0.3.0 → timevec-0.3.1}/timevec/_version.py +2 -2
  12. {timevec-0.3.0 → timevec-0.3.1}/timevec.egg-info/PKG-INFO +18 -10
  13. {timevec-0.3.0 → timevec-0.3.1}/timevec.egg-info/SOURCES.txt +1 -2
  14. timevec-0.3.1/timevec.egg-info/requires.txt +3 -0
  15. timevec-0.3.1/uv.lock +1183 -0
  16. timevec-0.3.0/.gitignore.in +0 -10
  17. timevec-0.3.0/poetry.lock +0 -1135
  18. timevec-0.3.0/pyproject.toml +0 -51
  19. timevec-0.3.0/setup.cfg +0 -40
  20. timevec-0.3.0/timevec.egg-info/requires.txt +0 -3
  21. {timevec-0.3.0 → timevec-0.3.1}/.github/renovate.json5 +0 -0
  22. {timevec-0.3.0 → timevec-0.3.1}/.github/workflows/gitignore-in.yml +0 -0
  23. {timevec-0.3.0 → timevec-0.3.1}/.github/workflows/happy.yml +0 -0
  24. {timevec-0.3.0 → timevec-0.3.1}/.github/workflows/spellcheck.yml +0 -0
  25. {timevec-0.3.0 → timevec-0.3.1}/README.md +0 -0
  26. {timevec-0.3.0 → timevec-0.3.1}/examples/day_vec.svg +0 -0
  27. {timevec-0.3.0 → timevec-0.3.1}/examples/month_vec.svg +0 -0
  28. {timevec-0.3.0 → timevec-0.3.1}/examples/plot.py +0 -0
  29. {timevec-0.3.0 → timevec-0.3.1}/examples/week_vec.svg +0 -0
  30. {timevec-0.3.0 → timevec-0.3.1}/examples/year_vec.svg +0 -0
  31. {timevec-0.3.0 → timevec-0.3.1}/tests/test_builtin_math.py +0 -0
  32. {timevec-0.3.0 → timevec-0.3.1}/tests/test_many_dates.py +0 -0
  33. {timevec-0.3.0 → timevec-0.3.1}/tests/test_numpy.py +0 -0
  34. {timevec-0.3.0 → timevec-0.3.1}/tests/test_numpy_datetime64.py +0 -0
  35. {timevec-0.3.0 → timevec-0.3.1}/tests/test_same_result.py +0 -0
  36. {timevec-0.3.0 → timevec-0.3.1}/tests/test_util.py +0 -0
  37. {timevec-0.3.0 → timevec-0.3.1}/timevec/builtin_math.py +0 -0
  38. {timevec-0.3.0 → timevec-0.3.1}/timevec/numpy.py +0 -0
  39. {timevec-0.3.0 → timevec-0.3.1}/timevec/numpy_datetime64.py +0 -0
  40. {timevec-0.3.0 → timevec-0.3.1}/timevec/py.typed +0 -0
  41. {timevec-0.3.0 → timevec-0.3.1}/timevec/util.py +0 -0
  42. {timevec-0.3.0 → timevec-0.3.1}/timevec.egg-info/dependency_links.txt +0 -0
  43. {timevec-0.3.0 → timevec-0.3.1}/timevec.egg-info/top_level.txt +0 -0
@@ -19,23 +19,14 @@ jobs:
19
19
  with:
20
20
  python-version: "3.13"
21
21
 
22
- - name: Set up poetry
23
- uses: abatilo/actions-poetry@v3
22
+ - name: Set up uv
23
+ uses: astral-sh/setup-uv@v5
24
24
 
25
- - name: Cache
26
- uses: actions/cache@v4
27
- with:
28
- path: ~/.cache/pypoetry/virtualenvs
29
- key: ${{ runner.os }}-build-${{ matrix.python }}-${{ hashFiles('**/poetry.lock') }}
30
- restore-keys: |
31
- ${{ runner.os }}-build-${{ matrix.python }}-${{ hashFiles('**/poetry.lock') }}
32
- ${{ runner.os }}-build-${{ matrix.python }}-
33
- ${{ runner.os }}-
34
- - run: poetry install
25
+ - name: Install dependencies
26
+ run: uv sync
35
27
 
36
28
  - name: Build
37
- # I use poetry just as a package manager, so this is not `poetry build`
38
- run: poetry run poe build
29
+ run: uv build
39
30
 
40
31
  - name: Publish distribution to Test PyPI
41
32
  uses: pypa/gh-action-pypi-publish@release/v1
@@ -43,7 +34,7 @@ jobs:
43
34
  with:
44
35
  user: __token__
45
36
  password: ${{ secrets.TEST_PYPI_API_TOKEN }}
46
- repository_url: https://test.pypi.org/legacy/
37
+ repository-url: https://test.pypi.org/legacy/
47
38
 
48
39
  - name: Publish distribution to PyPI
49
40
  if: github.event_name == 'release' && !github.event.release.prerelease
@@ -25,41 +25,35 @@ jobs:
25
25
  with:
26
26
  python-version: "${{ matrix.python }}"
27
27
 
28
- - name: Set up poetry
29
- uses: abatilo/actions-poetry@v3
28
+ - name: Set up uv
29
+ uses: astral-sh/setup-uv@v5
30
30
 
31
- - name: Cache
32
- uses: actions/cache@v4
33
- with:
34
- path: ~/.cache/pypoetry/virtualenvs
35
- key: ${{ runner.os }}-build-${{ matrix.python }}-${{ hashFiles('**/poetry.lock') }}
36
- restore-keys: |
37
- ${{ runner.os }}-build-${{ matrix.python }}-${{ hashFiles('**/poetry.lock') }}
38
- ${{ runner.os }}-build-${{ matrix.python }}-
39
- ${{ runner.os }}-
40
31
  - name: Install dependencies
41
- run: poetry install
32
+ run: |
33
+ uv python pin ${{ matrix.python }}
34
+ uv sync
42
35
 
43
36
  - name: Lint
44
- run: poetry run poe check
37
+ run: uv run poe check
45
38
 
46
39
  - name: Check Python version
47
40
  run: |
48
- actual_version=$(poetry run python --version)
41
+ actual_version=$(uv run python --version)
49
42
  expected_version="Python ${{ matrix.python }}"
50
43
  if [ "$actual_version" == *"$expected_version"* ]; then
51
44
  echo "Expected $expected_version, but got $actual_version"
52
45
  exit 1
53
46
  fi
47
+
54
48
  - name: Test
55
- run: poetry run poe test
49
+ run: uv run poe test
56
50
 
57
51
  - name: Coverage
58
- run: poetry run poe coverage-xml
52
+ run: uv run poe coverage-xml
59
53
 
60
54
  - name: Upload coverage report to Codecov
61
55
  if: matrix.python == '3.13'
62
- uses: codecov/codecov-action@v4
56
+ uses: codecov/codecov-action@v5
63
57
  with:
64
58
  token: ${{ secrets.CODECOV_TOKEN }}
65
59
  files: ./coverage.xml
@@ -2,12 +2,10 @@
2
2
  # Generated by gitignore.in
3
3
  # Edit .gitignore.in instead of this file
4
4
  # Run `gitignore.in` to build .gitignore
5
- # #!/usr/bin/env bash
6
- # # `gibo list' and `gi list'
7
5
  # -----------------------------------------------------------------------------
8
6
  # gibo dump Linux
9
7
  ### Generated by gibo (https://github.com/simonwhitaker/gibo)
10
- ### https://raw.github.com/github/gitignore/33243d9491911332228307c915ff95707791a91f/Global/Linux.gitignore
8
+ ### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Global/Linux.gitignore
11
9
 
12
10
  *~
13
11
 
@@ -25,7 +23,7 @@
25
23
  # -----------------------------------------------------------------------------
26
24
  # gibo dump Windows
27
25
  ### Generated by gibo (https://github.com/simonwhitaker/gibo)
28
- ### https://raw.github.com/github/gitignore/33243d9491911332228307c915ff95707791a91f/Global/Windows.gitignore
26
+ ### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Global/Windows.gitignore
29
27
 
30
28
  # Windows thumbnail cache files
31
29
  Thumbs.db
@@ -54,7 +52,7 @@ $RECYCLE.BIN/
54
52
  # -----------------------------------------------------------------------------
55
53
  # gibo dump macOS
56
54
  ### Generated by gibo (https://github.com/simonwhitaker/gibo)
57
- ### https://raw.github.com/github/gitignore/33243d9491911332228307c915ff95707791a91f/Global/macOS.gitignore
55
+ ### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Global/macOS.gitignore
58
56
 
59
57
  # General
60
58
  .DS_Store
@@ -85,7 +83,7 @@ Temporary Items
85
83
  # -----------------------------------------------------------------------------
86
84
  # gibo dump Python
87
85
  ### Generated by gibo (https://github.com/simonwhitaker/gibo)
88
- ### https://raw.github.com/github/gitignore/33243d9491911332228307c915ff95707791a91f/Python.gitignore
86
+ ### https://raw.github.com/github/gitignore/4488915eec0b3a45b5c63ead28f286819c0917de/Python.gitignore
89
87
 
90
88
  # Byte-compiled / optimized / DLL files
91
89
  __pycache__/
@@ -195,10 +193,8 @@ ipython_config.py
195
193
  #pdm.lock
196
194
  # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
197
195
  # in version control.
198
- # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
196
+ # https://pdm.fming.dev/#use-with-ide
199
197
  .pdm.toml
200
- .pdm-python
201
- .pdm-build/
202
198
 
203
199
  # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
204
200
  __pypackages__/
@@ -250,4 +246,4 @@ cython_debug/
250
246
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
251
247
  #.idea/
252
248
  # -----------------------------------------------------------------------------
253
- timevec/_version.py
249
+ _version.py
@@ -0,0 +1,5 @@
1
+ gibo dump Linux
2
+ gibo dump Windows
3
+ gibo dump macOS
4
+ gibo dump Python
5
+ echo _version.py
@@ -1,4 +1,4 @@
1
- Copyright 2023 Kitsu Yui
1
+ Copyright 2023-2025 Kitsu Yui
2
2
 
3
3
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
4
 
@@ -1,11 +1,21 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: timevec
3
- Version: 0.3.0
4
- Summary: Get some usable vector representations of datetime
5
- Home-page: https://github.com/kitsuyui/python-timevec
6
- Author: Yui Kitsu
7
- Author-email: kitsuyui+github@kitsuyui.com
8
- License: BSD-3-Clause
3
+ Version: 0.3.1
4
+ Summary: Get some usable vector representations of datetime.
5
+ Author-email: Yui KITSU <kitsuyui+github@kitsuyui.com>
6
+ License: Copyright 2023-2025 Kitsu Yui
7
+
8
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
9
+
10
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
13
+
14
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17
+
18
+ Project-URL: Homepage, https://github.com/kitsuyui/python-timevec
9
19
  Classifier: Development Status :: 3 - Alpha
10
20
  Classifier: License :: OSI Approved :: BSD License
11
21
  Classifier: Programming Language :: Python :: 3.9
@@ -14,14 +24,12 @@ Classifier: Programming Language :: Python :: 3.11
14
24
  Classifier: Programming Language :: Python :: 3.12
15
25
  Classifier: Programming Language :: Python :: 3.13
16
26
  Classifier: Intended Audience :: Developers
17
- Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
27
  Classifier: Topic :: Software Development :: Libraries
19
- Classifier: Typing :: Typed
20
28
  Requires-Python: >=3.9
21
29
  Description-Content-Type: text/markdown
22
30
  License-File: LICENSE
23
31
  Provides-Extra: numpy
24
- Requires-Dist: numpy; extra == "numpy"
32
+ Requires-Dist: numpy>=1.25.0; extra == "numpy"
25
33
 
26
34
  # timevec
27
35
 
@@ -1,5 +1,5 @@
1
1
  [mypy]
2
- python_version = 3.10
2
+ python_version = 3.9
3
3
  warn_return_any = True
4
4
  warn_unused_configs = True
5
5
  disallow_untyped_defs = True
@@ -0,0 +1,82 @@
1
+ [project]
2
+ name = "timevec"
3
+ dynamic = ["version"]
4
+ requires-python = ">=3.9"
5
+ dependencies = []
6
+ description = "Get some usable vector representations of datetime."
7
+ readme = {file = "README.md", content-type = "text/markdown"}
8
+ license = { file = "LICENSE" }
9
+ authors = [
10
+ {name = "Yui KITSU", email = "kitsuyui+github@kitsuyui.com"}
11
+ ]
12
+ classifiers = [
13
+ "Development Status :: 3 - Alpha",
14
+ "License :: OSI Approved :: BSD License",
15
+ "Programming Language :: Python :: 3.9",
16
+ "Programming Language :: Python :: 3.10",
17
+ "Programming Language :: Python :: 3.11",
18
+ "Programming Language :: Python :: 3.12",
19
+ "Programming Language :: Python :: 3.13",
20
+ "Intended Audience :: Developers",
21
+ "Topic :: Software Development :: Libraries",
22
+ ]
23
+ [project.optional-dependencies]
24
+ numpy = [
25
+ # https://endoflife.date/numpy
26
+ "numpy>=1.25.0",
27
+ ]
28
+
29
+ [project.urls]
30
+ Homepage = "https://github.com/kitsuyui/python-timevec"
31
+
32
+ [tool.uv]
33
+ dev-dependencies = [
34
+ "pytest",
35
+ "pytest-cov",
36
+ "poethepoet",
37
+ "setuptools-scm",
38
+ "ruff",
39
+ "mypy",
40
+ "numpy",
41
+ "matplotlib",
42
+ ]
43
+
44
+ [tool.setuptools]
45
+ package-data = { "timevec" = ["py.typed"], "*" = ["README.md, LICENSE"] }
46
+ package-dir = { "timevec" = "timevec" }
47
+
48
+ [tool.poetry]
49
+ # I use poetry as just a package manager.
50
+ # So, I only write the settings that poetry needs.
51
+ # The actual package metadata is written in setup.cfg.
52
+ # I use pypa/build for packaging.
53
+ name = "timevec"
54
+ version = "0.0.0"
55
+ description = ""
56
+ authors = []
57
+ packages = [{ include = "timevec" }]
58
+
59
+ [build-system]
60
+ requires = ["setuptools", "setuptools_scm"]
61
+ build-backend = "setuptools.build_meta"
62
+
63
+ [tool.setuptools_scm]
64
+ write_to = "timevec/_version.py"
65
+ version_scheme = "only-version"
66
+ local_scheme = "no-local-version"
67
+
68
+ [tool.poe.tasks]
69
+ test = "pytest"
70
+ coverage-xml = "pytest --cov=timevec --doctest-modules --cov-report=xml"
71
+ format = "ruff format timevec"
72
+ check = [
73
+ {cmd = "ruff check timevec tests"},
74
+ {cmd = "mypy timevec tests"},
75
+ ]
76
+
77
+ [tool.ruff]
78
+ line-length = 79
79
+
80
+ [tool.mypy]
81
+ strict = true
82
+ ignore_missing_imports = false
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -10,3 +10,24 @@ Day of the week ... periodicity in a week (distinction between weekdays and holi
10
10
  When dealing with these, it is desirable to vectorize with periodicity in mind.
11
11
  That is, at 23:59 on a given day, it is desirable that the value is close to 00:00 on the next day.
12
12
  To achieve this, the time is represented as a combination of cos and sin."""
13
+
14
+ # https://packaging-guide.openastronomy.org/en/latest/advanced/versioning.html
15
+ from ._version import __version__
16
+
17
+ try:
18
+ from . import builtin_math
19
+ except ImportError:
20
+ pass
21
+
22
+ try:
23
+ from . import numpy_datetime64
24
+ except ImportError:
25
+ pass
26
+
27
+ try:
28
+ from . import numpy
29
+ except ImportError:
30
+ pass
31
+
32
+
33
+ __all__ = ["builtin_math", "numpy_datetime64", "numpy", "__version__"]
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.3.0'
16
- __version_tuple__ = version_tuple = (0, 3, 0)
15
+ __version__ = version = '0.3.1'
16
+ __version_tuple__ = version_tuple = (0, 3, 1)
@@ -1,11 +1,21 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: timevec
3
- Version: 0.3.0
4
- Summary: Get some usable vector representations of datetime
5
- Home-page: https://github.com/kitsuyui/python-timevec
6
- Author: Yui Kitsu
7
- Author-email: kitsuyui+github@kitsuyui.com
8
- License: BSD-3-Clause
3
+ Version: 0.3.1
4
+ Summary: Get some usable vector representations of datetime.
5
+ Author-email: Yui KITSU <kitsuyui+github@kitsuyui.com>
6
+ License: Copyright 2023-2025 Kitsu Yui
7
+
8
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
9
+
10
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
13
+
14
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
17
+
18
+ Project-URL: Homepage, https://github.com/kitsuyui/python-timevec
9
19
  Classifier: Development Status :: 3 - Alpha
10
20
  Classifier: License :: OSI Approved :: BSD License
11
21
  Classifier: Programming Language :: Python :: 3.9
@@ -14,14 +24,12 @@ Classifier: Programming Language :: Python :: 3.11
14
24
  Classifier: Programming Language :: Python :: 3.12
15
25
  Classifier: Programming Language :: Python :: 3.13
16
26
  Classifier: Intended Audience :: Developers
17
- Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
27
  Classifier: Topic :: Software Development :: Libraries
19
- Classifier: Typing :: Typed
20
28
  Requires-Python: >=3.9
21
29
  Description-Content-Type: text/markdown
22
30
  License-File: LICENSE
23
31
  Provides-Extra: numpy
24
- Requires-Dist: numpy; extra == "numpy"
32
+ Requires-Dist: numpy>=1.25.0; extra == "numpy"
25
33
 
26
34
  # timevec
27
35
 
@@ -3,9 +3,8 @@
3
3
  LICENSE
4
4
  README.md
5
5
  mypy.ini
6
- poetry.lock
7
6
  pyproject.toml
8
- setup.cfg
7
+ uv.lock
9
8
  .github/renovate.json5
10
9
  .github/workflows/gitignore-in.yml
11
10
  .github/workflows/happy.yml
@@ -0,0 +1,3 @@
1
+
2
+ [numpy]
3
+ numpy>=1.25.0