Skip to content

Commit ca9e0a3

Browse files
committed
feat: initial commit
0 parents  commit ca9e0a3

98 files changed

Lines changed: 14077 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
pypi:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
13+
contents: read
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: astral-sh/setup-uv@v5
17+
- run: uv build
18+
- run: uv publish

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*.egg-info/
5+
.venv/
6+
.pytest_cache/
7+
8+
# Build artifacts
9+
dist/
10+
build/
11+
site/
12+
docs/_build/
13+
14+
# Outputs and local assets
15+
outputs/
16+
17+
# macOS
18+
**/.DS_Store

.readthedocs.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
python: "3.11"
7+
8+
python:
9+
install:
10+
- method: pip
11+
path: .
12+
extra_requirements:
13+
- docs
14+
- requirements: docs/requirements.txt
15+
16+
mkdocs:
17+
configuration: mkdocs.yml

AGENTS.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Repository Guidelines
2+
3+
## Project Structure & Module Organization
4+
- Source code: `src/oobss/` with namespaces:
5+
- `oobss.separators` (algorithms), `oobss.audio` (I/O, STFT), `oobss.configs`, `oobss.logging_utils`.
6+
- CLI entrypoint: `oobss` (defined in `pyproject.toml`).
7+
- Documentation: `docs/` (Material for MkDocs + mkdocstrings).
8+
- Examples: `examples/` (separation, evaluation, benchmarks, block spectrogram).
9+
- Tests: `tests/`.
10+
11+
## Build, Test, and Development Commands
12+
- `uv sync` — create/update the virtual environment.
13+
- `uv run pytest` — run the test suite.
14+
- `uv run mkdocs build` — build docs locally.
15+
- `uv run ruff format .` — auto-format code.
16+
- `uv run ty check` — type check.
17+
- Releases: `uv build` / `uv publish` (must still support `pip install torchrir`).
18+
- `uv.lock` is committed; update it **only** when `pyproject.toml` changes.
19+
20+
## Coding Style & Naming Conventions
21+
- Python: follow Ruff defaults and `ty` type checker; prefer explicit imports and small modules.
22+
- Naming: snake_case for functions/variables, PascalCase for classes. Public API lives under the `oobss` package.
23+
- Keep docstrings concise; use English for all docs and comments.
24+
25+
## Testing Guidelines
26+
- Framework: `pytest`.
27+
- Run: `uv run pytest`.
28+
- Aim to cover separator interfaces (`OnlineSeparator.process_stream`), streaming utilities, and examples where feasible.
29+
- Keep fixtures small; prefer synthetic data over large assets.
30+
31+
## Commit & Pull Request Guidelines
32+
- Codex proposes commit message drafts; the user reviews/approves before committing.
33+
- All commits must follow Conventional Commits via Commitizen (`uv run cz commit`).
34+
- Before PR: run format (`uv run ruff format .`), type check (`uv run ty check`), tests, and (if docs touched) `uv run mkdocs build`.
35+
- PRs should include a concise summary, linked issues/design notes, and example outputs/benchmarks when performance-critical code changes.
36+
37+
## Versioning & Releases
38+
- Use Commitizen for version bumps, tagging, and changelog updates.
39+
- Run: `uv run cz bump --changelog --yes`
40+
- Version source: `pyproject.toml` (PEP 621); tag format `vX.Y.Z`.
41+
- After bumping, push commits and tags: `git push origin main --tags`.
42+
- Signed tags are manual by the user, e.g., `git tag -s vX.Y.Z -m "vX.Y.Z"`.
43+
44+
## Security & Configuration Tips
45+
- Secrets/credentials should never be committed; use environment variables for local tests.
46+
- Optional deps (torch, torchaudio, torchrir, sounddevice) are not pinned; document which extras are required for your feature.

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.

