Skip to content

Commit 7fc3e04

Browse files
Merge pull request #14 from thomasthaddeus/dev
v1.2.0
2 parents 2e13937 + e9c2559 commit 7fc3e04

8 files changed

Lines changed: 851 additions & 35 deletions

File tree

.github/workflows/python-publish.yml

Lines changed: 77 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Upload Python Package
1+
name: Publish Python 🐍 distribution 📦 to PyPI
22

33
on:
44
release:
@@ -8,7 +8,8 @@ permissions:
88
contents: read
99

1010
jobs:
11-
deploy:
11+
build:
12+
name: Build distribution 📦
1213
runs-on: ubuntu-latest
1314

1415
steps:
@@ -27,8 +28,80 @@ jobs:
2728
- name: Build package
2829
run: python -m build
2930

30-
- name: Publish package
31-
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
31+
- name: Store the distribution packages
32+
uses: actions/upload-artifact@v3
33+
with:
34+
name: python-package-distributions
35+
path: dist/
36+
37+
publish-to-pypi:
38+
name: >-
39+
Publish Python 🐍 distribution 📦 to PyPI
40+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
41+
needs:
42+
- build
43+
runs-on: ubuntu-latest
44+
environment:
45+
name: pypi
46+
url: https://pypi.org/p/dataanalysistoolkit # Replace <package-name> with your PyPI project name
47+
permissions:
48+
id-token: write # IMPORTANT: mandatory for trusted publishing
49+
50+
steps:
51+
- name: Download all the dists
52+
uses: actions/download-artifact@v3
53+
with:
54+
name: python-package-distributions
55+
path: dist/
56+
57+
- name: Publish distribution 📦 to PyPI
58+
uses: pypa/gh-action-pypi-publish@release/v1
3259
with:
3360
user: __token__
3461
password: ${{ secrets.PYPI_API_TOKEN }}
62+
63+
github-release:
64+
name: >-
65+
Sign the Python 🐍 distribution 📦 with Sigstore
66+
and upload them to GitHub Release
67+
needs:
68+
- publish-to-pypi
69+
runs-on: ubuntu-latest
70+
71+
permissions:
72+
contents: write # IMPORTANT: mandatory for making GitHub Releases
73+
id-token: write # IMPORTANT: mandatory for sigstore
74+
75+
steps:
76+
- name: Download all the dists
77+
uses: actions/download-artifact@v4
78+
with:
79+
name: python-package-distributions
80+
path: dist/
81+
82+
- name: Sign the dists with Sigstore
83+
uses: sigstore/gh-action-sigstore-python@v2.1.1
84+
with:
85+
inputs: >-
86+
./dist/*.tar.gz
87+
./dist/*.whl
88+
89+
- name: Create GitHub Release
90+
env:
91+
GITHUB_TOKEN: ${{ github.token }}
92+
run: >-
93+
gh release create
94+
'${{ github.ref_name }}'
95+
--repo '${{ github.repository }}'
96+
--notes ""
97+
98+
- name: Upload artifact signatures to GitHub Release
99+
env:
100+
GITHUB_TOKEN: ${{ github.token }}
101+
# Upload to GitHub Release using the `gh` CLI.
102+
# `dist/` contains the built packages, and the
103+
# sigstore-produced signatures and certificates.
104+
run: >-
105+
gh release upload
106+
'${{ github.ref_name }}' dist/**
107+
--repo '${{ github.repository }}'

docs/source/AdditionalResources/tutorials/tutorial_data_import.ipynb

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,10 @@
4747
{
4848
"cell_type": "code",
4949
"execution_count": null,
50-
"metadata": {
51-
"vscode": {
52-
"languageId": "shellscript"
53-
}
54-
},
50+
"metadata": {},
5551
"outputs": [],
5652
"source": [
57-
"pip install dataanalysistoolkit"
53+
"%pip install dataanalysistoolkit\n"
5854
]
5955
},
6056
{
@@ -66,14 +62,26 @@
6662
},
6763
{
6864
"cell_type": "code",
69-
"execution_count": null,
70-
"metadata": {},
71-
"outputs": [],
65+
"execution_count": 3,
66+
"metadata": {},
67+
"outputs": [
68+
{
69+
"ename": "ModuleNotFoundError",
70+
"evalue": "No module named 'src'",
71+
"output_type": "error",
72+
"traceback": [
73+
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
74+
"\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
75+
"Cell \u001b[1;32mIn[3], line 2\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[38;5;66;03m# Importing necessary libraries from the toolkit\u001b[39;00m\n\u001b[1;32m----> 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msrc\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdata_sources\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mexcel_connector\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ExcelConnector\n\u001b[0;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msrc\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdata_sources\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01msql_connector\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m SQLConnector\n\u001b[0;32m 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msrc\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdata_sources\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mapi_connector\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m APIConnector\n",
76+
"\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'src'"
77+
]
78+
}
79+
],
7280
"source": [
7381
"# Importing necessary libraries from the toolkit\n",
74-
"from src.data_sources.excel_connector import ExcelConnector\n",
75-
"from src.data_sources.sql_connector import SQLConnector\n",
76-
"from src.data_sources.api_connector import APIConnector\n",
82+
"from src.data_sources import ExcelConnector\n",
83+
"from src.data_sources import SQLConnector\n",
84+
"from src.data_sources import APIConnector\n",
7785
"from src.integrators.data_integrator import DataIntegrator\n",
7886
"from src.formatters.data_formatter import DataFormatter\n",
7987
"\n",
@@ -138,7 +146,7 @@
138146
"df_sheet_index = excel_connector.load_data(sheet_name=1)\n",
139147
"\n",
140148
"# Display the first few rows of the dataframe\n",
141-
"print(df_sheet_name.head())"
149+
"print(df_sheet_name.head())\n"
142150
]
143151
},
144152
{
@@ -155,7 +163,7 @@
155163
"outputs": [],
156164
"source": [
157165
"excel_connector = ExcelConnector('path/to/excel.xlsx')\n",
158-
"df_excel = excel_connector.load_data(sheet_name='Sheet1')"
166+
"df_excel = excel_connector.load_data(sheet_name='Sheet1')\n"
159167
]
160168
},
161169
{
@@ -188,7 +196,7 @@
188196
"df_sql = sql_connector.query_data(query)\n",
189197
"\n",
190198
"# Display the result\n",
191-
"print(df_sql.head())"
199+
"print(df_sql.head())\n"
192200
]
193201
},
194202
{
@@ -369,7 +377,7 @@
369377
"outputs": [],
370378
"source": [
371379
"# Custom method for time-series data integration (hypothetical example)\n",
372-
"time_aligned_df = integrator.integrate_time_series('timestamp_column')"
380+
"time_aligned_df = integrator.integrate_time_series('timestamp_column')\n"
373381
]
374382
},
375383
{
@@ -484,7 +492,7 @@
484492
"formatter.fill_missing_values('another_column', method='ffill')\n",
485493
"\n",
486494
"# Checking for missing values\n",
487-
"print(combined_df.isnull().sum())"
495+
"print(combined_df.isnull().sum())\n"
488496
]
489497
},
490498
{
@@ -508,7 +516,7 @@
508516
"formatter.custom_transform('numeric_column', lambda x: x ** 2)\n",
509517
"\n",
510518
"# Viewing the transformed data\n",
511-
"print(combined_df['numeric_column'].head())"
519+
"print(combined_df['numeric_column'].head())\n"
512520
]
513521
},
514522
{
@@ -621,8 +629,22 @@
621629
}
622630
],
623631
"metadata": {
632+
"kernelspec": {
633+
"display_name": "Python 3",
634+
"language": "python",
635+
"name": "python3"
636+
},
624637
"language_info": {
625-
"name": "python"
638+
"codemirror_mode": {
639+
"name": "ipython",
640+
"version": 3
641+
},
642+
"file_extension": ".py",
643+
"mimetype": "text/x-python",
644+
"name": "python",
645+
"nbconvert_exporter": "python",
646+
"pygments_lexer": "ipython3",
647+
"version": "3.11.9"
626648
}
627649
},
628650
"nbformat": 4,

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
project = 'Data Analysis Toolkit'
1414
copyright = '2024, Thaddeus Thomas'
1515
author = 'Thaddeus Thomas'
16-
release = '1.1.1'
16+
release = '1.2.0'
1717

1818
# -- General configuration ---------------------------------------------------
1919
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

0 commit comments

Comments
 (0)