Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
2a023e4
Update polars version. First draft of most basic funcs.
winter-again Jan 30, 2025
1a88850
Draft of lib funcs
winter-again Mar 8, 2025
aa4b1b9
Add complete_total_rows() and complete_present_rows() functions.
winter-again Mar 11, 2025
b044153
Experiment with requesting helper data
winter-again Apr 8, 2025
1c5d5f0
Overhaul complete() function. Should be generic over DataFrame and
winter-again May 20, 2025
96da5dd
Upgrade deps and python version to 3.13.
winter-again May 21, 2025
1747a3e
Use new generic notation
winter-again May 21, 2025
649792e
Update impute columns func to cover DF and LF.
winter-again May 21, 2025
dde9123
Remove file
winter-again May 21, 2025
7bfc292
Potentially better type hint for dtype.
winter-again May 21, 2025
0a2fbbe
Rename CLI test file. Specify what should be more correct types for
winter-again May 22, 2025
6f7340f
Reorganize modules. Clean up remaining funcs.
winter-again May 22, 2025
ceda0c5
Small changes
winter-again May 22, 2025
7ad1327
Remove pyright section from pyproject.toml. Shouldn't be necessary.
winter-again May 22, 2025
84ca650
Update env, pyproject.toml, remove unnecessary pytest config table
winter-again May 22, 2025
affa793
Testing nox over tox
winter-again May 22, 2025
d7e5d62
Add typing to noxfile and hopefully fix bad session specification.
winter-again May 22, 2025
89874f4
Delete tox config file>
winter-again May 22, 2025
ceab0e6
Update README
winter-again May 22, 2025
bde5be5
Don't think uv sync inside of nox is needed.
winter-again May 23, 2025
292d4da
Add uv sync inside of nox session back
winter-again May 23, 2025
2e816c2
Need to run uv sync before nox?
winter-again May 23, 2025
b8ac30b
Fix typo in specifying python from matrix
winter-again May 23, 2025
f69f236
Trying to figure out how nox can run without explicit install
winter-again May 23, 2025
91cb28c
Is it because of uv cache?
winter-again May 23, 2025
d8f858d
Try with --no-sync
winter-again May 23, 2025
38bd6fa
Try again
winter-again May 23, 2025
7777ab8
Remove --python flag from sync
winter-again May 23, 2025
1cb5d8e
Check behavior of auto python install on uv sync
winter-again May 23, 2025
f77d7c4
Potentially unnecessary but force uv sync to use matrix's python ver
winter-again May 23, 2025
7c87a8b
Same for uv run command. Why should it install another version that
winter-again May 23, 2025
55cba72
Try without python versions in noxfile
winter-again May 23, 2025
fa5b092
Try using uv tool run
winter-again May 23, 2025
ef5ceed
Try uv pip install --system .
winter-again May 23, 2025
80b9c1d
Try uv sync --locked --only-dev
winter-again May 23, 2025
af1c8e6
Get rid of --python flag
winter-again May 23, 2025
fefc706
Maybe middle ground
winter-again May 23, 2025
c4992f5
Overhaul of impute file command structure. Reduce verbose output and
winter-again May 25, 2025
abb8014
Improve impute tests
winter-again May 28, 2025
2ef64cd
Use lazy() in some cases. Tests for LazyFrames.
winter-again May 28, 2025
4558b0c
Improve complete module tests
winter-again May 28, 2025
76cdb1e
Clean up complete tests
winter-again Jun 21, 2025
38b4728
Remove --locked?
winter-again Jun 21, 2025
8c96e59
Improve
winter-again Jun 21, 2025
4e01053
Working tests
winter-again Jun 21, 2025
31c6c51
Remove Windows
winter-again Jun 21, 2025
423da4e
Add Windows back
winter-again Jun 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 13 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ on:
push:
branches:
- main
paths-ignore:
- "*.md"
pull_request:
branches:
- main
paths-ignore:
- "*.md"

jobs:
test:
Expand All @@ -21,25 +17,27 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version:
- "3.11"
- "3.12"
- "3.13"

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@v6
with:
version: "0.5.5"
version: "latest"

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

- name: Install project
run: uv sync --all-extras --dev
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Run tests with tox
run: |
uv run -- tox --version
uv run -- tox -e py
- name: Install dev dependencies
# TODO: maybe have to add explicit uv lock?
# run: uv sync --locked --only-dev --python="${{ matrix.python-version }}"
run: uv sync --only-dev --python="${{ matrix.python-version }}"

- name: Run tests with nox on ${{ matrix.os }}
run: uv run --locked --python="${{ matrix.python-version }}" -- nox -s "tests-${{ matrix.python-version }}"
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
.venv/
/data/
__pycache__/
.pdm-python
dist/
sdist/
test.py
# /data/
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.11
3.13.3
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

![Tests](https://github.com/winter-again/csv-helper/workflows/Tests/badge.svg)

A CLI for working with CSV data. Currently, primary focus is on workflows for imputing masked counts data.

Note: `tests/data` has testing data
A simple library and CLI for working with CSV data.

## Installation

```bash
```sh
uv add "csv-helper @ git+ssh://git@github.com/winter-again/csv-helper"
# using pip
pip install git+https://git@github.com/winter-again/csv-helper
# or via SSH
pip install git+ssh://git@github.com/winter-again/csv-helper

# designate specific version
# designate specific version tag or branch
pip install git+ssh://git@github.com/winter-again/csv-helper.git@v0.1.0
```
16 changes: 16 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import nox

nox.options.default_venv_backend = "uv"


@nox.session(python=["3.12", "3.13"])
def tests(session: nox.Session) -> None:
"""Run tests with pytest."""
session.run_install(
"uv",
"sync",
"--locked",
f"--python={session.virtualenv.location}",
env={"UV_PROJECT_ENVIRONMENT": session.virtualenv.location},
)
session.run("pytest", "-vv", "tests")
34 changes: 11 additions & 23 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,38 +1,26 @@
[project]
name = "csv-helper"
version = "0.2.2"
description = "A simple CLI for imputing masked counts in CSV data"
version = "0.3.0"
description = "A simple library and CLI for working with CSV data"
readme = "README.md"
authors = [
{name = "Andrew Tiu", email = "andrew.tiu88@gmail.com"},
]
license = {text = "MIT"}
requires-python = ">=3.11"
authors = [{ name = "Andrew Tiu", email = "andrew.tiu88@gmail.com" }]
license = "MIT"
requires-python = ">=3.12"
dependencies = [
"typer>=0.12.3",
"polars>=1.4.1",
"numpy>=2.0.1",
"numpy>=2.2.6",
"polars>=1.30.0",
"typer>=0.15.4",
]

[project.scripts]
csv-helper = "csv_helper.main:app"
csv-helper = "csv_helper.cli:app"

[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"

[dependency-groups]
dev = [
"pytest>=8.3.2",
"tox>=4.23.2",
"tox-uv>=1.16.0",
]

[tool.pyright]
include = ["src"]
exclude = [
"**/__pycache__"
"nox>=2025.5.1",
"pytest>=8.3.5",
]

[tool.pytest.ini_options]
pythonpath = ["src"]
Loading