{"id":50429815,"url":"https://github.com/saezlab/pkg-infra","last_synced_at":"2026-05-31T13:02:51.472Z","repository":{"id":326518474,"uuid":"1105900259","full_name":"saezlab/pkg-infra","owner":"saezlab","description":"Session, config and log handler for Saezlab Python packages","archived":false,"fork":false,"pushed_at":"2026-04-05T19:48:57.000Z","size":1517,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-08T22:10:43.750Z","etag":null,"topics":["best-practices","software-engineering"],"latest_commit_sha":null,"homepage":"https://saezlab.github.io/pkg-infra","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saezlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-28T10:18:47.000Z","updated_at":"2026-04-06T01:37:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/saezlab/pkg-infra","commit_stats":null,"previous_names":["saezlab/saezlab_core","saezlab/pkg-infra","saezlab/pkg_infra"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/saezlab/pkg-infra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saezlab%2Fpkg-infra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saezlab%2Fpkg-infra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saezlab%2Fpkg-infra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saezlab%2Fpkg-infra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saezlab","download_url":"https://codeload.github.com/saezlab/pkg-infra/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saezlab%2Fpkg-infra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33732000,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["best-practices","software-engineering"],"created_at":"2026-05-31T13:02:47.138Z","updated_at":"2026-05-31T13:02:51.466Z","avatar_url":"https://github.com/saezlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![project-banner](https://raw.githubusercontent.com/saezlab/pkg_infra/main/docs/assets/project-banner-readme.png)\n\n---\n\n\n[![Tests](https://img.shields.io/github/actions/workflow/status/saezlab/pkg_infra/ci-testing-unit.yml?branch=main)](https://github.com/saezlab/pkg_infra/actions/workflows/ci-testing-unit.yml)\n[![Docs](https://img.shields.io/badge/docs-MkDocs-blue)](https://saezlab.github.io/pkg_infra/)\n![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)\n[![PyPI](https://img.shields.io/pypi/v/pkg_infra)](https://pypi.org/project/pkg_infra/)\n![Python](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsaezlab%2Fpkg_infra%2Fmain%2Fpyproject.toml\u0026query=%24.project.requires-python\u0026label=python)\n![License](https://img.shields.io/github/license/saezlab/pkg_infra)\n![Issues](https://img.shields.io/github/issues/saezlab/pkg_infra)\n![Last Commit](https://img.shields.io/github/last-commit/saezlab/pkg_infra)\n\n`pkg_infra` provides shared infrastructure for Saezlab Python packages. It\nstandardizes three pieces of runtime behavior that are often reimplemented\nad hoc across projects:\n\n- Session metadata for reproducible runs and workspace-aware execution\n- Layered YAML configuration with validation and predictable precedence\n- Centralized logging based on Python's standard `logging` module\n\n\n\n## What it includes\n\n- `pkg_infra.get_session(...)` as the main entrypoint for initializing runtime\n  state\n- Config loading from ecosystem, package default, user, working directory,\n  environment variable, and optional custom file sources\n- Pydantic-based validation for the merged settings model\n- Logging configuration generation with support for file handlers, JSON output,\n  package groups, and async queue-based logging\n- A packaged baseline configuration in\n  `pkg_infra/data/default_settings.yaml`\n\n## Installation\n\nInstall the package from PyPI:\n\n```bash\npip install pkg_infra\n```\n\nInstall it from a local checkout with docs or test extras when developing:\n\n```bash\npip install -e \".[docs,tests]\"\n```\n\n## Quick Example\n\n```python\nfrom pathlib import Path\n\nfrom pkg_infra import get_session\n\nsession = get_session(\n    workspace=Path(\".\"),\n    include_location=False,\n)\n\nprint(session)\nprint(session.get_config_dict())\n\ncorneto_settings = session.get_conf(\"corneto\")\nprint(corneto_settings)\n```\n\n## Configuration Precedence\n\n`pkg_infra` merges configuration sources in this order, where later sources\noverride earlier ones:\n\n1. Ecosystem config\n2. Packaged default config\n3. User config\n4. Working-directory config\n5. Config file pointed to by `PKG_INFRA_CONFIG`\n6. Explicit custom config path passed by the caller\n\n## Documentation\n\nThe full documentation is published at\n\u003chttps://saezlab.github.io/pkg_infra/\u003e.\n\nTo serve the docs locally without the current upstream Material warning banner:\n\n```bash\nsource .venv/bin/activate\nexport NO_MKDOCS_2_WARNING=1\nmkdocs serve\n```\n\nRecommended starting points:\n\n- Installation: `docs/installation.md`\n- Quickstart: `docs/learn/tutorials/quickstart.md`\n- Project context and rationale: `docs/pkg_infra-project/`\n\n## Contributing\n\nContributions are welcome. The repository includes dedicated guides for\ndocumentation and code contributions in `docs/community/`.\n\n## License\n\nThis project is distributed under the BSD-3-Clause License. See `LICENSE` for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaezlab%2Fpkg-infra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaezlab%2Fpkg-infra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaezlab%2Fpkg-infra/lists"}