ramtable 0.3.2__tar.gz → 0.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,20 @@
3
3
  Notable changes to RAMTable are documented in this file. The history starts
4
4
  with the project's first version.
5
5
 
6
+ ## [0.3.3]
7
+
8
+ Adds contribution guidelines for the project.
9
+
10
+ ### Added
11
+
12
+ - `CONTRIBUTING.md` covering contribution scope, the prior-approval policy
13
+ for new features, single-maintainer review expectations, branch naming,
14
+ development setup, testing expectations, and pull request guidelines.
15
+
16
+ ### Changed
17
+
18
+ - `rows.py` changed `indices` to `indexes` in `get()` methods.
19
+
6
20
  ## [0.3.2]
7
21
 
8
22
  Raises the minimum supported Python version, expands the tested versions,
@@ -0,0 +1,281 @@
1
+ # Contributing to RAMTable
2
+
3
+ Thank you for considering a contribution to RAMTable. Bug fixes,
4
+ documentation improvements, tests, refactorings, performance work, and
5
+ approved new features are all welcome. This guide explains how the project is
6
+ maintained and how to prepare a contribution that is easy to review.
7
+
8
+ ## Contents
9
+
10
+ - [Ways to contribute](#ways-to-contribute)
11
+ - [New features require approval](#new-features-require-approval)
12
+ - [Maintenance and review expectations](#maintenance-and-review-expectations)
13
+ - [Branch workflow](#branch-workflow)
14
+ - [Development setup](#development-setup)
15
+ - [Checks, testing, and supported Python versions](#checks-testing-and-supported-python-versions)
16
+ - [Code style and documentation](#code-style-and-documentation)
17
+ - [Changelog and versioning](#changelog-and-versioning)
18
+ - [Pull request guidelines](#pull-request-guidelines)
19
+ - [Reporting bugs](#reporting-bugs)
20
+ - [License](#license)
21
+
22
+ ## Ways to contribute
23
+
24
+ Contributions of all sizes are appreciated:
25
+
26
+ - bug fixes;
27
+ - documentation improvements;
28
+ - tests and test coverage;
29
+ - code refactoring;
30
+ - performance improvements;
31
+ - new features, after prior approval;
32
+ - other improvements that fit the project's goals.
33
+
34
+ ## New features require approval
35
+
36
+ To keep the project's direction coherent and avoid work that may not fit its
37
+ goals, **new features must be approved before implementation**.
38
+
39
+ Before writing code for a new feature:
40
+
41
+ 1. Open a GitHub Issue describing the proposed functionality.
42
+ 2. Explain the problem it solves and why it would be useful.
43
+ 3. Wait for a maintainer to approve the proposal.
44
+
45
+ Pull requests that introduce unapproved features may be closed without being
46
+ merged. If you are unsure whether your idea counts as a new feature, open an
47
+ Issue and ask before starting.
48
+
49
+ Small fixes, documentation updates, and refactorings that do not change
50
+ behavior do not need prior approval.
51
+
52
+ ## Maintenance and review expectations
53
+
54
+ **RAMTable is currently maintained by a single developer.** There is no
55
+ dedicated team handling Issues or reviewing pull requests.
56
+
57
+ As a result:
58
+
59
+ - Issue responses may take some time.
60
+ - Pull request reviews may be delayed.
61
+ - A contribution may remain pending for a while before receiving feedback.
62
+ - Immediate responses and merges should not be expected.
63
+ - The maintainer reviews contributions as time and availability allow.
64
+
65
+ This does not mean contributions are unwelcome. Every report and pull request
66
+ is appreciated, and a polite follow-up after a reasonable waiting period is
67
+ fine. Clear, focused contributions are easier to review and more likely to
68
+ move forward.
69
+
70
+ ## Branch workflow
71
+
72
+ The development branch is **`dev`**. Open contributions as pull requests
73
+ against `dev`.
74
+
75
+ Maintainers promote releases through the permanent branches:
76
+
77
+ ```text
78
+ dev → test_pypi → main
79
+ ```
80
+
81
+ `test_pypi` and `main` are release branches. Unless a maintainer asks you
82
+ otherwise, do not open contribution pull requests against them.
83
+
84
+ Create a branch from an up-to-date `dev` and use one of these prefixes:
85
+
86
+ | Prefix | Purpose | Example |
87
+ |---|---|---|
88
+ | `feat/` | New features approved through an Issue | `feat/bulk-insert` |
89
+ | `fix/` | Bug fixes | `fix/column-validation` |
90
+ | `docs/` | Documentation changes | `docs/api-reference` |
91
+ | `refactor/` | Code refactoring | `refactor/row-storage` |
92
+ | `test/` | Test-related changes | `test/column-edge-cases` |
93
+
94
+ For example:
95
+
96
+ ```bash
97
+ git switch dev
98
+ git pull upstream dev
99
+ git switch -c fix/column-validation
100
+ ```
101
+
102
+ These commands assume the `upstream` remote added in
103
+ [Development setup](#development-setup).
104
+
105
+ ## Development setup
106
+
107
+ RAMTable requires **Python 3.11 or later**.
108
+
109
+ 1. Fork the repository on GitHub.
110
+ 2. Clone your fork and add the upstream repository:
111
+
112
+ ```bash
113
+ git clone https://github.com/<your-user>/ramtable_py.git
114
+ cd ramtable_py
115
+ git remote add upstream https://github.com/thiagostilo2121/ramtable_py.git
116
+ ```
117
+
118
+ 3. Create and activate a virtual environment:
119
+
120
+ ```bash
121
+ python3 -m venv .venv
122
+ source .venv/bin/activate
123
+ ```
124
+
125
+ On Windows, use `python` instead of `python3` and activate with:
126
+
127
+ ```powershell
128
+ .venv\Scripts\activate
129
+ ```
130
+
131
+ 4. Install the project in editable mode:
132
+
133
+ ```bash
134
+ python -m pip install --upgrade pip
135
+ python -m pip install --editable .
136
+ ```
137
+
138
+ RAMTable has no runtime dependencies, and the repository does not define
139
+ development dependencies or extras. If you need to build distributions, install
140
+ the build tools separately:
141
+
142
+ ```bash
143
+ python -m pip install build twine
144
+ ```
145
+
146
+ ## Checks, testing, and supported Python versions
147
+
148
+ The repository does not currently include an automated test suite, and no
149
+ linter, formatter, or static type checker is configured. Contributions should
150
+ still be verified locally.
151
+
152
+ The CI workflow installs the package, byte-compiles it, and checks the public
153
+ imports. You can run the same checks from the repository root:
154
+
155
+ ```bash
156
+ python -m compileall -q src/ramtable
157
+ python -c "from ramtable import Columns, Rows, Table"
158
+ ```
159
+
160
+ If you build distributions, validate them with:
161
+
162
+ ```bash
163
+ python -m build
164
+ python -m twine check dist/*
165
+ ```
166
+
167
+ GitHub Actions runs these checks on Python **3.11, 3.12, 3.13, 3.14, and
168
+ 3.15** for pushes to `dev` and for pull requests targeting `dev`, `test_pypi`,
169
+ and `main`. Pull requests targeting `test_pypi` and `main` also run the
170
+ release validation and build; publication happens only after a pull request is
171
+ merged. Keep every change compatible with all supported versions.
172
+
173
+ ### What to test
174
+
175
+ - **Bug fixes:** include a regression test that fails before the fix and
176
+ passes afterwards, once a test framework is available. Until then, describe
177
+ the reproduction steps and the verification you performed in the pull
178
+ request.
179
+ - **New functionality:** include tests with the implementation. Because the
180
+ project does not yet have a configured test framework, discuss the proposed
181
+ testing approach in the feature Issue first.
182
+ - **Documentation and refactorings:** confirm that the existing examples and
183
+ public imports still work.
184
+
185
+ Do not claim that a check is passing if you did not run it.
186
+
187
+ ## Code style and documentation
188
+
189
+ Follow the style and structure already used in `src/ramtable`:
190
+
191
+ - use four-space indentation and keep lines close to 79 characters;
192
+ - add type hints to functions and methods;
193
+ - write docstrings in the existing style, with `Args`, `Returns`, and
194
+ `Raises` sections where applicable;
195
+ - raise standard exceptions with clear messages, such as `ValueError`,
196
+ `TypeError`, or `IndexError`;
197
+ - preserve the library's validate-then-write behavior: validate a request
198
+ completely before modifying stored rows;
199
+ - keep the public API consistent, and expose new public symbols through
200
+ `src/ramtable/__init__.py` and `__all__`;
201
+ - avoid adding runtime dependencies unless they are discussed and approved in
202
+ an Issue;
203
+ - keep changes focused on the problem described in the Issue or pull request.
204
+
205
+ When behavior changes, update the relevant documentation in `docs/`:
206
+
207
+ - `docs/guide.md` for user-facing workflows;
208
+ - `docs/api.md` for signatures, arguments, returns, and exceptions;
209
+ - `docs/types-and-validation.md` for validation rules.
210
+
211
+ The repository history uses Conventional Commits-style messages, such as
212
+ `fix: ...`, `docs: ...`, and `feat: ...`. Following that style is appreciated,
213
+ but clear and descriptive commit messages matter most.
214
+
215
+ ## Changelog and versioning
216
+
217
+ `CHANGELOG.md` records notable changes under version headings, with sections
218
+ such as `Added`, `Changed`, and `Fixed`. User-visible changes should be
219
+ reflected there when appropriate. Internal refactorings and trivial changes do
220
+ not need an entry. If you are unsure, mention the change in your pull request
221
+ and ask.
222
+
223
+ Do not modify `project.version` in `pyproject.toml`, create release headings,
224
+ or hardcode the current version in the README or documentation.
225
+ `pyproject.toml` is the single source of truth for the version, and version
226
+ bumps are part of the maintainer's release process.
227
+
228
+ ## Pull request guidelines
229
+
230
+ Pull requests should:
231
+
232
+ - have a clear, descriptive title;
233
+ - explain what changed and why;
234
+ - reference the related Issue when one exists;
235
+ - include tests for relevant changes, following the guidance above;
236
+ - update documentation when behavior or the public API changes;
237
+ - avoid unrelated changes;
238
+ - stay focused and reasonably small whenever possible.
239
+
240
+ For a new feature, link the Issue where the feature was approved. Pull
241
+ requests without that approval may be closed.
242
+
243
+ Opening a pull request does not guarantee acceptance or an immediate review.
244
+ The maintainer may request changes, ask for the branch to be updated, or
245
+ decide that a contribution does not fit the project's direction.
246
+
247
+ Before opening a pull request:
248
+
249
+ ```bash
250
+ git fetch upstream
251
+ git switch dev
252
+ git pull upstream dev
253
+ git switch your-branch-name
254
+ git rebase upstream/dev
255
+ ```
256
+
257
+ Then run the checks described above and make sure the diff contains only the
258
+ intended changes.
259
+
260
+ ## Reporting bugs
261
+
262
+ When reporting a bug, include:
263
+
264
+ - the RAMTable version:
265
+
266
+ ```bash
267
+ python -c "import ramtable; print(ramtable.__version__)"
268
+ ```
269
+
270
+ - your Python version and operating system;
271
+ - a minimal, reproducible example;
272
+ - the expected result and the actual result;
273
+ - the complete traceback, if one was raised.
274
+
275
+ Search existing Issues first to avoid duplicates.
276
+
277
+ ## License
278
+
279
+ RAMTable is released under the MIT License. See [LICENSE](LICENSE) for the
280
+ full text. By contributing, you agree that your contributions may be
281
+ distributed under the same license.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ramtable
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: A lightweight in-memory table library for Python.
5
5
  Author: Thiago Valentín Stilo Limarino
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "ramtable"
7
- version = "0.3.2"
7
+ version = "0.3.3"
8
8
  description = "A lightweight in-memory table library for Python."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -286,7 +286,7 @@ class Rows:
286
286
  """Remove all rows without changing the schema."""
287
287
  self._storage.clear()
288
288
 
289
- def get(self, *indices: int) -> list[dict[str, Any]]:
289
+ def get(self, *indexes: int) -> list[dict[str, Any]]:
290
290
  """Return all rows or copies of the requested positions.
291
291
 
292
292
  With no arguments, return all rows. Indexes support negative values as
@@ -298,14 +298,14 @@ class Rows:
298
298
  IndexError: If an index is out of range.
299
299
  """
300
300
 
301
- if not indices:
301
+ if not indexes:
302
302
  return self.get_all()
303
303
 
304
304
  selected = []
305
305
 
306
- for index in indices:
306
+ for index in indexes:
307
307
  if isinstance(index, bool) or not isinstance(index, int):
308
- raise TypeError("Row indices must be integers.")
308
+ raise TypeError("Row indexes must be integers.")
309
309
 
310
310
  try:
311
311
  selected.append(self._storage[index].copy())
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes