Skip to content

Commit 81cc5b0

Browse files
committed
Rename from 'versioned-config' to 'config-versioned', which ACTUALLY avoids a reserved PyPI package name.
1 parent 03331ca commit 81cc5b0

18 files changed

Lines changed: 77 additions & 77 deletions

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
# versioned-config
1+
# config-versioned
22

33
A Python package for YAML-based configuration management in data pipelines, with versioned directory support and automatic file I/O by extension.
44

55
## Installation
66

77
```bash
8-
pip install versioned-config
8+
pip install config-versioned
99
```
1010

1111
Install optional extras for specific file formats:
1212

1313
```bash
14-
pip install versioned-config[pandas] # CSV, TSV, Excel, Stata
15-
pip install versioned-config[geo] # Shapefiles, GeoJSON, GeoPackage, etc.
16-
pip install versioned-config[raster] # GeoTIFF, rasterio formats
17-
pip install versioned-config[xarray] # NetCDF
18-
pip install versioned-config[dbfread] # DBF files
19-
pip install versioned-config[all] # All of the above
14+
pip install config-versioned[pandas] # CSV, TSV, Excel, Stata
15+
pip install config-versioned[geo] # Shapefiles, GeoJSON, GeoPackage, etc.
16+
pip install config-versioned[raster] # GeoTIFF, rasterio formats
17+
pip install config-versioned[xarray] # NetCDF
18+
pip install config-versioned[dbfread] # DBF files
19+
pip install config-versioned[all] # All of the above
2020
```
2121

2222
## Quick Start
@@ -48,7 +48,7 @@ versions:
4848
### 2. Load the config
4949
5050
```python
51-
from versioned_config import Config
51+
from config_versioned import Config
5252

5353
cfg = Config('project_config.yaml')
5454
```
@@ -110,7 +110,7 @@ cfg_v2.get_dir_path('results') # ~/data/results/v2
110110
## Standalone autoread / autowrite
111111

112112
```python
113-
from versioned_config import autoread, autowrite
113+
from config_versioned import autoread, autowrite
114114

115115
# Read by extension
116116
df = autoread('data/records.csv')
@@ -145,8 +145,8 @@ A bundled example is included with the package:
145145

146146
```python
147147
import importlib.resources as r
148-
from versioned_config import Config
148+
from config_versioned import Config
149149

