Skip to content

Commit

Permalink
v0.2.22
Browse files Browse the repository at this point in the history
  • Loading branch information
yh202109 committed Jul 30, 2024
1 parent 21f57e4 commit 4c84afd
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ example_emt4.ipynb
std_iso_pdf.ipynb
std_iso_idmp.ipynb
std_cdisc.ipynb
statlab_kappa.rst
statlab_kappa2.rst
statlab_corr_tau.rst
statlab_corr_spearman_rho.rst
changelog.md
contributing.md
Expand Down
17 changes: 17 additions & 0 deletions docs/statlab_corr_spearman_rho.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
..
# Copyright (C) 2023-2024 Y Hsu <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public license as published by
# the Free software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details
#
# You should have received a copy of the GNU General Public license
# along with this program. If not, see <https://www.gnu.org/license/>
Please visit the new page here: https://yh202109.github.io/mtbp3Lab/statlab_corr_spearman_rho.html
17 changes: 17 additions & 0 deletions docs/statlab_corr_tau.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
..
# Copyright (C) 2023-2024 Y Hsu <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public license as published by
# the Free software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details
#
# You should have received a copy of the GNU General Public license
# along with this program. If not, see <https://www.gnu.org/license/>
plese visit the new page here: https://yh202109.github.io/mtbp3Lab/statlab_corr_tau.html
18 changes: 18 additions & 0 deletions docs/statlab_kappa.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
..
# Copyright (C) 2023-2024 Y Hsu <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public license as published by
# the Free software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details
#
# You should have received a copy of the GNU General Public license
# along with this program. If not, see <https://www.gnu.org/license/>
Please visit the new page here: https://yh202109.github.io/mtbp3Lab/statlab_kappa.html
17 changes: 17 additions & 0 deletions docs/statlab_kappa2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
..
# Copyright (C) 2023-2024 Y Hsu <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public license as published by
# the Free software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details
#
# You should have received a copy of the GNU General Public license
# along with this program. If not, see <https://www.gnu.org/license/>
Please visit the new page here: https://yh202109.github.io/mtbp3Lab/statlab_kappa2.html
29 changes: 29 additions & 0 deletions mtbp3/stdcdisc/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,34 @@ def get_ct_codelists_df(self, title="", max_level = 3):

return

def get_standards(self):
"""
Retrieves a list of available standards from the CDISC library.
This method sends a GET request to the CDISC library API to retrieve a list of available standards.
It returns a list of standard names.
Returns:
list: A list of available standards.
"""
ep = "/mdr/products"
req = requests.get(
self.baseURL + ep,
headers={'api-key': self.api_key, 'Accept': 'application/json'}
)
req.close()

if req.status_code == 200:
data = req.json()
# standards = [standard['name'] for standard in data['_links']['standards']]
# return standards
return data
else:
raise ValueError("Invalid status code: " + str(req.status_code) + " - " + req.reason)

if __name__ == "__main__":
# Example usage of get_standards method
lib = accessLib("/Users/yh2020/cdisc.txt") # Replace with the actual path to the input file
standards = lib.get_standards()
print(standards)
pass

0 comments on commit 4c84afd

Please sign in to comment.