Skip to content
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

Refactor module structure #237

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Refactor module structure #237

wants to merge 14 commits into from

Conversation

PoignardAzur
Copy link
Contributor

@PoignardAzur PoignardAzur commented Dec 22, 2024

This echoes a discussion I had with Chad a few weeks ago. Parley's current structure de-facto splits into three types of items:

  • input data structures.
  • output data structures.
  • algorithms mapping the former to the latter.

(EDIT: There's also data structures for text editing which are mostly separate from the rest.)

This PR makes these four blocs into explicit modules, which should make both the code and the documentation much easier to read.

This should also help people navigate the upcoming refactor; algorithms will be changed radically, input types may be changed, output types are likely to stay the same. Explicitly marking them should make parallel work easier.

Another thing the PR does in de-tangle layout types. Currently, when you're looking for Cluster, do you find it in cluster.rs? Nope, layout/mod.rs. What about ClusterData? layout/data.rs. Splitting these types into their eponymous files makes them easier to find without IDE assistance.

@PoignardAzur PoignardAzur changed the title [WIP] Refactor module structure Refactor module structure Dec 22, 2024
@PoignardAzur
Copy link
Contributor Author

I think this is ready to merge. I'd recommend reviewing the commits individually otherwise this is a lot to take in at once.

@PoignardAzur
Copy link
Contributor Author

To be clear, this is a first stab at sorting parley's files differently.

Follow-up PRs should:

  • Move a lot of code from outputs/ to algos/.
  • Flatten the directory structure a bit.
  • Document all of this, including an ARCHITECTURE.md file.

@waywardmonkeys
Copy link
Contributor

I think this is blocked (at least) pending a comment from @dfrg

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