-
Notifications
You must be signed in to change notification settings - Fork 0
chore: code coverage #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
56a3453
chore: code coverage
DiogoRibeiro7 75d4653
docs: add Sphinx configuration with Markdown support and index.md setup
DiogoRibeiro7 43f9d93
fix: github address
DiogoRibeiro7 f58feea
docs: add Sphinx documentation with MyST and autodoc integration
DiogoRibeiro7 8537f63
fix: fix pyproject toml
DiogoRibeiro7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Minimal makefile for Sphinx documentation | ||
| # | ||
|
|
||
| # You can set these variables from the command line, and also | ||
| # from the environment for the first two. | ||
| SPHINXOPTS ?= | ||
| SPHINXBUILD ?= sphinx-build | ||
| SOURCEDIR = source | ||
| BUILDDIR = build | ||
|
|
||
| # Put it first so that "make" without argument is like "make help". | ||
| help: | ||
| @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
|
||
| .PHONY: help Makefile | ||
|
|
||
| # Catch-all target: route all unknown targets to Sphinx using the new | ||
| # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
| %: Makefile | ||
| @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| @ECHO OFF | ||
|
|
||
| pushd %~dp0 | ||
|
|
||
| REM Command file for Sphinx documentation | ||
|
|
||
| if "%SPHINXBUILD%" == "" ( | ||
| set SPHINXBUILD=sphinx-build | ||
| ) | ||
| set SOURCEDIR=source | ||
| set BUILDDIR=build | ||
|
|
||
| %SPHINXBUILD% >NUL 2>NUL | ||
| if errorlevel 9009 ( | ||
| echo. | ||
| echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
| echo.installed, then set the SPHINXBUILD environment variable to point | ||
| echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
| echo.may add the Sphinx directory to PATH. | ||
| echo. | ||
| echo.If you don't have Sphinx installed, grab it from | ||
| echo.https://www.sphinx-doc.org/ | ||
| exit /b 1 | ||
| ) | ||
|
|
||
| if "%1" == "" goto help | ||
|
|
||
| %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
| goto end | ||
|
|
||
| :help | ||
| %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
|
||
| :end | ||
| popd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # Configuration file for the Sphinx documentation builder. | ||
| # | ||
| # For the full list of built-in configuration values, see the documentation: | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
|
||
| # -- Project information ----------------------------------------------------- | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
| import os | ||
| import sys | ||
| sys.path.insert(0, os.path.abspath('../../gen_surv')) | ||
|
|
||
| project = 'gen_suvr' | ||
| copyright = '2025, Diogo Ribeiro' | ||
| author = 'Diogo Ribeiro' | ||
| release = '0.2.0' | ||
|
|
||
| # -- General configuration --------------------------------------------------- | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
|
||
| extensions = [ | ||
| "sphinx.ext.autodoc", | ||
| "sphinx.ext.napoleon", | ||
| "myst_parser", | ||
| ] | ||
|
|
||
| # Point to index.md or index.rst as the root document | ||
| master_doc = "index" | ||
|
|
||
| templates_path = ['_templates'] | ||
| exclude_patterns = [] | ||
|
|
||
| # -- Options for HTML output ------------------------------------------------- | ||
| # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
|
||
| html_theme = 'alabaster' | ||
| html_static_path = ['_static'] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| gen\_surv package | ||
| ================= | ||
|
|
||
| Submodules | ||
| ---------- | ||
|
|
||
| gen\_surv.bivariate module | ||
| -------------------------- | ||
|
|
||
| .. automodule:: gen_surv.bivariate | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| gen\_surv.censoring module | ||
| -------------------------- | ||
|
|
||
| .. automodule:: gen_surv.censoring | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| gen\_surv.cmm module | ||
| -------------------- | ||
|
|
||
| .. automodule:: gen_surv.cmm | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| gen\_surv.cphm module | ||
| --------------------- | ||
|
|
||
| .. automodule:: gen_surv.cphm | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| gen\_surv.tdcm module | ||
| --------------------- | ||
|
|
||
| .. automodule:: gen_surv.tdcm | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| gen\_surv.thmm module | ||
| --------------------- | ||
|
|
||
| .. automodule:: gen_surv.thmm | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| gen\_surv.validate module | ||
| ------------------------- | ||
|
|
||
| .. automodule:: gen_surv.validate | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: | ||
|
|
||
| Module contents | ||
| --------------- | ||
|
|
||
| .. automodule:: gen_surv | ||
| :members: | ||
| :undoc-members: | ||
| :show-inheritance: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # gen_surv | ||
|
|
||
| **gen_surv** is a Python package for simulating survival data under various models, inspired by the R package `genSurv`. | ||
|
|
||
| It includes generators for: | ||
|
|
||
| - **Cox Proportional Hazards Models (CPHM)** | ||
| - **Continuous-Time Markov Models (CMM)** | ||
| - **Time-Dependent Covariate Models (TDCM)** | ||
| - **Time-Homogeneous Hidden Markov Models (THMM)** | ||
|
|
||
| --- | ||
|
|
||
| ## 📚 Modules | ||
|
|
||
| ```{toctree} | ||
| :maxdepth: 2 | ||
| :caption: Contents | ||
|
|
||
| modules | ||
| ``` | ||
|
|
||
|
|
||
| # 🚀 Usage Example | ||
|
|
||
| ```python | ||
| from gen_surv.cphm import gen_cphm | ||
|
|
||
| df = gen_cphm(n=100, model_cens="uniform", cens_par=1.0, beta=0.5, covar=2.0) | ||
| print(df.head()) | ||
| ``` | ||
|
|
||
| ## 🔗 Project Links | ||
|
|
||
| - [Source Code](https://github.com/DiogoRibeiro7/genSurvPy) | ||
| - [License](https://github.com/DiogoRibeiro7/genSurvPy/blob/main/LICENSE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # API Reference | ||
|
|
||
| ::: gen_surv.cphm | ||
| options: | ||
| members: true | ||
| undoc-members: true | ||
|
|
||
| ::: gen_surv.cmm | ||
| options: | ||
| members: true | ||
| undoc-members: true | ||
|
|
||
| ::: gen_surv.tdcm | ||
| options: | ||
| members: true | ||
| undoc-members: true | ||
|
|
||
| ::: gen_surv.thmm | ||
| options: | ||
| members: true | ||
| undoc-members: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.