-
Notifications
You must be signed in to change notification settings - Fork 1
Add upload-topics command to topicgenerator #489
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #489 +/- ##
=============================================
- Coverage 56.02% 54.44% -1.59%
- Complexity 297 307 +10
=============================================
Files 33 37 +4
Lines 2001 2173 +172
Branches 163 177 +14
=============================================
+ Hits 1121 1183 +62
- Misses 796 903 +107
- Partials 84 87 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
pom.xml
Outdated
@@ -38,7 +38,7 @@ | |||
|
|||
<github.url>scm:git:git@github.com:dockstore/dockstore-support.git</github.url> | |||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |||
<dockstore-core.version>1.16.0-alpha.2</dockstore-core.version> | |||
<dockstore-core.version>1.16.0-SNAPSHOT</dockstore-core.version> |
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.
Will update to tag when webservice PR is merged
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.
Minor feedback
# networks: | ||
# - elastic | ||
postgres_db: | ||
image: postgres:16.1 |
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.
We're going to have a bunch of these scattered around, maybe a follow-up ticket to create a shared resource in https://github.com/dockstore/.github
This one in particular looks a lot like https://github.com/dockstore/dockstore-cli/blob/develop/docker-compose.yml with the right postgres version
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.
One idea, could download during build via https://github.com/maven-download-plugin/maven-download-plugin
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.
topicgenerator/src/test/java/io/dockstore/topicgenerator/client/cli/package-info.java
Show resolved
Hide resolved
|
||
try (CSVPrinter csvPrinter = new CSVPrinter(new FileWriter(outputFileName, StandardCharsets.UTF_8), CSVFormat.DEFAULT.builder().setHeader(OutputCsvHeaders.class).build())) { | ||
for (CSVRecord entry: entriesCsvRecords) { | ||
final String trsId = entry.get(InputCsvHeaders.trsId); | ||
final String versionId = entry.get(InputCsvHeaders.version); | ||
final String trsId = entry.get(GenerateTopicsCommand.InputCsvHeaders.trsId); |
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.
The lowercase enum value names confuse me every time. No need to change, but I needed to vent that. :) It would be great if the apache csv library calculated the column name as the toString()
of the enum value, so the enum names themselves could be capitalized correctly (with a little extra work/code). Or maybe it does? If it did, you could do something like:
public enum CsvColumns {
ID("id"),
SOME_VALUE("someValue");
private final String value;
public CsvColumns(String value) {
this.value = value;
}
public String toString() {
return value;
}
}
|
Description
Related PR: dockstore/dockstore#5847
This PR adds an
upload-topics
command to the topic generator so it can upload the topics generated by thegenerate-topics
command to Dockstore.Review Instructions
Run the
upload-topics
command against QA to upload the generated topics in this file https://github.com/dockstore/dockstore-support/blob/develop/topicgenerator/results/generated-topics_GPT_3_5_TURBO_16K_20231113T135602Z.csv. Steps below:Can create a new directory called
topic-generator
locally to do this testingCreate a
topic-generator.config
file. See the topicgenerator README for instructions on how to get set up. Note that you do not need theopenai-api-key
to run theupload-topics
command.Download the topicgenerator 1.16.0-alpha.1 JAR using
Download the generated topics file
Upload the topics
Go to the search page on QA and select the Workflows tab.
Verify that the first few workflows have topics with an AI bubble.
View this tool (should have permission to view it if you're a part of the dockstore GitHub organization, if not, run the Discover Existing Workflows button) https://qa.dockstore.org/my-tools/github.com/dockstore/dockstore-tool-bamstats/bamstats_sort_cwl and verify that the AI generated topic shows up.
Verify that the Topic Selection is not AI because the entry has an automatic topic.
Select AI Generated as the Topic Selection.
View the tool's public page and verify that the AI topic shows up. There should be an AI bubble.
Find the tool in the search table and verify that the AI topic shows up and that there's an AI bubble.
Issue
SEAB-6007
Security
If there are any concerns that require extra attention from the security team, highlight them here.
Please make sure that you've checked the following before submitting your pull request. Thanks!
mvn clean install
in the project that you have modified (until https://ucsc-cgl.atlassian.net/browse/SEAB-5300 adds multi-module support properly)