LICENSE

Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
oobss Custom Non-Commercial License
2+
(Apache License 2.0 with Additional Restrictions)
3+
4+
Copyright (c) 2026 oobss contributors
5+
6+
This license is based on the Apache License, Version 2.0 (the "Apache 2.0 License").
7+
The Apache 2.0 License text appears below and is incorporated by reference.
8+
9+
Additional Restrictions (override Apache 2.0 where applicable)
10+
----------------------------------------------------------------
11+
12+
You may use, copy, modify, and distribute this software only under the
13+
conditions below. If there is any conflict between the Apache 2.0 License and
14+
these Additional Restrictions, these Additional Restrictions control.
15+
16+
1) Non-Commercial Use Only
17+
You may not use this software, in whole or in part, for Commercial Purposes.
18+
19+
"Commercial Purposes" means any use intended for or directed toward
20+
commercial advantage or monetary compensation, including but not limited to:
21+
- selling software or services that include this software,
22+
- using this software in paid products, SaaS, or consulting deliverables,
23+
- internal business operations that generate revenue or reduce commercial
24+
operating costs as part of a commercial activity.
25+
26+
2) Required Attribution for Any Use
27+
Any redistribution, publication, deployment, service, product, or research
28+
artifact that uses this software (including modified versions or derivative
29+
works) must include a clear and visible attribution notice.
30+
31+
The attribution must include at least:
32+
- the project name: "oobss"
33+
- the copyright holder/contributors
34+
- a reference to this license file
35+
36+
Example attribution:
37+
"This product uses oobss (Copyright (c) 2026 oobss contributors), licensed
38+
under the oobss Custom Non-Commercial License (Apache 2.0 with Additional
39+
Restrictions)."
40+
41+
3) Downstream Notice and Pass-Through
42+
If you distribute this software or derivative works, you must:
43+
- keep all copyright, license, and attribution notices,
44+
- provide a copy of this license,
45+
- require downstream recipients to comply with the same terms.
46+
47+
4) No Trademark License
48+
This license does not grant permission to use any project or contributor
49+
names, marks, or logos except as necessary for the required attribution.
50+
51+
5) Reservation of Rights
52+
All rights not expressly granted are reserved.
53+
54+
---------------------------------------------------------------------------
55+
Apache License
56+
Version 2.0, January 2004
57+
http://www.apache.org/licenses/
58+
59+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
60+
61+
1. Definitions.
62+
63+
"License" shall mean the terms and conditions for use, reproduction,
64+
and distribution as defined by Sections 1 through 9 of this document.
65+
66+
"Licensor" shall mean the copyright owner or entity authorized by
67+
the copyright owner that is granting the License.
68+
69+
"Legal Entity" shall mean the union of the acting entity and all
70+
other entities that control, are controlled by, or are under common
71+
control with that entity. For the purposes of this definition,
72+
"control" means (i) the power, direct or indirect, to cause the
73+
direction or management of such entity, whether by contract or
74+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
75+
outstanding shares, or (iii) beneficial ownership of such entity.
76+
77+
"You" (or "Your") shall mean an individual or Legal Entity
78+
exercising permissions granted by this License.
79+
80+
"Source" form shall mean the preferred form for making modifications,
81+
including but not limited to software source code, documentation
82+
source, and configuration files.
83+
84+
"Object" form shall mean any form resulting from mechanical
85+
transformation or translation of a Source form, including but
86+
not limited to compiled object code, generated documentation,
87+
and conversions to other media types.
88+
89+
"Work" shall mean the work of authorship, whether in Source or
90+
Object form, made available under the License, as indicated by a
91+
copyright notice that is included in or attached to the work
92+
(an example is provided in the Appendix below).
93+
94+
"Derivative Works" shall mean any work, whether in Source or Object
95+
form, that is based on (or derived from) the Work and for which the
96+
editorial revisions, annotations, elaborations, or other modifications
97+
represent, as a whole, an original work of authorship. For the purposes
98+
of this License, Derivative Works shall not include works that remain
99+
separable from, or merely link (or bind by name) to the interfaces of,
100+
the Work and Derivative Works thereof.
101+
102+
"Contribution" shall mean any work of authorship, including
103+
the original version of the Work and any modifications or additions
104+
to that Work or Derivative Works thereof, that is intentionally
105+
submitted to Licensor for inclusion in the Work by the copyright owner
106+
or by an individual or Legal Entity authorized to submit on behalf of
107+
the copyright owner. For the purposes of this definition, "submitted"
108+
means any form of electronic, verbal, or written communication sent
109+
to the Licensor or its representatives, including but not limited to
110+
communication on electronic mailing lists, source code control systems,
111+
and issue tracking systems that are managed by, or on behalf of, the
112+
Licensor for the purpose of discussing and improving the Work, but
113+
excluding communication that is conspicuously marked or otherwise
114+
designated in writing by the copyright owner as "Not a Contribution."
115+
116+
"Contributor" shall mean Licensor and any individual or Legal Entity
117+
on behalf of whom a Contribution has been received by Licensor and
118+
subsequently incorporated within the Work.
119+
120+
2. Grant of Copyright License.
121+
Subject to the terms and conditions of this License, each Contributor
122+
hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
123+
royalty-free, irrevocable copyright license to reproduce, prepare
124+
Derivative Works of, publicly display, publicly perform, sublicense,
125+
and distribute the Work and such Derivative Works in Source or Object
126+
form.
127+
128+
3. Grant of Patent License.
129+
Subject to the terms and conditions of this License, each Contributor
130+
hereby grants to You a perpetual, worldwide, non-exclusive, no-charge,
131+
royalty-free, irrevocable (except as stated in this section) patent
132+
license to make, have made, use, offer to sell, sell, import, and
133+
otherwise transfer the Work, where such license applies only to those
134+
patent claims licensable by such Contributor that are necessarily
135+
infringed by their Contribution(s) alone or by combination of their
136+
Contribution(s) with the Work to which such Contribution(s) was
137+
submitted. If You institute patent litigation against any entity
138+
(including a cross-claim or counterclaim in a lawsuit) alleging that
139+
the Work or a Contribution incorporated within the Work constitutes
140+
direct or contributory patent infringement, then any patent licenses
141+
granted to You under this License for that Work shall terminate
142+
as of the date such litigation is filed.
143+
144+
4. Redistribution.
145+
You may reproduce and distribute copies of the Work or Derivative Works
146+
thereof in any medium, with or without modifications, and in Source or
147+
Object form, provided that You meet the following conditions:
148+
149+
(a) You must give any other recipients of the Work or
150+
Derivative Works a copy of this License; and
151+
152+
(b) You must cause any modified files to carry prominent notices
153+
stating that You changed the files; and
154+
155+
(c) You must retain, in the Source form of any Derivative Works
156+
that You distribute, all copyright, patent, trademark, and
157+
attribution notices from the Source form of the Work,
158+
excluding those notices that do not pertain to any part of
159+
the Derivative Works; and
160+
161+
(d) If the Work includes a "NOTICE" text file as part of its
162+
distribution, then any Derivative Works that You distribute must
163+
include a readable copy of the attribution notices contained
164+
within such NOTICE file, excluding those notices that do not
165+
pertain to any part of the Derivative Works, in at least one
166+
of the following places: within a NOTICE text file distributed
167+
as part of the Derivative Works; within the Source form or
168+
documentation, if provided along with the Derivative Works; or,
169+
within a display generated by the Derivative Works, if and
170+
wherever such third-party notices normally appear. The contents
171+
of the NOTICE file are for informational purposes only and
172+
do not modify the License. You may add Your own attribution
173+
notices within Derivative Works that You distribute, alongside
174+
or as an addendum to the NOTICE text from the Work, provided
175+
that such additional attribution notices cannot be construed
176+
as modifying the License.
177+
178+
You may add Your own copyright statement to Your modifications and
179+
may provide additional or different license terms and conditions
180+
for use, reproduction, or distribution of Your modifications, or
181+
for any such Derivative Works as a whole, provided Your use,
182+
reproduction, and distribution of the Work otherwise complies with
183+
the conditions stated in this License and the Additional Restrictions
184+
above.
185+
186+
5. Submission of Contributions.
187+
Unless You explicitly state otherwise, any Contribution intentionally
188+
submitted for inclusion in the Work by You to the Licensor shall be
189+
under the terms and conditions of this License, without any additional
190+
terms or conditions. Notwithstanding the above, nothing herein shall
191+
supersede or modify the terms of any separate license agreement you may
192+
have executed with Licensor regarding such Contributions.
193+
194+
6. Trademarks.
195+
This License does not grant permission to use the trade names,
196+
trademarks, service marks, or product names of the Licensor,
197+
except as required for reasonable and customary use in describing the
198+
origin of the Work and reproducing the content of the NOTICE file.
199+
200+
7. Disclaimer of Warranty.
201+
Unless required by applicable law or agreed to in writing, Licensor
202+
provides the Work (and each Contributor provides its Contributions) on an
203+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
204+
express or implied, including, without limitation, any warranties or
205+
conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
206+
PARTICULAR PURPOSE. You are solely responsible for determining the
207+
appropriateness of using or redistributing the Work and assume any
208+
risks associated with Your exercise of permissions under this License.
209+
210+
8. Limitation of Liability.
211+
In no event and under no legal theory, whether in tort (including
212+
negligence), contract, or otherwise, unless required by applicable law
213+
(such as deliberate and grossly negligent acts) or agreed to in writing,
214+
shall any Contributor be liable to You for damages, including any direct,
215+
indirect, special, incidental, or consequential damages of any character
216+
arising as a result of this License or out of the use or inability to use
217+
the Work (including but not limited to damages for loss of goodwill,
218+
work stoppage, computer failure or malfunction, or any and all other
219+
commercial damages or losses), even if such Contributor has been advised
220+
of the possibility of such damages.
221+
222+
9. Accepting Warranty or Additional Liability.
223+
While redistributing the Work or Derivative Works thereof, You may choose
224+
to offer, and charge a fee for, acceptance of support, warranty,
225+
indemnity, or other liability obligations and/or rights consistent with
226+
this License. However, in accepting such obligations, You may act only on
227+
Your own behalf and on Your sole responsibility, not on behalf of any
228+
other Contributor, and only if You agree to indemnify, defend, and hold
229+
each Contributor harmless for any liability incurred by, or claims
230+
asserted against, such Contributor by reason of your accepting any such
231+
warranty or additional liability.
232+
233+
END OF TERMS AND CONDITIONS

0 commit comments

Comments
 (0)