Skip to content

Commit

Permalink
Made the fix for Issue 17 by adding another text input for users to s…
Browse files Browse the repository at this point in the history
…et the branch of their repo to get the model file from.
  • Loading branch information
blakeaw committed Aug 2, 2024
1 parent 62553f3 commit 7b9f783
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.1.2] - 2024-08-02

### Fixed
- Upload page: `pages/compartmental/upload.py`. Added in an option to specify the branch of the repository to load a model file from as a fix for Issue https://github.com/Borealis-BioModeling/aurora-pkpd/issues/17

## [0.1.1] - 2024-07-30

### Fixed
Expand Down
5 changes: 3 additions & 2 deletions pages/compartmental/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
elif repo_host == 'GitLab 🦊':
repo_user = st.text_input("Username or Group:", placeholder='janedoe')
repo_name = st.text_input("Repository name:", placeholder='my-cool-repo')
repo_branch = st.text_input("Repository branch:", placeholder='main')
repo_path = st.text_input("Path to model file:", placeholder='src/model.py')
to_load = st.button("Load")
with st.expander(":information_source: Sample Model"):
Expand All @@ -96,9 +97,9 @@
''')
if to_load:
if repo_host == 'GitHub 🐙':
repo_url = f'https://raw.githubusercontent.com/{repo_user}/{repo_name}/main/{repo_path}'
repo_url = f'https://raw.githubusercontent.com/{repo_user}/{repo_name}/{repo_branch}/{repo_path}'
elif repo_host == 'GitLab 🦊':
repo_url = f'https://gitlab.com/{repo_user}/{repo_name}/-/raw/master/{repo_path}?ref_type=heads'
repo_url = f'https://gitlab.com/{repo_user}/{repo_name}/-/raw/{repo_branch}/{repo_path}?ref_type=heads'
page = requests.get(repo_url)
string_data = page.text

Expand Down
2 changes: 1 addition & 1 deletion pages/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"assets/aurora-pkpd-logo-2.png"
)

center.info("version 0.1.1-alpha")
center.info("version 0.1.2-alpha")
widgets.divider_blank()
st.subheader("Aurora PK/PD: Open Web App for Pharmacological Modeling and Analysis")
st.markdown(
Expand Down

0 comments on commit 7b9f783

Please sign in to comment.