From e75ea7dceb1de6ff417c5e3c87ff1b2a0b8d0925 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Mon, 3 Jun 2024 16:43:39 +0000 Subject: [PATCH] Update documentation --- _modules/acro/acro.html | 16 +++++----- _modules/acro/record.html | 42 ++++++++++++------------- acro.html | 48 ++++++++++++++-------------- record.html | 66 +++++++++++++++++++-------------------- 4 files changed, 86 insertions(+), 86 deletions(-) diff --git a/_modules/acro/acro.html b/_modules/acro/acro.html index 3e3bbfb..a3d01eb 100644 --- a/_modules/acro/acro.html +++ b/_modules/acro/acro.html @@ -117,7 +117,7 @@

Source code for acro.acro

     """
 
     def __init__(self, config: str = "default", suppress: bool = False) -> None:
-        """Constructs a new ACRO object and reads parameters from config.
+        """Construct a new ACRO object and reads parameters from config.
 
         Parameters
         ----------
@@ -149,7 +149,7 @@ 

Source code for acro.acro

         acro_tables.SURVIVAL_THRESHOLD = self.config["survival_safe_threshold"]
 
 
[docs] def finalise(self, path: str = "outputs", ext="json") -> Records | None: - """Creates a results file for checking. + """Create a results file for checking. Parameters ---------- @@ -184,7 +184,7 @@

Source code for acro.acro

         return self.results
[docs] def remove_output(self, key: str) -> None: - """Removes an output from the results. + """Remove an output from the results. Parameters ---------- @@ -194,7 +194,7 @@

Source code for acro.acro

         self.results.remove(key)
[docs] def print_outputs(self) -> str: - """Prints the current results dictionary. + """Print the current results dictionary. Returns ------- @@ -204,7 +204,7 @@

Source code for acro.acro

         return self.results.print()
[docs] def custom_output(self, filename: str, comment: str = "") -> None: - """Adds an unsupported output to the results dictionary. + """Add an unsupported output to the results dictionary. Parameters ---------- @@ -228,7 +228,7 @@

Source code for acro.acro

         self.results.rename(old, new)
[docs] def add_comments(self, output: str, comment: str) -> None: - """Adds a comment to an output. + """Add a comment to an output. Parameters ---------- @@ -240,7 +240,7 @@

Source code for acro.acro

         self.results.add_comments(output, comment)
[docs] def add_exception(self, output: str, reason: str) -> None: - """Adds an exception request to an output. + """Add an exception request to an output. Parameters ---------- @@ -253,7 +253,7 @@

Source code for acro.acro

 
 
 
[docs]def add_to_acro(src_path: str, dest_path: str = "sdc_results") -> None: - """Adds outputs to an acro object and creates a results file for checking. + """Add outputs to an acro object and creates a results file for checking. Parameters ---------- diff --git a/_modules/acro/record.html b/_modules/acro/record.html index cfcc23e..cb52f93 100644 --- a/_modules/acro/record.html +++ b/_modules/acro/record.html @@ -90,7 +90,7 @@

Source code for acro.record

 
 
 
[docs]def load_outcome(outcome: dict) -> DataFrame: - """Returns a DataFrame from an outcome dictionary. + """Return a DataFrame from an outcome dictionary. Parameters ---------- @@ -101,7 +101,7 @@

Source code for acro.record

 
 
 
[docs]def load_output(path: str, output: list[str]) -> list[str] | list[DataFrame]: - """Returns a loaded output. + """Return a loaded output. Parameters ---------- @@ -172,7 +172,7 @@

Source code for acro.record

         output: list[str] | list[DataFrame],
         comments: list[str] | None = None,
     ) -> None:
-        """Constructs a new output record.
+        """Construct a new output record.
 
         Parameters
         ----------
@@ -212,7 +212,7 @@ 

Source code for acro.record

         self.timestamp: str = now.isoformat()
 
 
[docs] def serialize_output(self, path: str = "outputs") -> list[str]: - """Serializes outputs. + """Serialize outputs. Parameters ---------- @@ -253,7 +253,7 @@

Source code for acro.record

         return output
def __str__(self) -> str: - """Returns a string representation of a record. + """Return a string representation of a record. Returns ------- @@ -280,7 +280,7 @@

Source code for acro.record

     """Stores data related to a collection of output records."""
 
     def __init__(self) -> None:
-        """Constructs a new object for storing multiple records."""
+        """Construct a new object for storing multiple records."""
         self.results: dict[str, Record] = {}
         self.output_id: int = 0
 
@@ -296,7 +296,7 @@ 

Source code for acro.record

         output: list[str] | list[DataFrame],
         comments: list[str] | None = None,
     ) -> None:
-        """Adds an output to the results.
+        """Add an output to the results.
 
         Parameters
         ----------
@@ -336,7 +336,7 @@ 

Source code for acro.record

         logger.info("add(): %s", new.uid)
[docs] def remove(self, key: str) -> None: - """Removes an output from the results. + """Remove an output from the results. Parameters ---------- @@ -349,7 +349,7 @@

Source code for acro.record

         logger.info("remove(): %s removed", key)
[docs] def get(self, key: str) -> Record: - """Returns a specified output from the results. + """Return a specified output from the results. Parameters ---------- @@ -365,7 +365,7 @@

Source code for acro.record

         return self.results[key]
[docs] def get_keys(self) -> list[str]: - """Returns the list of available output keys. + """Return the list of available output keys. Returns ------- @@ -376,7 +376,7 @@

Source code for acro.record

         return list(self.results.keys())
[docs] def get_index(self, index: int) -> Record: - """Returns the output at the specified position. + """Return the output at the specified position. Parameters ---------- @@ -393,7 +393,7 @@

Source code for acro.record

         return self.results[key]
[docs] def add_custom(self, filename: str, comment: str | None = None) -> None: - """Adds an unsupported output to the results dictionary. + """Add an unsupported output to the results dictionary. Parameters ---------- @@ -443,7 +443,7 @@

Source code for acro.record

         logger.info("rename_output(): %s renamed to %s", old, new)
[docs] def add_comments(self, output: str, comment: str) -> None: - """Adds a comment to an output. + """Add a comment to an output. Parameters ---------- @@ -458,7 +458,7 @@

Source code for acro.record

         logger.info("a comment was added to %s", output)
[docs] def add_exception(self, output: str, reason: str) -> None: - """Adds an exception request to an output. + """Add an exception request to an output. Parameters ---------- @@ -473,7 +473,7 @@

Source code for acro.record

         logger.info("exception request was added to %s", output)
[docs] def print(self) -> str: - """Prints the current results. + """Print the current results. Returns ------- @@ -488,7 +488,7 @@

Source code for acro.record

         return outputs
[docs] def validate_outputs(self) -> None: - """Prompts researcher to complete any required fields.""" + """Prompt researcher to complete any required fields.""" for _, record in self.results.items(): if record.status != "pass" and record.exception == "": logger.info( @@ -501,7 +501,7 @@

Source code for acro.record

                 record.exception = input("")
[docs] def finalise(self, path: str, ext: str) -> None: - """Creates a results file for checking. + """Create a results file for checking. Parameters ---------- @@ -525,7 +525,7 @@

Source code for acro.record

         logger.info("outputs written to: %s", path)
[docs] def finalise_json(self, path: str) -> None: - """Writes outputs to a JSON file. + """Write outputs to a JSON file. Parameters ---------- @@ -564,7 +564,7 @@

Source code for acro.record

             )
[docs] def finalise_excel(self, path: str) -> None: - """Writes outputs to an excel spreadsheet. + """Write outputs to an excel spreadsheet. Parameters ---------- @@ -613,7 +613,7 @@

Source code for acro.record

                     table.to_excel(writer, sheet_name=output_id, startrow=start)
[docs] def write_checksums(self, path: str) -> None: - """Writes checksums for each file to checksums folder. + """Write checksums for each file to checksums folder. Parameters ---------- @@ -639,7 +639,7 @@

Source code for acro.record

 
 
 
[docs]def load_records(path: str) -> Records: - """Loads outputs from a JSON file. + """Load outputs from a JSON file. Parameters ---------- diff --git a/acro.html b/acro.html index 3c21382..4170e87 100644 --- a/acro.html +++ b/acro.html @@ -113,22 +113,22 @@

add_comments(output, comment)

-

Adds a comment to an output.

+

Add a comment to an output.

add_exception(output, reason)

-

Adds an exception request to an output.

+

Add an exception request to an output.

crosstab(index, columns[, values, rownames, ...])

Compute a simple cross tabulation of two (or more) factors.

custom_output(filename[, comment])

-

Adds an unsupported output to the results dictionary.

+

Add an unsupported output to the results dictionary.

finalise([path, ext])

-

Creates a results file for checking.

+

Create a results file for checking.

hist(data, column[, by_val, grid, ...])

-

Creates a histogram from a single column.

+

Create a histogram from a single column.

logit(endog, exog[, missing, check_rank])

Fits Logit model.

@@ -146,7 +146,7 @@

Create a spreadsheet-style pivot table as a DataFrame.

print_outputs()

-

Prints the current results dictionary.

+

Print the current results dictionary.

probit(endog, exog[, missing, check_rank])

Fits Probit model.

@@ -155,26 +155,26 @@

Fits Probit model from a formula and dataframe.

remove_output(key)

-

Removes an output from the results.

+

Remove an output from the results.

rename_output(old, new)

Rename an output.

surv_func(time, status, output[, entry, ...])

-

Estimates the survival function.

+

Estimate the survival function.

survival_plot(survival_table, survival_func, ...)

-

Creates the survival plot according to the status of suppressing.

+

Create the survival plot according to the status of suppressing.

survival_table(survival_table, safe_table, ...)

-

Creates the survival table according to the status of suppressing.

+

Create the survival table according to the status of suppressing.

add_comments(output: str, comment: str) None[source]
-

Adds a comment to an output.

+

Add a comment to an output.

Parameters
@@ -190,7 +190,7 @@
add_exception(output: str, reason: str) None[source]
-

Adds an exception request to an output.

+

Add an exception request to an output.

Parameters
@@ -206,8 +206,8 @@
crosstab(index, columns, values=None, rownames=None, colnames=None, aggfunc=None, margins: bool = False, margins_name: str = 'All', dropna: bool = True, normalize=False, show_suppressed=False) DataFrame
-

Compute a simple cross tabulation of two (or more) factors. By -default, computes a frequency table of the factors unless an array of +

Compute a simple cross tabulation of two (or more) factors.

+

By default, computes a frequency table of the factors unless an array of values and an aggregation function are passed.

To provide consistent behaviour with different aggregation functions, ‘empty’ rows or columns -i.e. that are all NaN or 0 (count,sum) are removed.

@@ -256,7 +256,7 @@
custom_output(filename: str, comment: str = '') None[source]
-

Adds an unsupported output to the results dictionary.

+

Add an unsupported output to the results dictionary.

Parameters
@@ -272,7 +272,7 @@
finalise(path: str = 'outputs', ext='json') acro.record.Records | None[source]
-

Creates a results file for checking.

+

Create a results file for checking.

Parameters
@@ -294,8 +294,8 @@
hist(data, column, by_val=None, grid=True, xlabelsize=None, xrot=None, ylabelsize=None, yrot=None, axis=None, sharex=False, sharey=False, figsize=None, layout=None, bins=10, backend=None, legend=False, filename='histogram.png', **kwargs)
-

Creates a histogram from a single column. -The dataset and the column’s name should be passed to the function as parameters. +

Create a histogram from a single column.

+

The dataset and the column’s name should be passed to the function as parameters. If more than one column is used the histogram will not be calculated.

To save the histogram plot to a file, the user can specify a filename otherwise ‘histogram.png’ will be used as the filename. A number will be appended automatically @@ -574,7 +574,7 @@

print_outputs() str[source]
-

Prints the current results dictionary.

+

Print the current results dictionary.

Returns
@@ -663,7 +663,7 @@
remove_output(key: str) None[source]
-

Removes an output from the results.

+

Remove an output from the results.

Parameters
@@ -693,7 +693,7 @@
surv_func(time, status, output, entry=None, title=None, freq_weights=None, exog=None, bw_factor=1.0, filename='kaplan-meier.png') DataFrame
-

Estimates the survival function.

+

Estimate the survival function.

Parameters
@@ -732,13 +732,13 @@
survival_plot(survival_table, survival_func, filename, status, sdc, command, summary)
-

Creates the survival plot according to the status of suppressing.

+

Create the survival plot according to the status of suppressing.

survival_table(survival_table, safe_table, status, sdc, command, summary, outcome)
-

Creates the survival table according to the status of suppressing.

+

Create the survival table according to the status of suppressing.

@@ -746,7 +746,7 @@
acro.acro.add_to_acro(src_path: str, dest_path: str = 'sdc_results') None[source]
-

Adds outputs to an acro object and creates a results file for checking.

+

Add outputs to an acro object and creates a results file for checking.

Parameters
diff --git a/record.html b/record.html index bf1f1a6..68b21e5 100644 --- a/record.html +++ b/record.html @@ -121,14 +121,14 @@

serialize_output([path])

-

Serializes outputs.

+

Serialize outputs.

serialize_output(path: str = 'outputs') list[str][source]
-

Serializes outputs.

+

Serialize outputs.

Parameters
@@ -159,56 +159,56 @@

add(status, output_type, properties, sdc, ...)

-

Adds an output to the results.

+

Add an output to the results.

add_comments(output, comment)

-

Adds a comment to an output.

+

Add a comment to an output.

add_custom(filename[, comment])

-

Adds an unsupported output to the results dictionary.

+

Add an unsupported output to the results dictionary.

add_exception(output, reason)

-

Adds an exception request to an output.

+

Add an exception request to an output.

finalise(path, ext)

-

Creates a results file for checking.

+

Create a results file for checking.

finalise_excel(path)

-

Writes outputs to an excel spreadsheet.

+

Write outputs to an excel spreadsheet.

finalise_json(path)

-

Writes outputs to a JSON file.

+

Write outputs to a JSON file.

get(key)

-

Returns a specified output from the results.

+

Return a specified output from the results.

get_index(index)

-

Returns the output at the specified position.

+

Return the output at the specified position.

get_keys()

-

Returns the list of available output keys.

+

Return the list of available output keys.

print()

-

Prints the current results.

+

Print the current results.

remove(key)

-

Removes an output from the results.

+

Remove an output from the results.

rename(old, new)

Rename an output.

validate_outputs()

-

Prompts researcher to complete any required fields.

+

Prompt researcher to complete any required fields.

write_checksums(path)

-

Writes checksums for each file to checksums folder.

+

Write checksums for each file to checksums folder.

add(status: str, output_type: str, properties: dict, sdc: dict, command: str, summary: str, outcome: DataFrame, output: list[str] | list[pandas.core.frame.DataFrame], comments: Optional[list[str]] = None) None[source]
-

Adds an output to the results.

+

Add an output to the results.

Parameters
@@ -238,7 +238,7 @@
add_comments(output: str, comment: str) None[source]
-

Adds a comment to an output.

+

Add a comment to an output.

Parameters
@@ -254,7 +254,7 @@
add_custom(filename: str, comment: Optional[str] = None) None[source]
-

Adds an unsupported output to the results dictionary.

+

Add an unsupported output to the results dictionary.

Parameters
@@ -270,7 +270,7 @@
add_exception(output: str, reason: str) None[source]
-

Adds an exception request to an output.

+

Add an exception request to an output.

Parameters
@@ -286,7 +286,7 @@
finalise(path: str, ext: str) None[source]
-

Creates a results file for checking.

+

Create a results file for checking.

Parameters
@@ -302,7 +302,7 @@
finalise_excel(path: str) None[source]
-

Writes outputs to an excel spreadsheet.

+

Write outputs to an excel spreadsheet.

Parameters
@@ -316,7 +316,7 @@
finalise_json(path: str) None[source]
-

Writes outputs to a JSON file.

+

Write outputs to a JSON file.

Parameters
@@ -330,7 +330,7 @@
get(key: str) Record[source]
-

Returns a specified output from the results.

+

Return a specified output from the results.

Parameters
@@ -350,7 +350,7 @@
get_index(index: int) Record[source]
-

Returns the output at the specified position.

+

Return the output at the specified position.

Parameters
@@ -370,7 +370,7 @@
get_keys() list[str][source]
-

Returns the list of available output keys.

+

Return the list of available output keys.

Returns
@@ -384,7 +384,7 @@
print() str[source]
-

Prints the current results.

+

Print the current results.

Returns
@@ -398,7 +398,7 @@
remove(key: str) None[source]
-

Removes an output from the results.

+

Remove an output from the results.

Parameters
@@ -428,13 +428,13 @@
validate_outputs() None[source]
-

Prompts researcher to complete any required fields.

+

Prompt researcher to complete any required fields.

write_checksums(path: str) None[source]
-

Writes checksums for each file to checksums folder.

+

Write checksums for each file to checksums folder.

Parameters
@@ -450,7 +450,7 @@
acro.record.load_outcome(outcome: dict) DataFrame[source]
-

Returns a DataFrame from an outcome dictionary.

+

Return a DataFrame from an outcome dictionary.

Parameters
@@ -464,7 +464,7 @@
acro.record.load_output(path: str, output: list[str]) list[str] | list[pandas.core.frame.DataFrame][source]
-

Returns a loaded output.

+

Return a loaded output.

Parameters
@@ -486,7 +486,7 @@
acro.record.load_records(path: str) Records[source]
-

Loads outputs from a JSON file.

+

Load outputs from a JSON file.

Parameters