Skip to content

Shift to Git submodule or NPM package approach for map-style #929

Closed
0 of 2 issues completed
Closed

Description

@danrademacher

We have three sources of code external to ohm-website that interact/make their way into the code base for full OHM functionality:

  • Map style JSON
  • Timeslider javascript
  • Inspector panel

How things have been and are now

As we developed these tools, we have used mishmash of methods to bring the code together:

How we want things to be

  • Latest working code from all three sources (Map styles, Timeslider, Inspector) is easily and automatically pulled into ohm-website so that local testing is a full representation of what's running on the site.
  • Each of the source repos has a clear development vs main/production branches, and ohm-website pulls from production and that code is assumed working

this could be achieved quickly via git submodule or a little less quickly via publishing all three as NPM modules.

We have existing tickets related to this need:

Map styles considerations

One thing this would require is a full cleanup and hardening of the workflows in map-styles so that we are consistently using branches and PRs between staging and master or renamed to main or some other branch that we pull from for the production styles. Currently, it's not always the case that a style JSON at the tip of staging in that repo is working.

I think a wrinkle with the styles especially is where the step of testing the style in ohm-website occurs, and what that implies about whether the code in a specific map-styles is "known working" in the context of the Rails app.

An ideal outcome there would be that local testing pulls styles from staging, then if that's all working, we have to merge staging>master in map-styles or make changes if needed, then ultimately merge and deploy from map-styles branch master. But then there's still jumping back and forth between repos, which is a drag.

If we assume that somehow the JSON in map-styles was already tested in Rails, then we just shift the problem of hand syncing between two repos off of the dev working on ohm-website onto the cartography team, which is not an ideal use of skills.

cc @erictheise

Sub-issues

Sub-issues

0 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. added
    infrastructure
    on Dec 17, 2024
  2. changed the title [-]Shift to Git submodule or NPM package approach for map-stytle and timeslider deployment[/-] [+]Shift to Git submodule or NPM package approach for map-style and timeslider deployment[/+] on Jan 7, 2025
  3. danrademacher commented on Jan 7, 2025

    @danrademacher
    Author

    As soon as #945 is done, then the main branch of map-styles will always be known-working map style code, and we could implement the git-submodule approach to pulling in those styles.

    @erictheise if at all possible, I would like to keep the default branch in map-styles to be staging as a convenience to cartographers, since that is where 99% of their work will be done and tested.

    When you pull the styles into the website repo, can you check out the main branch in that process?

  4. 1ec5 commented on Jan 7, 2025

    @1ec5
    Member

    If you’re considering Git submodules specifically, please be sure to document that rigorously. Submodules have a way of confusing everyone because they don’t get initialized, fetched, or pulled automatically. I guess the same is true if you end up using a script or package manager instead.

  5. added 3 commits that reference this issue on Feb 5, 2025
  6. erictheise commented on Feb 6, 2025

    @erictheise
    Contributor

    I tried the submodule approach but ended up going with the npm approach. It (map-styles, not timeslider) is working for me locally. Two related draft PRs at OpenHistoricalMap/ohm-website#269 and OpenHistoricalMap/map-styles#32.

  7. added 4 commits that reference this issue on Feb 7, 2025
  8. 3 remaining items

  9. added a commit that references this issue on Feb 24, 2025
  10. added a commit that references this issue on Mar 14, 2025
  11. added theissue type on Mar 16, 2025
  12. moved this from Todo-Unknown path to In Progress in OpenHistoricalMap Dev Planningon Mar 26, 2025
  13. added 2 commits that reference this issue on Apr 8, 2025
  14. added 2 commits that reference this issue on May 6, 2025
  15. changed the title [-]Shift to Git submodule or NPM package approach for map-style and timeslider deployment[/-] [+]Shift to Git submodule or NPM package approach for map-style[/+] on May 16, 2025
  16. danrademacher commented on May 16, 2025

    @danrademacher
    Author

    Let's narrow this ticket down to just the map style, which is done. We can make a new tickets for the timeslider and inspector.

  17. moved this from In Progress to Ready for Staging in OpenHistoricalMap Dev Planningon May 16, 2025
  18. moved this from Ready for Staging to In Production in OpenHistoricalMap Dev Planningon May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

infrastructure

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions