Skip to content

Commit b5971a5

Browse files
authored
Merge pull request #29 from Eligoze75/deployment_file
Deployment file
2 parents b58c0e6 + 7bea6d2 commit b5971a5

File tree

5 files changed

+59
-6
lines changed

5 files changed

+59
-6
lines changed

.github/workflows/deploy.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: publish-test-pypi
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
unit-test-pytest:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check-out repository
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: "3.12"
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -e .[tests]
25+
26+
- name: Run tests with coverage
27+
run: |
28+
pytest --cov --cov-report=term --cov-branch
29+
30+
pypi-test:
31+
needs: unit-test-pytest
32+
runs-on: ubuntu-latest
33+
34+
steps:
35+
- name: Check-out repository
36+
uses: actions/checkout@v2
37+
38+
- name: Set up Python
39+
uses: actions/setup-python@v4
40+
with:
41+
python-version: "3.12"
42+
43+
- name: Install hatch
44+
run: |
45+
python -m pip install --upgrade pip
46+
pip install -e .[dev]
47+
48+
- name: Build package
49+
run: hatch build
50+
51+
- name: Publish to Test PyPI
52+
uses: pypa/gh-action-pypi-publish@release/v1
53+
with:
54+
repository-url: https://test.pypi.org/legacy/
55+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- main
7+
- master
88
release:
99
types: [published]
1010

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ authors = [
2323
{ name = "Eli Gonzalez, Gurleen Kaur, Gloria Yi, Mantram Sharma", email = "[email protected]" },
2424
]
2525
license = "MIT"
26-
requires-python = ">= 3.10" # Adjust based on the minimum version of Python that you support
26+
requires-python = ">= 3.11" # Adjust based on the minimum version of Python that you support
2727
readme = {"file" = "README.md", "content-type" = "text/markdown"}
2828
# Please consult https://pypi.org/classifiers/ for a full list.
2929
classifiers = [

src/autoeda/get_summary_df.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def get_summary_df(df, categorical_columns, numerical_columns):
4141
raise ValueError("No columns provided to attain a summary")
4242

4343
for column in categorical_columns:
44-
if df.loc[:, column].dtype != "object":
44+
if df.loc[:, column].dtype not in ["object", "string"]:
4545
raise ValueError(f"This is not a categorical column: {column}")
4646
else:
4747
categorical_df[column] = pd.DataFrame(
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@
66
errors for the incorrectly defined arguments.
77
"""
88

9+
from autoeda.get_summary_df import get_summary_df
910
import pandas as pd
10-
import numpy as np
1111
import pytest
1212

13-
from src.autoeda.get_summary_df import get_summary_df
14-
1513
df = pd.DataFrame({
1614
'name': ['John', 'Jeffery', 'Alice', 'Sam', 'Millie'],
1715
'age': [25, 30, 18, 27, 45],

0 commit comments

Comments
 (0)