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

Should we remove generate content from git repo? #1221

Closed
tunetheweb opened this issue Aug 17, 2020 · 3 comments · Fixed by #1230
Closed

Should we remove generate content from git repo? #1221

tunetheweb opened this issue Aug 17, 2020 · 3 comments · Fixed by #1230
Labels
development Building the Almanac tech stack question Further information is requested

Comments

@tunetheweb
Copy link
Member

@HTTPArchive/developers , question for you all:

We auto generate some content, including:

This creates some confusion as searching the code base (e.g. to fix a typo) leads to multiple hits - but only the .md files should be edited. It also means some people edit both .md and .html files when they don't need to.

We could remove these files from the Git repo (and add the relevant .gitignore entries to ensure they are not re-uploaded).

The generated HTML files will still be generated, tested and linted as part of our GitHub action so don't think we lose anything with that.

We should also add the npm run generate to the npm run deploy script as they need to be generated and uploaded to App Engine to actually run the site.

The one downside is developers will now need to run npm run generate to generate these .html files, to be able to run and be able to develop the website. So a developer just making some CSS changes but nothing else, now has an extra step to complete. Do we see that being a problem?

Thoughts?

@tunetheweb tunetheweb added question Further information is requested development Building the Almanac tech stack labels Aug 17, 2020
@tunetheweb tunetheweb added this to the 2020 Platform Development milestone Aug 17, 2020
@borisschapira
Copy link
Contributor

I find it relevant to remove generated elements from the tracked code. In the development context, even for CSS only, I don't think the npm run generate is any more complicated than installing the dependencies via Python and running the web server. If you do the latter, I doni’ think s.o. will have any difficulties with the former.

@ibnesayeed
Copy link
Contributor

I would vote for removing non-source files, unless necessary.

@tunetheweb
Copy link
Member Author

One thing where storing the assets is useful is when EJS upgrades (like in #1225 ) - we can run the script and see no templates have changed and so know the upgrade does not impact us. In the past we've noticed changes to the HTML generated. Not an insurmountable problem, and it is rare, but it is something that is a little tougher if we do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Building the Almanac tech stack question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants