-
Notifications
You must be signed in to change notification settings - Fork 104
Reorganising developer section #572
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
3510370
to
3efa101
Compare
Preview the changes: https://turinglang.org/docs/pr-previews/572 |
9720766
to
7858c9e
Compare
07f7138
to
c39fc51
Compare
c39fc51
to
ab3ef29
Compare
Apologies for the large diffs, none of the content in the actual qmd files is changed (apart from adding the necessary aliases). I think git has just changed CRLF to LF or vice versa.
|
507f358
to
2b18013
Compare
2b18013
to
88c9c0d
Compare
Maybe this one for you, @mhauru - let me know if you have better suggestions for directory structure |
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.
I'm very happy with the changes themselves, this is much clearer.
I worry a bit about the line break character changes. Why did this only happen for some files? Do we still have a mixture of line break characters in the repo? Why did we get a mixture in the first place?
My worry is that there will be more PRs in the future where line breaks change, which makes diffs unreadable. Worse yet, an oscillation where we keep changing the line break chars back and forth. There's some git setting for forcing it to use a particular line break character. If I remember correctly it allows you to checkout a commit, and git will automatically convert line breaks to your system's native one, and then convert back to the repo default when you make a commit. Maybe we need to set that in a local .gitconfig?
I think that it's because of different operating systems. The qmd's were probably written on Windows and checked in with CRLF. The two files that didn't have a huge diff were
In the past it used to be that Windows contributors would need to set Apparently, nowadays you can use a For this PR, I've reverted the checked-in line endings to the originals, so that the diffs are easy to read. I can follow this up with a PR to normalise everything to LF and to add the |
That does raise a question of whether every repo should have a .gitattributes, not just this one... |
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.
Very happy with this PR.
I wasn't familiar with .gitattributes, it seems really neat.
I checked the holy trinity of Python data science packages and they all seem to make at least some use of it https://github.com/numpy/numpy/blob/main/.gitattributes https://github.com/scipy/scipy/blob/main/.gitattributes https://github.com/matplotlib/matplotlib/blob/main/.gitattributes |
In general, I think we could be making much better use of a directory structure to keep different tutorials etc. Also the numbering system of
docs-01
,docs-02
, ... is genuinely really unwieldy.At first, I thought that we were doomed to keeping the old structure because of backwards compatibility for URLs. (It's kind of annoying as a user to click on a bookmark and get a 404.) Then I learnt that Quarto lets you give each page aliases, like this: https://quarto.org/docs/websites/website-navigation.html#redirects which means that we can move our pages around as much as we like, as long as we keep the old links as an alias.
This PR therefore moves all the documentation in the 'developer' section to a cleaner directory structure, preserving all the old links.
Note that in the PR preview all the old links still redirect to the correct page:
Apart from this, I also added a note to the "compiler design" title to say that it's outdated (some of the DynamicPPL functions referenced there do not exist anymore).
If we are OK with this approach, then I will work on cleaning up / reorganising the 'users' section after this is merged.