Skip to content

Expand paths#803

Open
mschwoer wants to merge 8 commits intomainfrom
expand_paths
Open

Expand paths#803
mschwoer wants to merge 8 commits intomainfrom
expand_paths

Conversation

@mschwoer
Copy link
Collaborator

@mschwoer mschwoer commented Mar 4, 2026

  • expand home directory shortcuts. This fixes an issue where the outputaccumulator could not pick up psm.parquet/fragment.parquet and reported failed search although all was fine
  • make config really read-only (discovered this on the way)

@mschwoer mschwoer requested a review from GeorgWa March 4, 2026 16:11
Copy link
Collaborator

@GeorgWa GeorgWa left a comment

Choose a reason for hiding this comment

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

looks good!

with open(path, "w") as f:
json.dump(self.data, f)

def __getitem__(self, key: str):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this recursive?
or is there any assumption about the data structure only having two levels?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good catch, (how) should we handle this for now?
leave this half-baked solution (and add a comment)?

or revert this part of the PR and do it properly later?

ConfigKeys.QUANT_DIRECTORY,
ConfigKeys.RAW_PATHS,
ConfigKeys.FASTA_PATHS,
("library_prediction", "peptdeep_model_path"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we also move them to constants?

Copy link
Collaborator Author

@mschwoer mschwoer Mar 12, 2026

Choose a reason for hiding this comment

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

There's two options for nesting these constants, cf. the diff here:

dda89fd

the downside of the first (= left side of diff):

  • unintuitive access config[ConfigKeys.GENERAL][ConfigKeys.General.SAVE_FIGURES] , less cohesion in the definitions

downside of the second:

  • IDE does not offer autocompletion on ConfigKeys.GENERAL. ...

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