peterdsharpe / AeroSandbox

Aircraft design optimization made fast through modern automatic differentiation. Composable analysis tools for aerodynamics, propulsion, structures, trajectory design, and much more.
https://peterdsharpe.github.io/AeroSandbox/
MIT License
687 stars 111 forks source link

rename: Remove all spaces from filenames and replace with underscores #95

Closed ThomasGreenhill closed 11 months ago

ThomasGreenhill commented 1 year ago

We would like to add AeroSandbox as a third-party library in our hermetic bazel build system, but bazel chokes on filenames that include spaces. This commit replaces all spaces in filenames with underscores

peterdsharpe commented 1 year ago

Hi @ThomasGreenhill,

Thank you for submitting this pull request!

While renaming these files isn't necessarily out of the question, there are a few issues to address:

More broadly, is there no way to set up Bazel to exclude files with spaces in the name? None of the critical files in AeroSandbox include spaces in their filenames - the only ones that do are auxiliary files intended to serve as documentation, literature references, screenshots for the website, or code works-in-progress (only intended to be viewed by humans).

Furthermore, modifying filenames to eliminate spaces breaks existing hyperlinks to the GitHub repository that people have copy-pasted out into the wider world, which is a significant downside that shouldn't be taken lightly.

I'm not familiar with Bazel, so perhaps this is easier said than done, but I would (naively) guess that the easier fix here is to simply direct Bazel to ignore files with spaces in the name, or to write a pre-processing script that executes before the Bazel build that does the same (e.g., by recursively deleting all files with spaces in the name, as none of these files are critical to actually running AeroSandbox). Intuitively, this seems like it would be doable in a typical build system, but perhaps there's something Bazel-specific I'm missing. Let me know your thoughts here.

peterdsharpe commented 11 months ago

Closing stale thread for now, but feel free to re-open if there is continued interest.