Skip to content
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

Fixes #1939 template db auto update #2043

Merged
merged 1 commit into from
Jan 12, 2022
Merged

Conversation

msevestre
Copy link
Member

No description provided.

@msevestre msevestre requested a review from Yuri05 January 12, 2022 16:51
public static readonly string PRODUCT_NAME_WITH_TRADEMARK = "PK-Sim®";
public static readonly string DEFAULT_SKIN = "Office 2013 Light Gray";
public static readonly string VALUE_PROPERTY_NAME = "Value";
public static readonly string PROJECT_UNDEFINED = "Undefined";
public static readonly string VERSION_FILE_URL = "https://raw.githubusercontent.com/Open-Systems-Pharmacology/Suite/master/versions.json";
public static readonly string REMOTE_TEMPLATE_FILE_URL = "https://raw.githubusercontent.com/Open-Systems-Pharmacology/OSPSuite.BuildingBlockTemplates/main/templates.json";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the path of the latest file released. When we release a new file, we need to remember to also update the version file in the suite that will be the trigger for the update

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should setup the develop branch as default in the templates repo then, to make sure that only released versions are merged into main.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Can you create an issue for this in the repo?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

using (var wc = new WebClient())
{
var jsonContent = await wc.DownloadStringTaskAsync(VersionFileUrl);
_allVersions = await _jsonSerializer.DeserializeAsArrayFromString<VersionInfo>(jsonContent);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saving all possible software version available (and not only the one for PKSim). This service is in fact independent from PKSim and could be moved to core

@msevestre msevestre merged commit 4893f39 into develop Jan 12, 2022
@msevestre msevestre deleted the 1939-template-db-auto-update branch January 12, 2022 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants