Skip to content

Conversation

@ericdill
Copy link
Contributor

cc @jaimergp I think this is a bit simpler and should work? could use a careful review though

@ericdill ericdill requested a review from jaimergp June 28, 2023 17:19
if wednesday.date() == today.date():
print("Match! Job should run.")
import datetime, sys
year, week, weekday = dt.isocalendar()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
year, week, weekday = dt.isocalendar()
year, week, weekday = datetime.today().isocalendar()

You mean this, right?

Comment on lines +56 to +63
if week % 2 == 0:
# conda forge meeting on even weeks
print("conda-forge meeting match! Job should run.")
with open(os.environ['GITHUB_ENV'], 'a') as f:
print("should_run=yes", f)
elif wednesday > today:
print("Didn't match. Aborting.")
break
else:
# conda community meeting on odd weeks
print('conda community meeting!')
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, I checked and we do:

  • conda-forge on even weeks
  • conda-incubator on odd weeks

So for this repo we need to reverse the logic, but for conda-forge we need to migrate it. The problem is that we have been creating the meeting notes with some days in advance now (sometimes as soon as the meeting was over), so we need to do the check not for "today" but for the next even Wednesday.

So all in all I feel that this daily logic is not serving the community needs anymore. We probably need something like:

# runs every Thursday
if week_is_even:
  date = next_even_wednesday()
  export_date_to_env()
else:
  exit 0  # do not run and wait for next week

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.

3 participants