greenwood 0.1.0__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.
- greenwood-0.1.0/.claude/skills/release-notes/SKILL.md +205 -0
- greenwood-0.1.0/.github/CODE_OF_CONDUCT.md +83 -0
- greenwood-0.1.0/.github/CONTRIBUTING.md +49 -0
- greenwood-0.1.0/.github/ISSUE_TEMPLATE/bug.md +35 -0
- greenwood-0.1.0/.github/ISSUE_TEMPLATE/feature.md +28 -0
- greenwood-0.1.0/.github/ISSUE_TEMPLATE/question.md +25 -0
- greenwood-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +15 -0
- greenwood-0.1.0/.github/SECURITY.md +31 -0
- greenwood-0.1.0/.github/workflows/ci.yml +90 -0
- greenwood-0.1.0/.github/workflows/docs.yml +61 -0
- greenwood-0.1.0/.gitignore +224 -0
- greenwood-0.1.0/.pre-commit-config.yaml +14 -0
- greenwood-0.1.0/.python-version +1 -0
- greenwood-0.1.0/CITATION.cff +23 -0
- greenwood-0.1.0/LICENSE +21 -0
- greenwood-0.1.0/Makefile +85 -0
- greenwood-0.1.0/PKG-INFO +219 -0
- greenwood-0.1.0/README.md +120 -0
- greenwood-0.1.0/ROADMAP.md +178 -0
- greenwood-0.1.0/assets/logo-dark.png +0 -0
- greenwood-0.1.0/assets/logo-light.png +0 -0
- greenwood-0.1.0/assets/logo.png +0 -0
- greenwood-0.1.0/great-docs.yml +120 -0
- greenwood-0.1.0/greenwood/__init__.py +75 -0
- greenwood-0.1.0/greenwood/_backends.py +91 -0
- greenwood-0.1.0/greenwood/_competing.py +1098 -0
- greenwood-0.1.0/greenwood/_core.py +314 -0
- greenwood-0.1.0/greenwood/_cox.py +1404 -0
- greenwood-0.1.0/greenwood/_flexible.py +518 -0
- greenwood-0.1.0/greenwood/_metrics.py +507 -0
- greenwood-0.1.0/greenwood/_nonparametric.py +1128 -0
- greenwood-0.1.0/greenwood/_parametric.py +550 -0
- greenwood-0.1.0/greenwood/_penalized.py +467 -0
- greenwood-0.1.0/greenwood/_power.py +439 -0
- greenwood-0.1.0/greenwood/_repr.py +76 -0
- greenwood-0.1.0/greenwood/_resample.py +274 -0
- greenwood-0.1.0/greenwood/_surv.py +1149 -0
- greenwood-0.1.0/greenwood/_tests.py +591 -0
- greenwood-0.1.0/greenwood/data/__init__.py +96 -0
- greenwood-0.1.0/greenwood/data/colon.csv.gz +0 -0
- greenwood-0.1.0/greenwood/data/lung.csv.gz +0 -0
- greenwood-0.1.0/greenwood/data/mgus2.csv.gz +0 -0
- greenwood-0.1.0/greenwood/data/ovarian.csv.gz +0 -0
- greenwood-0.1.0/greenwood/data/pbc.csv.gz +0 -0
- greenwood-0.1.0/greenwood/data/veteran.csv.gz +0 -0
- greenwood-0.1.0/greenwood/py.typed +0 -0
- greenwood-0.1.0/greenwood/summaries/__init__.py +25 -0
- greenwood-0.1.0/greenwood/summaries/_registry.py +79 -0
- greenwood-0.1.0/greenwood/viz/__init__.py +28 -0
- greenwood-0.1.0/greenwood/viz/_altair.py +328 -0
- greenwood-0.1.0/greenwood/viz/_curves.py +281 -0
- greenwood-0.1.0/greenwood/viz/_shared.py +91 -0
- greenwood-0.1.0/greenwood.egg-info/PKG-INFO +219 -0
- greenwood-0.1.0/greenwood.egg-info/SOURCES.txt +136 -0
- greenwood-0.1.0/greenwood.egg-info/dependency_links.txt +1 -0
- greenwood-0.1.0/greenwood.egg-info/requires.txt +61 -0
- greenwood-0.1.0/greenwood.egg-info/scm_file_list.json +133 -0
- greenwood-0.1.0/greenwood.egg-info/scm_version.json +8 -0
- greenwood-0.1.0/greenwood.egg-info/top_level.txt +1 -0
- greenwood-0.1.0/index.qmd +53 -0
- greenwood-0.1.0/pyproject.toml +120 -0
- greenwood-0.1.0/scripts/export_datasets.R +41 -0
- greenwood-0.1.0/scripts/regenerate_r_fixtures.R +486 -0
- greenwood-0.1.0/setup.cfg +4 -0
- greenwood-0.1.0/tests/__init__.py +0 -0
- greenwood-0.1.0/tests/_r_parity.py +74 -0
- greenwood-0.1.0/tests/fixtures/r/aft_exponential.json +20 -0
- greenwood-0.1.0/tests/fixtures/r/aft_loglogistic.json +20 -0
- greenwood-0.1.0/tests/fixtures/r/aft_lognormal.json +20 -0
- greenwood-0.1.0/tests/fixtures/r/aft_weibull.json +20 -0
- greenwood-0.1.0/tests/fixtures/r/brier_lung.json +4 -0
- greenwood-0.1.0/tests/fixtures/r/cif_mgus2.json +8 -0
- greenwood-0.1.0/tests/fixtures/r/counting_truncation.json +13 -0
- greenwood-0.1.0/tests/fixtures/r/cox_cluster.json +6 -0
- greenwood-0.1.0/tests/fixtures/r/cox_diag_breslow.json +54 -0
- greenwood-0.1.0/tests/fixtures/r/cox_diag_efron.json +54 -0
- greenwood-0.1.0/tests/fixtures/r/cox_lung_age_sex_breslow.json +29 -0
- greenwood-0.1.0/tests/fixtures/r/cox_lung_age_sex_efron.json +29 -0
- greenwood-0.1.0/tests/fixtures/r/cox_lung_three_efron.json +29 -0
- greenwood-0.1.0/tests/fixtures/r/cox_robust.json +8 -0
- greenwood-0.1.0/tests/fixtures/r/cox_strata.json +12 -0
- greenwood-0.1.0/tests/fixtures/r/cox_survci_breslow.json +21 -0
- greenwood-0.1.0/tests/fixtures/r/cox_timevarying.json +14 -0
- greenwood-0.1.0/tests/fixtures/r/finegray_mgus2_pcm.json +6 -0
- greenwood-0.1.0/tests/fixtures/r/grho_lung_sex_rho1.json +9 -0
- greenwood-0.1.0/tests/fixtures/r/km_lung_by_sex.json +34 -0
- greenwood-0.1.0/tests/fixtures/r/km_lung_overall.json +18 -0
- greenwood-0.1.0/tests/fixtures/r/km_veteran_overall.json +18 -0
- greenwood-0.1.0/tests/fixtures/r/logrank_lung_sex.json +9 -0
- greenwood-0.1.0/tests/fixtures/r/logrank_stratified_lung_sex_ecog.json +5 -0
- greenwood-0.1.0/tests/fixtures/r/logrank_veteran_celltype.json +9 -0
- greenwood-0.1.0/tests/fixtures/r/lung_km_by_sex.json +14 -0
- greenwood-0.1.0/tests/fixtures/r/lung_km_overall.json +8 -0
- greenwood-0.1.0/tests/fixtures/r/multistate_mgus2.json +7 -0
- greenwood-0.1.0/tests/fixtures/r/pairwise_logrank_veteran.json +8 -0
- greenwood-0.1.0/tests/fixtures/r/risk_table_lung_sex.json +7 -0
- greenwood-0.1.0/tests/fixtures/r/rmst.json +12 -0
- greenwood-0.1.0/tests/fixtures/r/rp_weibull_anchor.json +10 -0
- greenwood-0.1.0/tests/fixtures/r/veteran_km_overall.json +8 -0
- greenwood-0.1.0/tests/test_backends.py +81 -0
- greenwood-0.1.0/tests/test_calibration_format.py +130 -0
- greenwood-0.1.0/tests/test_competing.py +168 -0
- greenwood-0.1.0/tests/test_core.py +60 -0
- greenwood-0.1.0/tests/test_coverage_edges.py +328 -0
- greenwood-0.1.0/tests/test_cox.py +425 -0
- greenwood-0.1.0/tests/test_cox_format.py +191 -0
- greenwood-0.1.0/tests/test_cross_validate_formats.py +163 -0
- greenwood-0.1.0/tests/test_data.py +57 -0
- greenwood-0.1.0/tests/test_flexible.py +107 -0
- greenwood-0.1.0/tests/test_logrank.py +92 -0
- greenwood-0.1.0/tests/test_metrics.py +139 -0
- greenwood-0.1.0/tests/test_nonparametric.py +170 -0
- greenwood-0.1.0/tests/test_parametric.py +163 -0
- greenwood-0.1.0/tests/test_penalized.py +106 -0
- greenwood-0.1.0/tests/test_power.py +69 -0
- greenwood-0.1.0/tests/test_r_parity.py +518 -0
- greenwood-0.1.0/tests/test_repr.py +150 -0
- greenwood-0.1.0/tests/test_repr_helpers.py +41 -0
- greenwood-0.1.0/tests/test_resample.py +68 -0
- greenwood-0.1.0/tests/test_surv.py +135 -0
- greenwood-0.1.0/tests/test_surv_edge_cases.py +103 -0
- greenwood-0.1.0/tests/test_tidy_registry.py +47 -0
- greenwood-0.1.0/tests/test_viz.py +80 -0
- greenwood-0.1.0/tests/test_viz_altair.py +116 -0
- greenwood-0.1.0/user_guide/00-get-started.qmd +52 -0
- greenwood-0.1.0/user_guide/01-installation.qmd +41 -0
- greenwood-0.1.0/user_guide/02-quick-start.qmd +105 -0
- greenwood-0.1.0/user_guide/03-survival-data.qmd +290 -0
- greenwood-0.1.0/user_guide/04-data-sources.qmd +189 -0
- greenwood-0.1.0/user_guide/05-kaplan-meier.qmd +320 -0
- greenwood-0.1.0/user_guide/06-comparing-groups.qmd +226 -0
- greenwood-0.1.0/user_guide/07-visualization.qmd +181 -0
- greenwood-0.1.0/user_guide/08-cox-regression.qmd +432 -0
- greenwood-0.1.0/user_guide/09-cox-diagnostics.qmd +239 -0
- greenwood-0.1.0/user_guide/10-parametric-models.qmd +251 -0
- greenwood-0.1.0/user_guide/11-competing-risks.qmd +209 -0
- greenwood-0.1.0/user_guide/12-multi-state.qmd +172 -0
- greenwood-0.1.0/user_guide/13-prediction-performance.qmd +211 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release-notes
|
|
3
|
+
description: Generate polished release notes for Greenwood from GitHub PR/commit data. Creates an opening summary paragraph and well-organized sections for features, enhancements, fixes, and docs.
|
|
4
|
+
argument-hint: "[GitHub release changelog text or PR list]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Greenwood Release Notes Workflow
|
|
8
|
+
|
|
9
|
+
Generate professional release notes from raw GitHub release data. The input is: $ARGUMENTS
|
|
10
|
+
|
|
11
|
+
## Output Format
|
|
12
|
+
|
|
13
|
+
Release notes follow this structure:
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
## v{VERSION}
|
|
17
|
+
|
|
18
|
+
_{DATE}_ · [GitHub](https://github.com/rich-iannone/greenwood/releases/tag/v{VERSION})
|
|
19
|
+
|
|
20
|
+
{SUMMARY_PARAGRAPH}
|
|
21
|
+
|
|
22
|
+
### New Features
|
|
23
|
+
|
|
24
|
+
- **{Feature name}** — {Brief description of what it does}. (#{PR_NUMBER})
|
|
25
|
+
|
|
26
|
+
### Enhancements
|
|
27
|
+
|
|
28
|
+
- {Description of improvement}. (#{PR_NUMBER})
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
- {Description of what was fixed}. (#{PR_NUMBER})
|
|
33
|
+
|
|
34
|
+
### Documentation
|
|
35
|
+
|
|
36
|
+
- {Description of docs change}. (#{PR_NUMBER})
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Presenting the Final Output
|
|
40
|
+
|
|
41
|
+
Always wrap the final release notes in **4 backticks** (not 3) to facilitate easy copy/paste in VS Code:
|
|
42
|
+
|
|
43
|
+
`````markdown
|
|
44
|
+
```
|
|
45
|
+
## v{VERSION}
|
|
46
|
+
|
|
47
|
+
...release notes content...
|
|
48
|
+
```
|
|
49
|
+
`````
|
|
50
|
+
|
|
51
|
+
This prevents issues when the release notes themselves contain triple-backtick code blocks.
|
|
52
|
+
|
|
53
|
+
## Step 1: Categorize the Changes
|
|
54
|
+
|
|
55
|
+
Parse the input and categorize each PR by its prefix:
|
|
56
|
+
|
|
57
|
+
| Prefix | Category | Section |
|
|
58
|
+
| -------- | ----------------------- | -------------------------------- |
|
|
59
|
+
| `feat:` | New functionality | **New Features** |
|
|
60
|
+
| `enh:` | Improvement to existing | **Enhancements** |
|
|
61
|
+
| `fix:` | Bug fix | **Bug Fixes** |
|
|
62
|
+
| `doc:` | Documentation only | **Documentation** |
|
|
63
|
+
| `chore:` | Maintenance/tooling | **Maintenance** (if significant) |
|
|
64
|
+
| `test:` | Test additions | Usually omit unless significant |
|
|
65
|
+
|
|
66
|
+
If no prefix, infer from the PR title keywords:
|
|
67
|
+
|
|
68
|
+
- "add support for", "new", "implement" → New Features
|
|
69
|
+
- "improve", "update", "enhance" → Enhancements
|
|
70
|
+
- "fix", "correct", "resolve" → Bug Fixes
|
|
71
|
+
- "document", "docs", "readme" → Documentation
|
|
72
|
+
|
|
73
|
+
## Step 2: Research Feature Details
|
|
74
|
+
|
|
75
|
+
For each **New Feature**, gather context to write accurate descriptions:
|
|
76
|
+
|
|
77
|
+
1. Search the codebase for the feature implementation
|
|
78
|
+
2. Check for user-facing documentation (in `user_guide/` or `recipes/`)
|
|
79
|
+
3. Look at config options added (in `config.py`)
|
|
80
|
+
4. Identify the main benefit to users
|
|
81
|
+
|
|
82
|
+
Key questions to answer:
|
|
83
|
+
|
|
84
|
+
- What problem does this solve?
|
|
85
|
+
- What's the user-facing command or config option?
|
|
86
|
+
- Does it require configuration or work automatically?
|
|
87
|
+
|
|
88
|
+
## Step 3: Write the Summary Paragraph
|
|
89
|
+
|
|
90
|
+
The opening paragraph should:
|
|
91
|
+
|
|
92
|
+
1. **State the release theme** in broad terms (e.g., "improvements to site presentation and SEO")
|
|
93
|
+
2. **Highlight 3-5 major features** by name
|
|
94
|
+
3. **Mention key user benefits** (e.g., "catch grammar issues locally", "better mobile experience")
|
|
95
|
+
4. Be **2-4 sentences** — concise but informative
|
|
96
|
+
|
|
97
|
+
Example:
|
|
98
|
+
|
|
99
|
+
> Greenwood v0.2 brings significant improvements to site presentation, content quality, and SEO. This release introduces styled tooltips throughout, responsive tables that work on any screen size, Mermaid diagram support with dark mode compatibility, and comprehensive SEO features including automatic sitemap generation. A new `proofread` command powered by Harper helps catch grammar and spelling issues locally. Pages can now display creation/modification metadata, and `ROADMAP.md` files are automatically integrated into your documentation.
|
|
100
|
+
|
|
101
|
+
## Step 4: Format Each Entry
|
|
102
|
+
|
|
103
|
+
### New Features Format
|
|
104
|
+
|
|
105
|
+
Use bold for the feature name, em-dash separator, and end with PR number:
|
|
106
|
+
|
|
107
|
+
```markdown
|
|
108
|
+
- **{Feature name}** — {What it does and why it's useful}. (#{PR})
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Examples:
|
|
112
|
+
|
|
113
|
+
- **ROADMAP.md support** — Project roadmap files are now auto-detected and integrated into the documentation site with proper navigation links. (#42)
|
|
114
|
+
- **Harper proofreading** — New `great-docs proofread` command for local grammar and spelling checks with a built-in technical dictionary and multiple output formats. (#48)
|
|
115
|
+
|
|
116
|
+
### Enhancements Format
|
|
117
|
+
|
|
118
|
+
Simpler format without bold feature name:
|
|
119
|
+
|
|
120
|
+
```markdown
|
|
121
|
+
- {What was improved and how}. (#{PR})
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Example:
|
|
125
|
+
|
|
126
|
+
- Markdown is now supported in announcement banner text, allowing links and formatting. (#35)
|
|
127
|
+
|
|
128
|
+
### Bug Fixes Format
|
|
129
|
+
|
|
130
|
+
Describe what was wrong and that it's now fixed:
|
|
131
|
+
|
|
132
|
+
```markdown
|
|
133
|
+
- {What was broken} was fixed. (#{PR})
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Or describe the improvement made:
|
|
137
|
+
|
|
138
|
+
```markdown
|
|
139
|
+
- {Component} now {correct behavior}. (#{PR})
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Examples:
|
|
143
|
+
|
|
144
|
+
- Python version is now auto-detected for GitHub deployment workflows. (#40)
|
|
145
|
+
- Images in README.md files are now properly copied to the output directory. (#57)
|
|
146
|
+
|
|
147
|
+
### Documentation Format
|
|
148
|
+
|
|
149
|
+
Brief description of what was documented:
|
|
150
|
+
|
|
151
|
+
```markdown
|
|
152
|
+
- Added documentation on {topic}. (#{PR})
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Step 5: Order and Polish
|
|
156
|
+
|
|
157
|
+
### Section Order
|
|
158
|
+
|
|
159
|
+
1. New Features (most important)
|
|
160
|
+
2. Enhancements
|
|
161
|
+
3. Bug Fixes
|
|
162
|
+
4. Documentation
|
|
163
|
+
5. Maintenance (only if significant)
|
|
164
|
+
|
|
165
|
+
### Within Each Section
|
|
166
|
+
|
|
167
|
+
Order entries by:
|
|
168
|
+
|
|
169
|
+
1. **User impact** — Most impactful first
|
|
170
|
+
2. **Related features** — Group related items together
|
|
171
|
+
|
|
172
|
+
### Final Checklist
|
|
173
|
+
|
|
174
|
+
- [ ] Summary paragraph captures the release theme
|
|
175
|
+
- [ ] All PRs are categorized
|
|
176
|
+
- [ ] Feature descriptions explain user benefit
|
|
177
|
+
- [ ] Consistent formatting (bold, em-dash, periods, PR numbers)
|
|
178
|
+
- [ ] No duplicate information between summary and entries
|
|
179
|
+
- [ ] Date is correct (use current date if releasing today)
|
|
180
|
+
|
|
181
|
+
## Section Templates by Release Type
|
|
182
|
+
|
|
183
|
+
### Major Release (new capabilities)
|
|
184
|
+
|
|
185
|
+
Focus on New Features section. Summary emphasizes what users can now do.
|
|
186
|
+
|
|
187
|
+
### Minor Release (improvements)
|
|
188
|
+
|
|
189
|
+
Balance New Features and Enhancements. Summary emphasizes improved experience.
|
|
190
|
+
|
|
191
|
+
### Patch Release (fixes only)
|
|
192
|
+
|
|
193
|
+
May omit New Features section entirely. Brief summary:
|
|
194
|
+
|
|
195
|
+
> Greenwood v{X.Y.Z} is a maintenance release with bug fixes and stability improvements.
|
|
196
|
+
|
|
197
|
+
### Packaging-Only Release
|
|
198
|
+
|
|
199
|
+
> Packaging fix release — no functional changes from v{PREVIOUS}.
|
|
200
|
+
>
|
|
201
|
+
> ### Changes
|
|
202
|
+
>
|
|
203
|
+
> - {What changed in packaging}. (#{PR})
|
|
204
|
+
>
|
|
205
|
+
> See [v{PREVIOUS} release notes](...) for all features and fixes in this release.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Contributor Covenant 3.0 Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We pledge to make our community welcoming, safe, and equitable for all.
|
|
6
|
+
|
|
7
|
+
We are committed to fostering an environment that respects and promotes the dignity, rights, and contributions of all individuals, regardless of characteristics including race, ethnicity, caste, color, age, physical characteristics, neurodiversity, disability, sex or gender, gender identity or expression, sexual orientation, language, philosophy or religion, national or social origin, socio-economic position, level of education, or other status. The same privileges of participation are extended to everyone who participates in good faith and in accordance with this Covenant.
|
|
8
|
+
|
|
9
|
+
## Encouraged Behaviors
|
|
10
|
+
|
|
11
|
+
While acknowledging differences in social norms, we all strive to meet our community's expectations for positive behavior. We also understand that our words and actions may be interpreted differently than we intend based on culture, background, or native language.
|
|
12
|
+
|
|
13
|
+
With these considerations in mind, we agree to behave mindfully toward each other and act in ways that center our shared values, including:
|
|
14
|
+
|
|
15
|
+
1. Respecting the **purpose of our community**, our activities, and our ways of gathering.
|
|
16
|
+
2. Engaging **kindly and honestly** with others.
|
|
17
|
+
3. Respecting **different viewpoints** and experiences.
|
|
18
|
+
4. **Taking responsibility** for our actions and contributions.
|
|
19
|
+
5. Gracefully giving and accepting **constructive feedback**.
|
|
20
|
+
6. Committing to **repairing harm** when it occurs.
|
|
21
|
+
7. Behaving in other ways that promote and sustain the **well-being of our community**.
|
|
22
|
+
|
|
23
|
+
## Restricted Behaviors
|
|
24
|
+
|
|
25
|
+
We agree to restrict the following behaviors in our community. Instances, threats, and promotion of these behaviors are violations of this Code of Conduct.
|
|
26
|
+
|
|
27
|
+
1. **Harassment.** Violating explicitly expressed boundaries or engaging in unnecessary personal attention after any clear request to stop.
|
|
28
|
+
2. **Character attacks.** Making insulting, demeaning, or pejorative comments directed at a community member or group of people.
|
|
29
|
+
3. **Stereotyping or discrimination.** Characterizing anyone's personality or behavior on the basis of immutable identities or traits.
|
|
30
|
+
4. **Sexualization.** Behaving in a way that would generally be considered inappropriately intimate in the context or purpose of the community.
|
|
31
|
+
5. **Violating confidentiality**. Sharing or acting on someone's personal or private information without their permission.
|
|
32
|
+
6. **Endangerment.** Causing, encouraging, or threatening violence or other harm toward any person or group.
|
|
33
|
+
7. Behaving in other ways that **threaten the well-being** of our community.
|
|
34
|
+
|
|
35
|
+
### Other Restrictions
|
|
36
|
+
|
|
37
|
+
1. **Misleading identity.** Impersonating someone else for any reason, or pretending to be someone else to evade enforcement actions.
|
|
38
|
+
2. **Failing to credit sources.** Not properly crediting the sources of content you contribute.
|
|
39
|
+
3. **Promotional materials**. Sharing marketing or other commercial content in a way that is outside the norms of the community.
|
|
40
|
+
4. **Irresponsible communication.** Failing to responsibly present content which includes, links or describes any other restricted behaviors.
|
|
41
|
+
|
|
42
|
+
## Reporting an Issue
|
|
43
|
+
|
|
44
|
+
Tensions can occur between community members even when they are trying their best to collaborate. Not every conflict represents a code of conduct violation, and this Code of Conduct reinforces encouraged behaviors and norms that can help avoid conflicts and minimize harm.
|
|
45
|
+
|
|
46
|
+
When an incident does occur, it is important to report it promptly. To report a possible violation, please contact the project maintainers at riannone@me.com.
|
|
47
|
+
|
|
48
|
+
Community Moderators take reports of violations seriously and will make every effort to respond in a timely manner. They will investigate all reports of code of conduct violations, reviewing messages, logs, and recordings, or interviewing witnesses and other participants. Community Moderators will keep investigation and enforcement actions as transparent as possible while prioritizing safety and confidentiality. In order to honor these values, enforcement actions are carried out in private with the involved parties, but communicating to the whole community may be part of a mutually agreed upon resolution.
|
|
49
|
+
|
|
50
|
+
## Addressing and Repairing Harm
|
|
51
|
+
|
|
52
|
+
If an investigation by the Community Moderators finds that this Code of Conduct has been violated, the following enforcement ladder may be used to determine how best to repair harm, based on the incident's impact on the individuals involved and the community as a whole. Depending on the severity of a violation, lower rungs on the ladder may be skipped.
|
|
53
|
+
|
|
54
|
+
1. Warning
|
|
55
|
+
1. Event: A violation involving a single incident or series of incidents.
|
|
56
|
+
2. Consequence: A private, written warning from the Community Moderators.
|
|
57
|
+
3. Repair: Examples of repair include a private written apology, acknowledgement of responsibility, and seeking clarification on expectations.
|
|
58
|
+
2. Temporarily Limited Activities
|
|
59
|
+
1. Event: A repeated incidence of a violation that previously resulted in a warning, or the first incidence of a more serious violation.
|
|
60
|
+
2. Consequence: A private, written warning with a time-limited cooldown period designed to underscore the seriousness of the situation and give the community members involved time to process the incident. The cooldown period may be limited to particular communication channels or interactions with particular community members.
|
|
61
|
+
3. Repair: Examples of repair may include making an apology, using the cooldown period to reflect on actions and impact, and being thoughtful about re-entering community spaces after the period is over.
|
|
62
|
+
3. Temporary Suspension
|
|
63
|
+
1. Event: A pattern of repeated violation which the Community Moderators have tried to address with warnings, or a single serious violation.
|
|
64
|
+
2. Consequence: A private written warning with conditions for return from suspension. In general, temporary suspensions give the person being suspended time to reflect upon their behavior and possible corrective actions.
|
|
65
|
+
3. Repair: Examples of repair include respecting the spirit of the suspension, meeting the specified conditions for return, and being thoughtful about how to reintegrate with the community when the suspension is lifted.
|
|
66
|
+
4. Permanent Ban
|
|
67
|
+
1. Event: A pattern of repeated code of conduct violations that other steps on the ladder have failed to resolve, or a violation so serious that the Community Moderators determine there is no way to keep the community safe with this person as a member.
|
|
68
|
+
2. Consequence: Access to all community spaces, tools, and communication channels is removed. In general, permanent bans should be rarely used, should have strong reasoning behind them, and should only be resorted to if working through other remedies has failed to change the behavior.
|
|
69
|
+
3. Repair: There is no possible repair in cases of this severity.
|
|
70
|
+
|
|
71
|
+
This enforcement ladder is intended as a guideline. It does not limit the ability of Community Managers to use their discretion and judgment, in keeping with the best interests of our community.
|
|
72
|
+
|
|
73
|
+
## Scope
|
|
74
|
+
|
|
75
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public or other spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
76
|
+
|
|
77
|
+
## Attribution
|
|
78
|
+
|
|
79
|
+
This Code of Conduct is adapted from the Contributor Covenant, version 3.0, permanently available at [https://www.contributor-covenant.org/version/3/0/](https://www.contributor-covenant.org/version/3/0/).
|
|
80
|
+
|
|
81
|
+
Contributor Covenant is stewarded by the Organization for Ethical Source and licensed under CC BY-SA 4.0. To view a copy of this license, visit [https://creativecommons.org/licenses/by-sa/4.0/](https://creativecommons.org/licenses/by-sa/4.0/)
|
|
82
|
+
|
|
83
|
+
For answers to common questions about Contributor Covenant, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are provided at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). Additional enforcement and community guideline resources can be found at [https://www.contributor-covenant.org/resources](https://www.contributor-covenant.org/resources). The enforcement ladder was inspired by the work of [Mozilla's code of conduct team](https://github.com/mozilla/inclusion).
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Contributing to Greenwood
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in improving Greenwood! This project is in active early
|
|
4
|
+
development (see [`ROADMAP.md`](../ROADMAP.md)). Contributions of code, tests, docs, and
|
|
5
|
+
R-parity fixtures are all welcome.
|
|
6
|
+
|
|
7
|
+
## Development setup
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
git clone https://github.com/rich-iannone/greenwood.git
|
|
11
|
+
cd greenwood
|
|
12
|
+
python -m venv .venv && source .venv/bin/activate
|
|
13
|
+
make install # pip install -e ".[dev]"
|
|
14
|
+
pre-commit install # optional but recommended
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## The check gate
|
|
18
|
+
|
|
19
|
+
Before opening a pull request, make sure the full gate is green:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
make check # ruff format + ruff check + pyright + pytest
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Individual targets: `make lint`, `make type-check`, `make test`, `make test-rparity`.
|
|
26
|
+
Run `make help` for the full list.
|
|
27
|
+
|
|
28
|
+
## House conventions
|
|
29
|
+
|
|
30
|
+
- **R-validated numerics.** Correctness to tolerance against R's `survival` (and
|
|
31
|
+
`cmprsk`/`flexsurv`/`riskRegression`/`mstate` for specialized estimators) is the brand.
|
|
32
|
+
Regenerate fixtures with `Rscript scripts/regenerate_r_fixtures.R` and validate with
|
|
33
|
+
`make test-rparity`.
|
|
34
|
+
- **Narwhals-native.** Never assume pandas; write data handling against Narwhals and drop
|
|
35
|
+
to NumPy only inside numeric kernels.
|
|
36
|
+
- **Typed & deterministic.** Full type hints (`py.typed`), `pyright` clean, byte-identical
|
|
37
|
+
output for identical inputs.
|
|
38
|
+
- **Prose style.** Docstrings use Quarto/Markdown, not RST: single backticks for inline
|
|
39
|
+
code, numpydoc section headers (`Parameters`, `Returns`).
|
|
40
|
+
- Implementation lives in underscore-prefixed private modules; the public surface is
|
|
41
|
+
curated explicitly in `__init__.py`.
|
|
42
|
+
|
|
43
|
+
## Pull requests
|
|
44
|
+
|
|
45
|
+
- Keep PRs focused and add tests for new behavior (target >=90% coverage).
|
|
46
|
+
- For new/changed statistics, add or update R-parity fixtures.
|
|
47
|
+
- Update docs (docstrings, `user_guide/`) alongside code.
|
|
48
|
+
|
|
49
|
+
By contributing you agree that your contributions are licensed under the MIT License.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Report incorrect behavior or a crash
|
|
4
|
+
title: "[bug] "
|
|
5
|
+
labels: bug
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Describe the bug
|
|
9
|
+
|
|
10
|
+
A clear and concise description of what went wrong.
|
|
11
|
+
|
|
12
|
+
## Reproducible example
|
|
13
|
+
|
|
14
|
+
A minimal, self-contained snippet that triggers the problem:
|
|
15
|
+
|
|
16
|
+
```python
|
|
17
|
+
import greenwood as gw
|
|
18
|
+
# ...
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Expected behavior
|
|
22
|
+
|
|
23
|
+
What you expected to happen. If this is a numeric-correctness issue, include the reference
|
|
24
|
+
value (e.g. from R `survival`) you expected.
|
|
25
|
+
|
|
26
|
+
## Environment
|
|
27
|
+
|
|
28
|
+
- Greenwood version:
|
|
29
|
+
- Python version:
|
|
30
|
+
- Dataframe backend + version (pandas / Polars / ...):
|
|
31
|
+
- OS:
|
|
32
|
+
|
|
33
|
+
## Additional context
|
|
34
|
+
|
|
35
|
+
Anything else that helps, such as a full traceback or a plot.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest a new capability or improvement
|
|
4
|
+
title: "[feature] "
|
|
5
|
+
labels: enhancement
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## What problem would this solve?
|
|
9
|
+
|
|
10
|
+
Describe the use case or gap. If there is prior art (R `survival`, lifelines,
|
|
11
|
+
scikit-survival, flexsurv, ...), link or name it.
|
|
12
|
+
|
|
13
|
+
## Proposed API / behavior
|
|
14
|
+
|
|
15
|
+
Sketch how it might look:
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
import greenwood as gw
|
|
19
|
+
# ...
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Roadmap fit
|
|
23
|
+
|
|
24
|
+
Is this related to an existing phase in [`ROADMAP.md`](../../ROADMAP.md)?
|
|
25
|
+
|
|
26
|
+
## Alternatives considered
|
|
27
|
+
|
|
28
|
+
Other approaches you thought about, and why this one.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Question
|
|
3
|
+
about: Ask how to do something with Greenwood
|
|
4
|
+
title: "[question] "
|
|
5
|
+
labels: question
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Your question
|
|
9
|
+
|
|
10
|
+
What are you trying to accomplish?
|
|
11
|
+
|
|
12
|
+
## What you've tried
|
|
13
|
+
|
|
14
|
+
Any code, docs, or search you have already looked at:
|
|
15
|
+
|
|
16
|
+
```python
|
|
17
|
+
import greenwood as gw
|
|
18
|
+
# ...
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Environment (if relevant)
|
|
22
|
+
|
|
23
|
+
- greenwood version:
|
|
24
|
+
- Python version:
|
|
25
|
+
- Dataframe backend:
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Summary
|
|
2
|
+
|
|
3
|
+
Thank you for contributing to Greenwood! Please explain the context and purpose of your
|
|
4
|
+
contribution, and list the changes made to the code or docs.
|
|
5
|
+
|
|
6
|
+
# Related GitHub Issues and PRs
|
|
7
|
+
|
|
8
|
+
- Ref: #
|
|
9
|
+
|
|
10
|
+
# Checklist
|
|
11
|
+
|
|
12
|
+
- [ ] `make check` passes (ruff, pyright, pytest).
|
|
13
|
+
- [ ] I have added tests for any new functionality.
|
|
14
|
+
- [ ] For new/changed statistics, I have added or updated R-parity fixtures.
|
|
15
|
+
- [ ] I have updated docs (docstrings and/or `user_guide/`) as needed.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Reporting a Vulnerability
|
|
4
|
+
|
|
5
|
+
If you believe you have found a security vulnerability in this project, we encourage you to report it responsibly. Please do not open a public issue. Instead, please use the Report a vulnerability function available via the security tab.
|
|
6
|
+
|
|
7
|
+
Your report should include (if possible):
|
|
8
|
+
|
|
9
|
+
- a clear description of the vulnerability, including impact and affected versions
|
|
10
|
+
- steps to reproduce the issue
|
|
11
|
+
- any relevant code snippets, logs, or proof-of-concept exploit
|
|
12
|
+
- suggested remediation or mitigation, if known
|
|
13
|
+
|
|
14
|
+
We aim to acknowledge receipt of your report within 7 business days and provide an update on remediation progress within 14 business days.
|
|
15
|
+
|
|
16
|
+
## Coordinated Disclosure
|
|
17
|
+
|
|
18
|
+
We follow a coordinated disclosure approach. Once the issue is confirmed and a fix is ready, we will:
|
|
19
|
+
|
|
20
|
+
- notify you prior to public disclosure
|
|
21
|
+
- credit you in the release notes (unless you prefer to remain anonymous)
|
|
22
|
+
- publish a security advisory and update affected versions
|
|
23
|
+
- if severe enough, assist with publishing a CVE
|
|
24
|
+
|
|
25
|
+
## Security Best Practices
|
|
26
|
+
|
|
27
|
+
To minimize your exposure:
|
|
28
|
+
|
|
29
|
+
- always use the latest stable release
|
|
30
|
+
- avoid running our tools with unnecessary privileges
|
|
31
|
+
- review and validate third-party extensions or plugins before use
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
release:
|
|
11
|
+
types: [published]
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
lint:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0 # setuptools_scm needs full history/tags
|
|
20
|
+
- uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.12"
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: pip install -e ".[dev]"
|
|
25
|
+
- name: Ruff check
|
|
26
|
+
run: ruff check greenwood tests
|
|
27
|
+
- name: Ruff format check
|
|
28
|
+
run: ruff format --check greenwood tests
|
|
29
|
+
- name: Pyright
|
|
30
|
+
run: pyright greenwood
|
|
31
|
+
|
|
32
|
+
test:
|
|
33
|
+
runs-on: ${{ matrix.os }}
|
|
34
|
+
strategy:
|
|
35
|
+
fail-fast: false
|
|
36
|
+
matrix:
|
|
37
|
+
os: [ubuntu-latest, windows-latest]
|
|
38
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v4
|
|
41
|
+
with:
|
|
42
|
+
fetch-depth: 0
|
|
43
|
+
- uses: actions/setup-python@v5
|
|
44
|
+
with:
|
|
45
|
+
python-version: ${{ matrix.python-version }}
|
|
46
|
+
- name: Install dependencies
|
|
47
|
+
run: pip install -e ".[dev]"
|
|
48
|
+
- name: Run tests
|
|
49
|
+
# The R-parity suite compares against checked-in fixtures, so it needs no
|
|
50
|
+
# R toolchain here; R is only used offline to regenerate those fixtures.
|
|
51
|
+
run: pytest tests
|
|
52
|
+
|
|
53
|
+
build:
|
|
54
|
+
name: Build distribution
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
needs: [lint, test]
|
|
57
|
+
if: github.event_name == 'release'
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/checkout@v4
|
|
60
|
+
with:
|
|
61
|
+
fetch-depth: 0
|
|
62
|
+
- uses: actions/setup-python@v5
|
|
63
|
+
with:
|
|
64
|
+
python-version: "3.12"
|
|
65
|
+
- name: Build sdist and wheel
|
|
66
|
+
run: |
|
|
67
|
+
pip install build
|
|
68
|
+
python -m build --sdist --wheel
|
|
69
|
+
- uses: actions/upload-artifact@v4
|
|
70
|
+
with:
|
|
71
|
+
name: dist
|
|
72
|
+
path: dist/
|
|
73
|
+
|
|
74
|
+
publish:
|
|
75
|
+
name: Publish to PyPI
|
|
76
|
+
needs: build
|
|
77
|
+
runs-on: ubuntu-latest
|
|
78
|
+
if: github.event_name == 'release'
|
|
79
|
+
environment:
|
|
80
|
+
name: pypi
|
|
81
|
+
url: https://pypi.org/project/greenwood/
|
|
82
|
+
steps:
|
|
83
|
+
- uses: actions/download-artifact@v4
|
|
84
|
+
with:
|
|
85
|
+
name: dist
|
|
86
|
+
path: dist
|
|
87
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
88
|
+
with:
|
|
89
|
+
user: __token__
|
|
90
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: CI Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build-docs:
|
|
11
|
+
name: "Build Docs"
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
with:
|
|
16
|
+
fetch-depth: 0 # full history for accurate page timestamps
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
- name: Install package and docs dependencies
|
|
21
|
+
run: |
|
|
22
|
+
python -m pip install --upgrade pip
|
|
23
|
+
python -m pip install -e ".[docs]"
|
|
24
|
+
python -m pip install git+https://github.com/posit-dev/great-docs.git@main
|
|
25
|
+
- name: Set up Quarto
|
|
26
|
+
uses: quarto-dev/quarto-actions/setup@v2
|
|
27
|
+
- name: Build docs
|
|
28
|
+
run: great-docs build
|
|
29
|
+
- name: Save docs artifact
|
|
30
|
+
uses: actions/upload-artifact@v4
|
|
31
|
+
with:
|
|
32
|
+
name: docs-html
|
|
33
|
+
path: great-docs/_site
|
|
34
|
+
include-hidden-files: true
|
|
35
|
+
|
|
36
|
+
publish-docs:
|
|
37
|
+
name: "Publish Docs"
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
needs: "build-docs"
|
|
40
|
+
if: github.ref == 'refs/heads/main'
|
|
41
|
+
permissions:
|
|
42
|
+
pages: write
|
|
43
|
+
id-token: write
|
|
44
|
+
environment:
|
|
45
|
+
name: github-pages
|
|
46
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/download-artifact@v7
|
|
49
|
+
with:
|
|
50
|
+
name: docs-html
|
|
51
|
+
path: great-docs/_site
|
|
52
|
+
|
|
53
|
+
- name: Upload Pages artifact
|
|
54
|
+
uses: actions/upload-pages-artifact@v5
|
|
55
|
+
with:
|
|
56
|
+
path: great-docs/_site
|
|
57
|
+
include-hidden-files: true
|
|
58
|
+
|
|
59
|
+
- name: Deploy to GitHub Pages
|
|
60
|
+
id: deployment
|
|
61
|
+
uses: actions/deploy-pages@v5
|