From 6e19251df8839a8a2f2cf40f2a8925088906e458 Mon Sep 17 00:00:00 2001 From: Olivier Binette Date: Sat, 25 Nov 2023 18:05:08 -0500 Subject: [PATCH] Rename (#8) * add publish workflow on tag push * rename package --- README.md | 14 +++++++------- {bettercsv => csvmeta}/__init__.py | 0 {bettercsv => csvmeta}/read.py | 0 {bettercsv => csvmeta}/write.py | 0 pyproject.toml | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) rename {bettercsv => csvmeta}/__init__.py (100%) rename {bettercsv => csvmeta}/read.py (100%) rename {bettercsv => csvmeta}/write.py (100%) diff --git a/README.md b/README.md index 69e7901..10fe2d4 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ The package has no external dependencies beyond Python's standard library and is ## Installation ```bash -pip install bettercsv +pip install csvmeta ``` ## Usage @@ -29,7 +29,7 @@ pip install bettercsv Input and ouput data formats for the `read` and `write` functions are modelled on Python's csv module: data to write should be an iterable of rows, and data read will be an iterable of rows with string data types. The data header is always returned as the first row. ```python -import bettercsv as bcsv +import csvmeta as csvm data = [ ['name', 'age', 'state'], @@ -38,10 +38,10 @@ data = [ ] # Write data to a csv file folder -bcsv.write('mydata.csv', data) +csvm.write('mydata.csv', data) # Read data from a csv file folder -data = bcsv.read('mydata.csv') +data = csvm.read('mydata.csv') list(data) ## [ ## ['name', 'age', 'state'], @@ -60,7 +60,7 @@ Arbitrary metadata can be added to the metadata file by passing keyword argument Metadata can be read using the `metadata()` function ```python -import bettercsv as bcsv +import csvmeta as csvm data = [ ['name', 'age', 'state'], @@ -69,7 +69,7 @@ data = [ ] # Write data and metadata to a csv file folder -bcsv.write( +csvm.write( 'mydata.csv', data, header=True, @@ -83,7 +83,7 @@ bcsv.write( ) # Read metadata from a csv file folder -bcsv.metadata('mydata.csv') +csvm.metadata('mydata.csv') ## { ## "name": "mydata.csv", ## "path": "data.csv", diff --git a/bettercsv/__init__.py b/csvmeta/__init__.py similarity index 100% rename from bettercsv/__init__.py rename to csvmeta/__init__.py diff --git a/bettercsv/read.py b/csvmeta/read.py similarity index 100% rename from bettercsv/read.py rename to csvmeta/read.py diff --git a/bettercsv/write.py b/csvmeta/write.py similarity index 100% rename from bettercsv/write.py rename to csvmeta/write.py diff --git a/pyproject.toml b/pyproject.toml index 7292d15..11980de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["setuptools", "setuptools-scm"] build-backend = "setuptools.build_meta" [project] -name = "bettercsv" +name = "csvmeta" version = "1.0.0" description = "Lightweight csv read/write, keeping track of csv dialect and other metadata." authors = [{ name = "Olivier Binette", email = "olivier@olivierbinette.ca" }] @@ -29,7 +29,7 @@ homepage = "https://github.com/OlivierBinette/BetterCSV" Issues = "https://github.com/OlivierBinette/BetterCSV/issues" [tool.setuptools.packages.find] -include = ["bettercsv", "bettercsv.*"] +include = ["csvmeta", "csvmeta.*"] namespaces = false [tool.black]