-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add release pipeline * Improve `pyproject.toml` * Remove url property
- Loading branch information
1 parent
251adbd
commit 4ca0ea7
Showing
14 changed files
with
894 additions
and
128 deletions.
There are no files selected for viewing
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 @@ | ||
tsdisagg/_version.py export-subst |
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,47 @@ | ||
name: release-pipeline | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
release-job: | ||
runs-on: ubuntu-latest | ||
env: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
- name: Install release tooling | ||
run: | | ||
pip install twine wheel numpy setuptools versioneer | ||
- name: Build package | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
- name: Check version number match | ||
run: | | ||
echo "GITHUB_REF: ${GITHUB_REF}" | ||
# The GITHUB_REF should be something like "refs/tags/v1.2.3" | ||
# Make sure the package version is the same as the tag | ||
grep -Rq "^Version: ${GITHUB_REF:11}$" tsdisagg.egg-info/PKG-INFO | ||
- name: Publish to PyPI | ||
run: | | ||
twine check dist/* | ||
twine upload --repository pypi --username __token__ --password ${PYPI_TOKEN} dist/* | ||
test-install-job: | ||
needs: release-job | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.7 | ||
- name: Give PyPI a chance to update the index | ||
run: sleep 240 | ||
- name: Install from PyPI | ||
run: | | ||
pip install tsdisagg==${GITHUB_REF:11} |
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 |
---|---|---|
|
@@ -24,3 +24,4 @@ dependencies: | |
- pytest | ||
- pytest-cov | ||
- hypothesis | ||
- versioneer |
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,3 +1,67 @@ | ||
[project] | ||
name = "tsdisagg" | ||
dynamic = ['version'] | ||
description = "Statistical tools for converting low frequency time series data to higher frequencies" | ||
license = { file = 'LICENSE'} | ||
authors = [{name = "Jesse Grabowski", email="[email protected]"}] | ||
classifiers = [ | ||
"License :: OSI Approved :: MIT License", | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Science/Research", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Mathematics" | ||
] | ||
|
||
keywords = [ | ||
"time series", | ||
"decomposition", | ||
"datetime", | ||
"econometrics" | ||
] | ||
|
||
dependencies = [ | ||
"numpy", | ||
"pandas >= 2.2.0", | ||
"scipy" | ||
] | ||
|
||
[project.urls] | ||
Repository = "https://github.com/jessegrabowski/tsdisagg.git" | ||
Issues = "https://github.com/jessegrabowski/tsdisagg/issues" | ||
|
||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"pre-commit", | ||
"pytest", | ||
"pytest-cov", | ||
"versioneer" | ||
] | ||
|
||
|
||
[build-system] | ||
requires = [ | ||
"numpy", | ||
"setuptools", | ||
"versioneer[toml]", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
|
||
[tool.versioneer] | ||
VCS = "git" | ||
style = "pep440" | ||
versionfile_source = "tsdisagg/_version.py" | ||
versionfile_build = "tsdisagg/_version.py" | ||
tag_prefix = 'v' | ||
|
||
[tool.setuptools] | ||
py-modules = ['tsdisagg'] | ||
|
||
[tool.pytest.ini_options] | ||
minversion = "6.0" | ||
xfail_strict = true | ||
|
@@ -13,6 +77,11 @@ exclude_lines = [ | |
"if TYPE_CHECKING:", | ||
] | ||
|
||
[tool.ruff] | ||
line-length = 100 | ||
target-version = "py310" | ||
extend-exclude = ["tsdisagg/_version.py", "setup.py"] | ||
|
||
|
||
[tool.ruff.lint] | ||
select = ["D", "E", "F", "I", "UP", "W", "RUF"] | ||
|
@@ -46,5 +115,6 @@ ignore = [ | |
"D417", | ||
] | ||
|
||
|
||
[tool.ruff.lint.isort] | ||
lines-between-types = 1 |
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,3 +1,19 @@ | ||
from setuptools import setup | ||
from setuptools import find_packages, setup | ||
from setuptools.dist import Distribution | ||
|
||
setup() | ||
import versioneer | ||
|
||
dist = Distribution() | ||
dist.parse_config_files() | ||
|
||
|
||
NAME: str = dist.get_name() # type: ignore | ||
|
||
|
||
if __name__ == "__main__": | ||
setup( | ||
name=NAME, | ||
version=versioneer.get_version(), | ||
cmdclass=versioneer.get_cmdclass(), | ||
packages=find_packages(exclude=["tests*"]), | ||
) |
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
Oops, something went wrong.