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

ignore the year which has no running data when drawing github.svg #712

Merged
merged 1 commit into from
Sep 22, 2024

Conversation

Narglc
Copy link
Contributor

@Narglc Narglc commented Sep 19, 2024

the last github.svg like:
image

Copy link

vercel bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
running-page ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 22, 2024 9:12am

Comment on lines 91 to 95
def count_with_data(self):
"""Return number of years which has running data"""
return len(self.years_dict)

Copy link
Owner

Choose a reason for hiding this comment

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

can we just make it a property?

like

@Property
def real_year():
pass

Copy link
Contributor Author

Choose a reason for hiding this comment

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

got it!

@@ -37,6 +37,9 @@ def draw(self, dr: svgwrite.Drawing, size: XY, offset: XY):
)
year_length = total_length_year_dict.get(year, 0)
year_length = format_float(self.poster.m2u(year_length))

if year_length == "0.0":
Copy link
Owner

Choose a reason for hiding this comment

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

if str(year_length)

Copy link
Owner

@yihong0618 yihong0618 left a comment

Choose a reason for hiding this comment

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

LGTM

@yihong0618 yihong0618 merged commit 371ce67 into yihong0618:master Sep 22, 2024
6 checks passed
@yihong0618
Copy link
Owner

Thanks

ben-29 added a commit to ben-29/workouts_page that referenced this pull request Sep 29, 2024
* refs/heads/upstream:
  feat: fix nrc Changed their apis (yihong0618#718)
  feat: conditionally output analysis JS only in Vercel environment (yihong0618#715)
  ignore the year which has no running data when drawing github.svg (yihong0618#712)
  Fix AttributeError in Activity class (yihong0618#714)
  doc: fix typo close yihong0618#704
  Some Front Optimization for Keep indoor data (yihong0618#709)
  Add new runner (yihong0618#707)
  feat: adding illustration for special tracks  (yihong0618#705)

# Conflicts:
#	run_page/generator/__init__.py
#	run_page/joyrun_sync.py
jiantian99 pushed a commit to jiantian99/running_page that referenced this pull request Jan 16, 2025
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