Skip to content

Untrack config.ini; provide config.ini.example instead - #120

Merged
roed314 merged 1 commit into
roed314:mainfrom
roed-math:untrack-config-ini
Jul 22, 2026
Merged

Untrack config.ini; provide config.ini.example instead#120
roed314 merged 1 commit into
roed314:mainfrom
roed-math:untrack-config-ini

Conversation

@roed-math

Copy link
Copy Markdown

config.ini was git-tracked at the repo root with a password = field — while secrets.ini (the other file that can hold a password) is gitignored with a "should not be committed!" comment. Anyone testing against a real server fills in the password and is one git add -A away from committing a credential. It also interacts with config discovery: ./config.ini (if it exists) is the default, so every script run from a psycodict checkout silently bound to the tracked file — and under #119's discovery order that stays true.

This PR:

  • removes config.ini from tracking (the file itself is untouched in existing checkouts),
  • gitignores it next to secrets.ini,
  • adds a commented config.ini.example (same contents), noting that the password can instead live in secrets.ini, which overrides the config file (config.py L188–190).

Not a packaging issue — the build backend is plain setuptools with no MANIFEST.in, so the file never reached the sdist; this is repo hygiene.

Tests: unaffected. conftest.py builds a throwaway config from libpq env vars and never reads the repo file; CI's seminars smoke step writes its own. tests/test_config.py: 47 passed on this branch.

Note for existing checkouts: if your local config.ini has uncommitted edits (e.g. a filled-in password), pulling this commit surfaces a modify/delete conflict — resolve by keeping your copy; once .gitignore lands it stays untracked.

🤖 Generated with Claude Code

config.ini was tracked at the repo root with a blank `password =` field,
while secrets.ini (the other file that can hold a password) is gitignored
with a "should not be committed!" warning. Anyone testing against a real
server fills the password in and is one `git add -A` away from committing
a credential; discovery of ./config.ini also makes the checkout's copy
silently active for any script run from the repo.

Remove it from tracking, gitignore it alongside secrets.ini, and ship a
commented config.ini.example to copy from. Tests are unaffected: conftest
builds its own throwaway config from libpq environment variables and never
reads the repo file, and CI's downstream smoke step writes its own.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@roed314
roed314 merged commit 861ef4c into roed314:main Jul 22, 2026
16 checks passed
roed-math pushed a commit to roed-math/psycodict that referenced this pull request Jul 22, 2026
Rebased onto main, which absorbed everything this PR used to anticipate;
the reconciliation:

- Version: 1.0.0 is now set in psycodict.__init__.__version__, the single
  source of truth roed314#121 established -- pyproject keeps main's dynamic
  version, SPDX license string and >=3.9 floor, and this PR's classifiers
  drop the License:: entry (setuptools >= 77 rejects it next to an SPDX
  string) and the 3.8 entry.

- README: the rewrite now carries the Versioning.md pointer (roed314#123) in its
  Documentation list, which switches to relative links -- on the Sphinx
  site (roed314#122) those resolve to the copied guide pages, and they still
  render on GitHub; CHANGELOG and LICENSE stay absolute since neither is
  on the site.  Supported Python is 3.9+; blob/master URLs become
  blob/main.

- CHANGELOG: entries for the late wave -- sum/random honoring saving
  (roed314#118) and the 3.9 floor (roed314#121) under breaking changes; the docs site
  (roed314#122), Versioning.md/CONTRIBUTING/SECURITY and __version__ (roed314#121)
  under added; reload metafile+resort (roed314#114), update_from_file stats
  publication (roed314#115), copy_dumps delimiter escaping (roed314#116) under fixed;
  config.ini untracking (roed314#120), this release workflow and CITATION.cff
  (roed314#124) under infrastructure.

- release.yml: the flow notes now say bump __init__.__version__ and merge
  to main.

- Fixes the docs build on main, broken by the roed314#119 x roed314#122 crossing (roed314#119
  merged after roed314#122's last CI run): the Configuration docstring's nested
  defaults list needed blank lines to be valid RST under autodoc, and the
  README's relative LICENSE link had no target on the site.

Suite 857 passed / 36 skipped; ruff clean; sphinx -W clean; python -m
build + twine check --strict pass with Version 1.0.0,
License-Expression GPL-2.0-or-later, Requires-Python >=3.9 and no
License classifier in the wheel metadata.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants