Skip to content

Conversation

@ReshmaRamaiah10
Copy link
Contributor

No description provided.

Copy link
Contributor

Choose a reason for hiding this comment

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

We should delete this file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Delete the file or gitignore?

Copy link
Contributor

Choose a reason for hiding this comment

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

The package-lock.json

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this is generated automatically by the annotations you added to the files in server/main.go. Could you add documentation on how to regenerate? Also, will regenerating recreate the json and yaml versions as well?

NIT: Maybe we can put the generated files in swagger/generated. That way, it's obvious these are the swagger docs and that it's generated so people don't mess with the files.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add the dependencies in the go.mod at the root of the go directory?

Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as go.mod

gin.DefaultErrorWriter = log.WriterLevel(logrus.ErrorLevel)

// TODO: can we configure the static folder location?
router.Static("/assets", "../resources/static/assets")
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you explain this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

router.Static("/", "../resources/static") doesn't work. It doesn't read /assets

return
}

flattened := flattenTumorTypes(tree)
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably no need to flatten the tree first. Can't we just search the tumor types in a BFS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Implemented

Visible bool `json:"visible"`
}

func getHardcodedVersions() []Version {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm fine with hardcoding the identifiers, but we probably shouldn't hardcode the release date. Since they change, we would need to update the code once we change them. We should set up the system to use the most recent tree as latest stable, and we need to find a way to denote candidate.

Need to make sure to communicate this change with Ritika

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Implemented.

  1. The version identifier remains consistent, but the release date is refreshed to reflect the most recent release.
  2. Whenever a new input version is detected, the system resolves and validates it by locating the latest file and updating the version reference accordingly.


func isValidVersion(version string) bool {
treeDir := "../../../../trees"
versions, err := GetAvailableVersionIdentifiers(treeDir)
Copy link
Contributor

Choose a reason for hiding this comment

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

It would probably be better practice to just look for the file we are interested in instead of getting all available versions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, changed

return node.Code
case "name":
return node.Name
case "maintype":
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the current API uses mainType with capital T

for _, lvlStr := range strings.Split(levelsStr, ",") {
lvlStr = strings.TrimSpace(lvlStr)
lvl, err := strconv.ParseUint(lvlStr, 10, 32)
if err == nil && lvl != 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we handle error by returning BadRequest instead of skipping over them?

return max
}

func writeTSVRows(node internal.TreeNode, levels []string, sb *strings.Builder) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you just get the sorted nodes (you could figure out the max level during this process) and then write the rows in a for loop. The recursive logic where you pass in an empty string array as well as the string builder is a bit confusing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Implemented

bprize15 and others added 2 commits November 4, 2025 11:08
* add tsv parsing step

* add precursors automatically from ampping

* populate precursors and revocations from last available tree with no mapping

* add tree generation to git workflow
* fix docker build and add tree files

* remove test trees

* remove print statements

* remove static files from source control
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