150-
path = str(r.files("versioned_config") / "data" / "example_config.yaml")
150+
path = str(r.files("config_versioned") / "data" / "example_config.yaml")
151151
cfg = Config(path)
152152
```

docs/api.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@ API Reference
44
Config
55
------
66

7-
.. autoclass:: versioned_config.Config
7+
.. autoclass:: config_versioned.Config
88
:members:
99
:special-members: __init__, __repr__
1010

1111
File I/O
1212
--------
1313

14-
.. autofunction:: versioned_config.autoread
14+
.. autofunction:: config_versioned.autoread
1515

16-
.. autofunction:: versioned_config.autowrite
16+
.. autofunction:: config_versioned.autowrite
1717

1818
Format Registries
1919
-----------------
2020

21-
.. autofunction:: versioned_config.get_file_reading_functions
21+
.. autofunction:: config_versioned.get_file_reading_functions
2222

23-
.. autofunction:: versioned_config.get_file_writing_functions
23+
.. autofunction:: config_versioned.get_file_writing_functions
2424

2525
Utilities
2626
---------
2727

28-
.. autofunction:: versioned_config.pull_from_config
28+
.. autofunction:: config_versioned.pull_from_config

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
# -- Project information -----------------------------------------------------
1010

11-
from versioned_config import __version__
11+
from config_versioned import __version__
1212

1313
project = "versioning"
1414
copyright = "2026, Nathaniel Henry"

docs/getting_started.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
Getting Started
22
===============
33

4-
This guide introduces the **versioned-config** package, which simplifies management of
5-
project settings and file I/O by combining them in a single :class:`~versioned_config.Config`
4+
This guide introduces the **config-versioned** package, which simplifies management of
5+
project settings and file I/O by combining them in a single :class:`~config_versioned.Config`
66
object.
77

88
Data pipelines commonly require reading and writing data to versioned directories. Each
99
directory might correspond to one step of a multi-step process, where the version
1010
corresponds to particular settings for that step and a chain of prior steps that each
11-
have their own respective versions. The :class:`~versioned_config.Config` class makes it easy
11+
have their own respective versions. The :class:`~config_versioned.Config` class makes it easy
1212
to read and write versioned data based on YAML configuration files that can be saved
1313
alongside each versioned output folder.
1414

@@ -22,9 +22,9 @@ string, and boolean settings as well as hierarchically nested values. The
2222
.. code-block:: python
2323
2424
import importlib.resources as r
25-
from versioned_config import Config
25+
from config_versioned import Config
2626
27-
example_config_path = str(r.files("versioned_config") / "data" / "example_config.yaml")
27+
example_config_path = str(r.files("config_versioned") / "data" / "example_config.yaml")
2828
2929
The example YAML file looks like this:
3030

@@ -50,7 +50,7 @@ The example YAML file looks like this:
5050
versions:
5151
prepared_data: 'v1'
5252
53-
Create a :class:`~versioned_config.Config` object by passing either a path to a YAML file
53+
Create a :class:`~config_versioned.Config` object by passing either a path to a YAML file
5454
or a plain Python dict. The full config is stored in the ``config`` attribute:
5555

5656
.. code-block:: python
@@ -62,7 +62,7 @@ Retrieving settings
6262
-------------------
6363

6464
You can access the config dict directly (``config.config["a"]``), but
65-
:meth:`~versioned_config.Config.get` is preferable — it raises a clear ``KeyError`` if a
65+
:meth:`~config_versioned.Config.get` is preferable — it raises a clear ``KeyError`` if a
6666
setting is missing rather than returning ``None`` silently:
6767

6868
.. code-block:: python
@@ -85,7 +85,7 @@ Working with directories
8585
------------------------
8686

8787
Two top-level keys — ``directories`` and ``versions`` — give the
88-
:class:`~versioned_config.Config` object its versioning capability. Each entry under
88+
:class:`~config_versioned.Config` object its versioning capability. Each entry under
8989
``directories`` must have:
9090

9191
- **versioned** (bool) — whether the directory has version subdirectories
@@ -96,8 +96,8 @@ For **versioned** directories the full path is ``{path}/{version}``, where the v
9696
string comes from the ``versions`` dict. For **non-versioned** directories the full
9797
path is just ``path``.
9898

99-
Use :meth:`~versioned_config.Config.get_dir_path` and
100-
:meth:`~versioned_config.Config.get_file_path` to build these paths:
99+
Use :meth:`~config_versioned.Config.get_dir_path` and
100+
:meth:`~config_versioned.Config.get_file_path` to build these paths:
101101

102102
.. code-block:: python
103103
@@ -136,13 +136,13 @@ Reading and writing files
136136
-------------------------
137137

138138
Copy the bundled example CSV into the raw data directory, then use
139-
:meth:`~versioned_config.Config.read` and :meth:`~versioned_config.Config.write` to move data
139+
:meth:`~config_versioned.Config.read` and :meth:`~config_versioned.Config.write` to move data
140140
through the pipeline:
141141

142142
.. code-block:: python
143143
144144
# Copy the example input file into the raw_data directory
145-
example_csv = str(r.files("versioned_config") / "data" / "example_input_file.csv")
145+
example_csv = str(r.files("config_versioned") / "data" / "example_input_file.csv")
146146
shutil.copy(example_csv, config.get_file_path("raw_data", "a"))
147147
148148
# Read the CSV (returns a pandas DataFrame)
@@ -159,21 +159,21 @@ through the pipeline:
159159
# Both files now appear in the versioned directory
160160
list(config.get_dir_path("prepared_data").iterdir())
161161
162-
These methods delegate to :func:`~versioned_config.autoread` and
163-
:func:`~versioned_config.autowrite`, which dispatch on file extension. To see every
162+
These methods delegate to :func:`~config_versioned.autoread` and
163+
:func:`~config_versioned.autowrite`, which dispatch on file extension. To see every
164164
supported extension:
165165

166166
.. code-block:: python
167167
168-
from versioned_config import get_file_reading_functions, get_file_writing_functions
168+
from config_versioned import get_file_reading_functions, get_file_writing_functions
169169
170170
sorted(get_file_reading_functions().keys())
171171
sorted(get_file_writing_functions().keys())
172172
173173
Saving the config alongside outputs
174174
------------------------------------
175175

176-
:meth:`~versioned_config.Config.write_self` writes the current config dict as
176+
:meth:`~config_versioned.Config.write_self` writes the current config dict as
177177
``config.yaml`` into a named directory. This is useful for reproducibility — you can
178178
always see exactly which settings produced a given set of outputs:
179179

@@ -188,7 +188,7 @@ Overriding versions at runtime
188188
-------------------------------
189189

190190
Rather than editing the YAML file between runs, you can pass a ``versions`` dict when
191-
constructing a :class:`~versioned_config.Config` object. This sets or overwrites the
191+
constructing a :class:`~config_versioned.Config` object. This sets or overwrites the
192192
specified versions while leaving all other settings unchanged — useful for command-line
193193
scripts or automated pipelines:
194194

docs/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ automatic file I/O by extension.
66

77
.. code-block:: bash
88
9-
pip install versioned-config
9+
pip install config-versioned
1010
1111
**Quick example:**
1212

1313
.. code-block:: python
1414
1515
import importlib.resources as r
16-
from versioned_config import Config
16+
from config_versioned import Config
1717
1818
# Load the bundled example config
19-
path = str(r.files("versioned_config") / "data" / "example_config.yaml")
19+
path = str(r.files("config_versioned") / "data" / "example_config.yaml")
2020
cfg = Config(path)
2121
2222
# Retrieve settings (top-level and nested)

docs/installation.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ Core package (YAML support only):
55

66
.. code-block:: bash
77
8-
pip install versioned-config
8+
pip install config-versioned
99
1010
With optional file-format extras:
1111

1212
.. code-block:: bash
1313
14-
pip install versioned-config[pandas] # CSV, TSV, Excel, Stata
15-
pip install versioned-config[geo] # Shapefiles, GeoJSON, GeoPackage, etc.
16-
pip install versioned-config[raster] # GeoTIFF and other raster formats
17-
pip install versioned-config[xarray] # NetCDF
18-
pip install versioned-config[dbfread] # DBF files
19-
pip install versioned-config[all] # All of the above
14+
pip install config-versioned[pandas] # CSV, TSV, Excel, Stata
15+
pip install config-versioned[geo] # Shapefiles, GeoJSON, GeoPackage, etc.
16+
pip install config-versioned[raster] # GeoTIFF and other raster formats
17+
pip install config-versioned[xarray] # NetCDF
18+
pip install config-versioned[dbfread] # DBF files
19+
pip install config-versioned[all] # All of the above
2020
2121
Config file structure
2222
---------------------
@@ -92,7 +92,7 @@ Supported file extensions
9292
- nc
9393
- ``xarray``
9494

95-
For raster files, :func:`~versioned_config.autoread` returns
95+
For raster files, :func:`~config_versioned.autoread` returns
9696
``{"data": np.ndarray, "profile": dict}`` and
97-
:func:`~versioned_config.autowrite` accepts that same structure (or a
97+
:func:`~config_versioned.autowrite` accepts that same structure (or a
9898
``(data, profile)`` tuple).

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["setuptools>=68", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
6-
name = "versioned-config"
6+
name = "config-versioned"
77
version = "0.2.0"
88
description = "Settings and file I/O management using a configuration YAML file"
99
readme = "README.md"
@@ -54,7 +54,7 @@ dev = [
5454
where = ["src"]
5555

5656
[tool.setuptools.package-data]
57-
"versioned_config" = ["data/*.yaml", "data/*.csv"]
57+
"config_versioned" = ["data/*.yaml", "data/*.csv"]
5858

5959
[tool.pytest.ini_options]
6060
testpaths = ["tests"]

src/config_versioned/__init__.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""config_versioned: YAML-based config management for versioned data pipelines."""
2+
3+
__version__ = "0.2.0"
4+
5+
from config_versioned.config import Config
6+
from config_versioned.autoread import autoread, get_file_reading_functions
7+
from config_versioned.autowrite import autowrite, get_file_writing_functions
8+
from config_versioned.utilities import pull_from_config
9+
10+
__all__ = [
11+
"Config",
12+
"autoread",
13+
"autowrite",
14+
"pull_from_config",
15+
"get_file_reading_functions",
16+
"get_file_writing_functions",
17+
]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
from pathlib import Path
55

6-
from versioned_config.utilities import pull_from_config
6+
from config_versioned.utilities import pull_from_config
77

88

99
def _require_or_raise(pkg_name, install_extra=None):
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
from pathlib import Path
55

6-
from versioned_config.autoread import _require_or_raise
6+
from config_versioned.autoread import _require_or_raise
77

88

99
def get_file_writing_functions():

0 commit comments

Comments
 (0)