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

Monthly summary files #11

Open
eford opened this issue Jan 6, 2022 · 1 comment
Open

Monthly summary files #11

eford opened this issue Jan 6, 2022 · 1 comment
Labels

Comments

@eford
Copy link
Member

eford commented Jan 6, 2022

Currently, the pipeline produces daily summary files and all-of-time summary files. It would be nice to also have monthly summaries. It's not obvious to me how to set that up in Snakemake.
(Once someone figures this out, they can probably make a weekly version without much more work.)

@eford eford added when someone has time enhancement New feature or request labels Jan 6, 2022
@jinglinzhao
Copy link

Using this example code can at least return the corresponding days of a month.

from datetime import timedelta, date

def daterange(start_date, end_date):
for n in range(int ((end_date - start_date).days +1)):
yield start_date + timedelta(n)

start_date = date(2020, 6, 1)
end_date = date(2020, 6, 30)

for single_date in daterange(start_date, end_date):
print(single_date.strftime("%Y-%m-%d"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants