Skip to content

Commit

Permalink
Updated publish_to_pypi.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rickecon committed Oct 24, 2023
1 parent d36742f commit 2f94468
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 21 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish package to PyPI

on:
push:
branches:
- master

jobs:
deploy:
name: Publish to PyPI
if: github.repository == 'PSLmodels/OG-USA'
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Build package
shell: bash -l {0}
run: |
pip install wheel
python setup.py sdist bdist_wheel
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI }}
skip_existing: true
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=42"]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

# Configuration for Black.
Expand Down
42 changes: 22 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
import setuptools
"""This file contains the OG-USA package's metadata and dependencies."""

with open("README.md", "r", encoding="utf-8") as fh:
longdesc = fh.read()
from setuptools import find_packages, setup

setuptools.setup(
with open("README.md", "r") as readme_file:
readme = readme_file.read()

setup(
name="ogusa",
version="0.1.1",
author="Jason DeBacker and Richard W. Evans",
license="CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
description="USA calibration for OG-Core",
long_description=readme,
long_description_content_type="text/markdown",
long_description=longdesc,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: CC0 1.0 Universal public domain dedication",
"Operating System :: POSIX",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Information Analysis",
],
keywords="USA calibration of large scale overlapping generations model of fiscal policy",
url="https://github.com/PSLmodels/OG-USA/",
download_url="https://github.com/PSLmodels/OG-USA/",
project_urls={
Expand All @@ -19,7 +34,7 @@
packages=["ogusa"],
package_data={"ogusa": ["ogusa_default_parameters.json", "data/PSID/*"]},
include_packages=True,
python_requires=">=3.7.7, <3.11",
python_requires=">=3.7.7, <3.12",
install_requires=[
"numpy",
"psutil",
Expand All @@ -37,21 +52,8 @@
"openpyxl>=3.1.2",
"statsmodels",
"linearmodels",
"wheel",
"ogcore",
],
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: CC0 1.0 Universal public domain dedication",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Software Development :: Libraries :: Python Modules",
],
tests_require=["pytest"],
)

0 comments on commit 2f94468

Please sign in to comment.