Skip to content

Switch README extraction to use output directory path names#401

Merged
rosafilgueira merged 8 commits intoSoftwareUnderstanding:devfrom
WilliamsCJ:readme-relative-path
Jan 17, 2023
Merged

Switch README extraction to use output directory path names#401
rosafilgueira merged 8 commits intoSoftwareUnderstanding:devfrom
WilliamsCJ:readme-relative-path

Conversation

@WilliamsCJ
Copy link
Contributor

Currently the README extraction feature uses the path of README files in the input directory as keys in the generated JSON. This is inconsistent with the rest of the JSON, as directory paths are given relative to the output directory.

This pull request changes the paths of extracted README files to use the output directory path and ammends relevant unit test.

Example

Consider a repository with a README.md file at the root. Previously, calling inspect4py -i ../repo -o out -rm would extract the README with the path ../repo/README.md in the JSON. This fix corrects the output to out/repo/README.md.

@WilliamsCJ WilliamsCJ changed the base branch from main to dev January 16, 2023 18:19
@dgarijo
Copy link
Collaborator

dgarijo commented Jan 16, 2023

Thanks, looks good on my end (except for that print(f) command, which could be deleted).
I will let @rosafilgueira have a look

@WilliamsCJ
Copy link
Contributor Author

Thanks, looks good on my end (except for that print(f) command, which could be deleted). I will let @rosafilgueira have a look

Thanks for spotting! I've removed those in 6167769.

@rosafilgueira rosafilgueira merged commit 3059f41 into SoftwareUnderstanding:dev Jan 17, 2023
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.

3 participants