-
Notifications
You must be signed in to change notification settings - Fork 2
docs: add documentation #30
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
Changes from 64 commits
550e684
4edb58a
b0625a6
49e520a
eac3dd3
a04eb1f
819001f
07296a3
c68b52f
891c44a
ff135eb
96afd0d
12fc94c
065c287
aa88e54
4347add
0c923fe
e0b5e5c
41cc0d6
99fed1f
2c779dc
8d33617
ebcd747
739bd21
e2def9c
f9ce72a
4804ef7
05cf208
69e2bb7
3347588
aed2993
5b8938a
355793c
d11dd3c
ea851f8
2fdf7bd
b34f2ee
651b7fe
0d8ddcb
998b7a6
0a895bb
6b2197d
98a479f
5239c5f
8ff9a92
f816ed7
665d492
e6b1256
3d4a236
2bf66b0
a2d0599
6d5f04f
aea2bd3
4405b92
4dda03a
a3b5843
a7391fc
437d224
8e1b6d2
64a52f0
2314796
7d77251
cd934da
5a0b421
ac5b9bf
34e7a0a
e67f891
1ae1d12
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,65 +1,49 @@ | ||
| # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | ||
| # Need help debugging build failures? | ||
| # Start at https://github.com/r-lib/actions#where-to-find-help | ||
| on: | ||
| push: | ||
| branches: [main, master] | ||
| pull_request: | ||
| branches: [main, master] | ||
|
|
||
| name: R-CMD-check | ||
|
|
||
| jobs: | ||
| R-CMD-check: | ||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| name: ${{ matrix.os }} (${{ matrix.r }}) | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
|
|
||
| # default everything | ||
| - {os: 'ubuntu-latest', python: '3.13', r: 'release'} | ||
| - {os: 'windows-latest', python: '3.13', r: 'release'} | ||
| - {os: 'macOS-latest', python: '3.13', r: 'release'} | ||
|
|
||
| # older R versions | ||
| - {os: 'ubuntu-latest', python: '3.9', r: 'oldrel-1'} | ||
| - {os: 'ubuntu-latest', python: '3.9', r: 'oldrel-2'} | ||
| - {os: 'ubuntu-latest', python: '3.9', r: 'oldrel-3'} | ||
|
|
||
| - { os: "ubuntu-latest", python: "3.13", r: "release" } | ||
| - { os: "windows-latest", python: "3.13", r: "release" } | ||
| - { os: "macOS-latest", python: "3.13", r: "release" } | ||
| - { os: "ubuntu-latest", python: "3.10", r: "oldrel-1" } | ||
| - { os: "ubuntu-latest", python: "3.10", r: "oldrel-2" } | ||
| - { os: "ubuntu-latest", python: "3.10", r: "oldrel-3" } | ||
| env: | ||
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
| R_KEEP_PKG_SOURCE: yes | ||
| # set matplotlib backend because Windows CI errors with: | ||
| # "This probably means that Tcl wasn't installed properly." | ||
| MPLBACKEND: Agg # https://github.com/orgs/community/discussions/26434 | ||
|
|
||
| MPLBACKEND: Agg | ||
| steps: | ||
| - name: Checkout ACRO | ||
| uses: actions/checkout@v5 | ||
|
|
||
| uses: actions/checkout@v4 | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v6 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python }} | ||
|
|
||
| - name: Setup pandoc | ||
| uses: r-lib/actions/setup-pandoc@v2 | ||
|
|
||
| - name: Setup R | ||
| uses: r-lib/actions/setup-r@v2 | ||
| with: | ||
| r-version: ${{ matrix.r }} | ||
|
|
||
| - name: Install Python ACRO | ||
| run: python -m pip install acro | ||
|
||
|
|
||
| - name: Install R dependencies | ||
| uses: r-lib/actions/setup-r-dependencies@v2 | ||
| with: | ||
| extra-packages: any::rcmdcheck | ||
| needs: check | ||
|
|
||
| - name: Check R Package | ||
| uses: r-lib/actions/check-r-package@v2 | ||
| with: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -148,3 +148,6 @@ stata/various_stata_development__files | |
| # test output | ||
| /outputs/ | ||
| /test.xlsx | ||
| inst/doc | ||
| /doc/ | ||
| /Meta/ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,8 @@ repos: | |
| (?x)^( | ||
| .*\.txt| | ||
| .*\.ipynb| | ||
| .*\.html | ||
| .*\.html| | ||
| docs/deps/.* | ||
| )$ | ||
|
|
||
| # Format R files | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,27 @@ | ||
| --- | ||
| url: https://AI-SDC.github.io/ACRO-R/ | ||
| template: | ||
| light-switch: true | ||
| bootstrap: 5 | ||
| ... | ||
| bslib: | ||
| primary: "#0051a5" | ||
|
|
||
| navbar: | ||
| structure: | ||
| left: [home, reference, welcome, supports, installation, examples] | ||
| right: [search, github, lightswitch] | ||
| left: | ||
| - text: "Home" | ||
| href: index.html | ||
| - text: "Reference" | ||
| href: reference/index.html | ||
| - text: "Welcome to ACRO-R" | ||
| href: welcome.html | ||
| - text: "What ACRO-R Supports" | ||
| href: supports.html | ||
| - text: "Installation" | ||
| href: installation.html | ||
| - text: "Examples" | ||
| href: examples.html | ||
| right: | ||
| - icon: fab-github | ||
| href: https://github.com/AI-SDC/ACRO-R | ||
| aria-label: GitHub |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Examples | ||
|
|
||
| ## Interactive Notebook | ||
|
|
||
| For comprehensive examples and tutorials, see our interactive R notebook: | ||
|
|
||
| [Example Notebook](articles/example-notebook.html) | ||
|
|
||
| ## Quick Start Examples | ||
|
|
||
| ### Basic Usage | ||
|
|
||
| ```r | ||
| library("acro") | ||
|
|
||
| # Initialize ACRO | ||
| acro_init(suppress = TRUE) | ||
|
|
||
| # Your analysis code here | ||
| # ACRO will automatically check outputs for disclosure risks | ||
| ``` | ||
|
|
||
| ### Creating Safe Tables | ||
|
|
||
| ```r | ||
| # Example of creating a cross-tabulation with ACRO | ||
| result <- acro_crosstab(data$variable1, data$variable2) | ||
|
|
||
| # ACRO automatically applies disclosure control | ||
| print(result) | ||
| ``` | ||
|
|
||
| ### Finalizing Your Session | ||
|
|
||
| ```r | ||
| # When you're done with your analysis | ||
| acro_finalise() | ||
| ``` | ||
|
|
||
| For more detailed examples and use cases, please refer to the [Example Notebook](articles/example-notebook.html). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| <img src="man/figures/SACRO_Logo_final.png" alt="Alt Text" width="20%"> | ||
|
|
||
| ## AI-SDC Family Tools | ||
|
|
||
| | **ACRO (Python)** | **SACRO-ML** | | ||
| | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | **Statistical Disclosure Control for Python** <br />Tools for the Semi-Automatic Checking of Research Outputs. Drop-in replacements for common analysis commands with built-in privacy protection.<br />[Statistical Analysis](https://sacro-tools.org/introduction.html){.btn .btn-acro .btn-sm} | **Machine Learning Privacy Tools** <br />Collection of tools and resources for managing the statistical disclosure control of trained machine learning models.<br />[Learn More](https://SACRO-ML.sacro-tools.org/introduction.html){.btn .btn-sacro-ml .btn-sm} | | ||
| | **ACRO-R** | **SACRO-Viewer** | | ||
| | **R Package Integration** <br />R-language interface for the Python ACRO library, providing familiar R syntax for statistical disclosure control.<br />[R Integration](reference/index.html){.btn .btn-acro-r .btn-sm} | **Graphical User Interface** <br />A graphical user interface for fast, secure and effective output checking, which can work in any TRE (Trusted Research Environment).<br />[View Docs](https://SACRO-Viewer.sacro-tools.org/introduction.html){.btn .btn-sacro-viewer .btn-sm} | | ||
|
|
||
| ## ACRO-R: Statistical Disclosure Control | ||
|
|
||
| ACRO is a free and open source tool that supports the semi-automated checking of research outputs (SACRO) for privacy disclosure within secure data environments. SACRO is a framework that applies best-practice principles-based statistical disclosure control (SDC) techniques on-the-fly as researchers conduct their analysis. SACRO is designed to assist human checkers rather than seeking to replace them as with current automated rules-based approaches. | ||
|
|
||
| ## What is ACRO-R? | ||
|
|
||
| ACRO implements a principles-based statistical disclosure control (SDC) methodology that: | ||
|
|
||
| * Automatically identifies potentially disclosive outputs | ||
| * Applies optional disclosure mitigation strategies | ||
| * Reports reasons for applying SDC | ||
| * Produces summary documents for output checkers | ||
|
|
||
| ## Core Features | ||
|
|
||
| ### Semi-Automated Disclosure Checking | ||
|
|
||
| * **Drop-in replacements** for common Python analysis commands (pandas, statsmodels, etc.) with configurable disclosure checks | ||
| * **Automated sensitivity tests** : frequency thresholds, dominance (p%, NK rules, etc.), residual degrees-of-freedom checks | ||
| * **Optional mitigations** : suppression, rounding, and more to come | ||
| * **Session management** : track, rename, comment, remove, add exceptions, and finalise reports | ||
| * **Configurable risk parameters** via YAML files | ||
| * **Generates auditable reports** in JSON or Excel | ||
|
|
||
| ### Design Principles | ||
|
|
||
| * **Free and open source** under MIT (ACRO) / GPLv3 (SACRO Viewer) | ||
| * **Easy to install** via PyPI, CRAN, or GitHub; cross-platform (Linux, macOS, Windows) | ||
| * **Familiar APIs** - same function signatures as native commands: acro.crosstab mirrors pandas.crosstab, etc. | ||
| * **Comprehensive coverage** - tables, regressions, histograms, survival plots, etc. | ||
| * **Transparent & auditable** - clear reports, stored queries, designed for human-checkers | ||
| * **Configurable & extensible** - organisation-defined disclosure rules, multi-language support | ||
| * **Scalable** - lightweight, session-based, local execution | ||
|
|
||
| ## Getting Started | ||
|
|
||
| | **Install** | **Learn** | **Reference** | | ||
| | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | | ||
| | Get ACRO-R installed and configured in your environment<br />[Install Guide](articles/installation.html){.btn .btn-primary} | Explore tutorials and examples for common use cases<br />[Examples](articles/index.html){.btn .btn-primary} | Complete API documentation and function reference<br />[API Docs](reference/index.html){.btn .btn-primary} | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've downgraded the setup-python action from v6 to v5 - is this necessary because we will need to watch for the bot attempting to autoupdate it later?