Skip to content

Commit

Permalink
Enhance GitHub Actions workflow and setup configuration; update depen…
Browse files Browse the repository at this point in the history
…dency installation method, expand PyPI classifiers, and include manifest for additional files.
  • Loading branch information
zoharbabin committed Jan 20, 2025
1 parent 827fafa commit 4931e00
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 16 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# .github/workflows/workflow.yml
name: Test & Publish to PyPI

on:
Expand Down Expand Up @@ -27,13 +26,15 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
# Install your library in editable mode, including [test] extras
- name: Install project with test extras
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
pip install -e .[test]
# Create the EDGAR data directory if your tests need it
- name: Create EDGAR data directory
run: mkdir -p /home/runner/.edgar
run: mkdir -p /home/runner/.edgar

- name: Run tests
run: pytest --maxfail=1 --disable-warnings -v -n auto
Expand All @@ -43,10 +44,10 @@ jobs:
if: startsWith(github.ref, 'refs/tags/v')
needs: [ test ]
runs-on: ubuntu-latest

# Permissions required for OIDC-based publishing
permissions:
# Needed for OpenID Connect (OIDC) authentication with PyPI
id-token: write
# Read permission for your repo's contents if required
contents: read

steps:
Expand Down
11 changes: 11 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Include the README and LICENSE at the top-level
include README.md
include LICENSE

# Include all files in the "examples" folder
recursive-include examples *

# Optionally include tests if you want them in the sdist
recursive-include tests *

# If you have any other data/assets outside package dirs, add rules here.
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[build-system]
requires = [
"setuptools>=62.0",
"wheel",
"build"
]
build-backend = "setuptools.build_meta"
29 changes: 20 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
# setup.py

from setuptools import setup, find_packages
import setuptools
from pathlib import Path

# Read the long description from README.md
def read_long_description():
here = Path(__file__).parent
with open(here / "README.md", encoding="utf-8") as fh:
return fh.read()


setup(
setuptools.setup(
name="edgar-analytics",
version="0.1.0",
author="Zohar Babin",
author_email="z.babin@gmail.com",
description="A library for analyzing SEC EDGAR filings with financial metrics and forecasting.",
description="A library and CLI tool for analyzing SEC EDGAR filings with financial metrics and forecasting.",
long_description=read_long_description(),
long_description_content_type="text/markdown",
url="https://github.com/zoharbabin/edgar_analytics",
packages=find_packages(),
packages=setuptools.find_packages(),
include_package_data=True,
python_requires=">=3.10",
install_requires=[
"pandas",
"numpy",
"statsmodels",
"edgartools",
"click", # For CLI functionality
"click",
],
extras_require={
"test": [
"pytest",
"pytz",
"pytest-xdist",
],
},
entry_points={
Expand All @@ -40,8 +40,19 @@ def read_long_description():
],
},
classifiers=[
"Programming Language :: Python :: 3",
# ------------------------------------------
# Updated and expanded PyPI Trove Classifiers
# ------------------------------------------
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Financial and Insurance Industry",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Environment :: Console",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Office/Business :: Financial :: Accounting",
"Topic :: Software Development :: Libraries :: Python Modules",
],
python_requires='>=3.10',
)

0 comments on commit 4931e00

Please sign in to comment.