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

Monorepo structure #2300

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Monorepo structure #2300

wants to merge 3 commits into from

Conversation

gchoqueux
Copy link
Contributor

@gchoqueux gchoqueux commented Mar 21, 2024

Description

Refactoring iTowns to monorepo structure.

The goal is to split itowns down into feature packages.
As an example, I've started with the geodesy functionalities. (@itowns/geodesy)
I use lerna to watch and build packages while the dev server is in use, but I'm not completely satisfied because the files aren't supplied via memory and files are also transpiled into the browser's debugger.
Lerna is also used to test packages.

  • move unit test
  • improve dev server
  • babel resolver plugin is broken
  • documentation
  • coverage
  • bump version
  • move all src in packages
  • watch src packages
  • publishing, auto publish with github actions
  • create organization NPM to support @iTowns
  • move dependencies to packages
  • webpack : use alias to resolve dependencies instead of exportsFields
  • use babel monorepo configuration
  • move export from private root package.json
  • write all readme.md files

For the moment Debug and Widget modules are private.

Motivation and Context

Split code in packages for clearly structured code.
Simplifies development and facilitates contributions.
Increases the scope of users who only want to use a few functions.
This structure makes it necessary to make functions independent

@gchoqueux
Copy link
Contributor Author

gchoqueux commented Mar 27, 2024

@Desplandis I resolve some issues

  • resolve module with exportsFields option
  • remove lerna with --workspace cli option

@Desplandis
Copy link
Contributor

Desplandis commented Mar 27, 2024

@gchoqueux Nice! I will take a quick look of your changes and write a todo list of things that should absolutely be tested before reviewing more thoroughly this PR. Expect it for tomorrow or next tuesday!

@jailln @mgermerie @ftoromanoff @AnthonyGlt I think we'll need your inputs on this change! ;)

This should be a good start to fix #2197, #1930, #2201 (list not exhaustive, feel free to complete). Shall we create a meta-issue to aggregate all those issues?

@gchoqueux gchoqueux force-pushed the subpackages branch 5 times, most recently from e5ec2ea to b2308ff Compare April 3, 2024 12:02
@gchoqueux gchoqueux marked this pull request as ready for review April 3, 2024 13:54
@gchoqueux gchoqueux force-pushed the subpackages branch 6 times, most recently from ea0116d to 962c99d Compare April 9, 2024 14:56
@gchoqueux gchoqueux force-pushed the subpackages branch 20 times, most recently from e4fc0f5 to 80f739e Compare July 2, 2024 16:04
@jailln
Copy link
Contributor

jailln commented Jul 4, 2024

I propose a live presentation to explain this PR

In my opinion the first thing to do is to agree together on the modules separation (i.e. on a final expected list of sub modules) and on the way / order in which it should be done to avoid going back and forth and so that anyone can contribute to this subject. We can discuss it all together in a call first if you want but I think it will need to end up in an issue eventually. WDYT?

@Desplandis
Copy link
Contributor

Desplandis commented Jul 4, 2024

Yeah, I agree with @jailln and think we should start an issue/proposal where we could centralize all discussions on package splitting (use-cases, explanation of architectural/tooling changes, a sort of informal roadmap, ...). As long as we discuss those topics, I'm all in for a presentation.

@ftoromanoff, @mgermerie and @AnthonyGlt, I think you should participate too. =)

@gchoqueux
Copy link
Contributor Author

in this PR the modules follow the itowns structure

  • itowns : already existing module
  • widget : already in separate structure in src/Utils/gui and a specific bundle itowns_widgets, in this PR this module is private and it isn't published
  • debug : already in separate structure in utils/debug and a specific bundle debug, in this PR this module is private and it isn't published
  • geodesy : new module to measure and represente the geometry, gravity, and spatial orientation of the Earth in temporally varying 3D.

@jailln
Copy link
Contributor

jailln commented Jul 4, 2024

in this PR the modules follow the itowns structure

  • itowns : already existing module
  • widget : already in separate structure in src/Utils/gui and a specific bundle itowns_widgets, in this PR this module is private and it isn't published
  • debug : already in separate structure in utils/debug and a specific bundle debug, in this PR this module is private and it isn't published
  • geodesy : new module to measure and represente the geometry, gravity, and spatial orientation of the Earth in temporally varying 3D.

Ok thanks, this is fine by me. I would just rename geodesy to geographic, WDYT?
What we should discuss/list in an issue is what are the next steps (next modules) and in which order we should split them

@gchoqueux
Copy link
Contributor Author

geodesy includes gravity, orientation, coordinates. Even if the name is less well-known, it's the right term used by professionals. I think it's worth communicating about these rare features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants