Skip to content

Conversation

@bhargav-j47
Copy link

@bhargav-j47 bhargav-j47 commented Nov 8, 2025

this PR adds feature #2297, fixes #2297

PR introduces following changes:
Automates the generation of the release roadmap SVG using a Python script and json.
changes download page from release-roadmap.png to release-roadmap.svg

Copy link
Contributor

@sarahboyce sarahboyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! This is really strong

I have added some suggestions to make it easier to generate future svgs and how to make the generated image a little closer to the existing image

I think once we're happy with the generated image, we might want to consider writing a few tests

@bhargav-j47
Copy link
Author

Hi , thank you for the review . I have added suggested changes , please do let me know if anything needs to be added

Copy link
Contributor

@sarahboyce sarahboyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have suggested changes which would end up generating the following image

image

After commiting suggestions you will need to update the current image committed by re-running the command.
A nice to have would be if we can end the graph one line earlier and add a fade out 🤔
We still have some minor discrepancies but I think it's "close enough"

@bhargav-j47
Copy link
Author

bhargav-j47 commented Nov 19, 2025

commited the suggested changes
-added fade at last of graph
-graph now ends one line earlier
-done changes to match the style of svg with old png

with changes release-roadmap.svg looks like this
release-roadmap

Copy link
Contributor

@sarahboyce sarahboyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates @bhargav-j47 !

If we can have the "April", "August", "December" labels on being on the lines as in the original image, I think that would be amazing ✨

I think this is ready for a review from the website WG 👍

@sarahboyce sarahboyce requested a review from a team November 19, 2025 16:13
Copy link
Contributor

@sarahboyce sarahboyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized the LTS extended support is all about 8 months too short, can you update (also update the svg)?

bhargav-j47 and others added 4 commits November 19, 2025 22:24
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
Co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>

{% block og_title %}Download Django{% endblock %}
{% block og_image %}{% static "img/release-roadmap.png" %}{% endblock %}
{% block og_image %}{% static "img/release-roadmap.svg" %}{% endblock %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The base.html template hardcodes the content type of og_image to png:

<meta property="og:image:type" content="image/png" />

We should create a new og_image_type block that defaults to png but that we override for this template to use svg.

Comment on lines +33 to +35
OUTPUT_FILE = os.path.join(
BASE_DIR, "..", "djangoproject", "static", "img", "release-roadmap.svg"
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: Can we use pathlib.Path for all path manipulations in this file? This would let us use OUTPUT_file.write_text(...) later on.

Comment on lines +161 to +165
def add_months(date: dtime.date, months: int) -> dtime.date:
year = date.year + (date.month - 1 + months) // 12
month = (date.month - 1 + months) % 12 + 1
day = min(date.day, calendar.monthrange(year, month)[1])
return dtime.date(year, month, day)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: It seems that we already pull python-dateutil as a dependency somehow (looking at pip freeze | grep dateutil), so we could add it to our requirements file explicitly and use it here:

from dateutil.relativedelta import relativedelta
release_date + relativedelta(months=8)

"--first-release", required=True, help="First release number, e.g., 4.2"
)
parser.add_argument(
"--date", required=True, help="Release date in YYYY-MM format, e.g., 2023-04"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: You could use argparse's type parameter to have this automatically be converted to a date object: https://docs.python.org/3/library/argparse.html#type

Copy link
Member

@bmispelon bmispelon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I clicked the wrong button and left individual comments rather than a review 🤦🏻

I left a few suggestions, some stronger than others (the content type issue for the og_image should really be fixed, the others are optional).

I also noticed two visual differences with the previous png image, not sure if it's been discussed already but I thought I'd point them out:

  • The legend texts ("Mainstream support" and "Extended support") are not centered anymore, they seem to be left-aligned
  • The month names are now horizontal instead of vertical as they were before, was that intentional?

Finally, in terms of code layout I'm a bit wary about adding a new tools directory. Could we make this a management command inside the existing releases app?

Thanks again for your work! 🎸

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.

Generate the release roadmap image

3 participants