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

/render_resultsエンドポイントの追加 #212

Merged
merged 49 commits into from
Sep 14, 2018

Conversation

Cj-bc
Copy link
Member

@Cj-bc Cj-bc commented Sep 14, 2018

変更内容

  • 発表用データを返す/render_resultsエンドポイントを作成した

  • TIMEPOINTS+1分(TIMEPOINT_END_MARGIN)後にアクセスすると、抽選結果が張り出せる形で出力されます。

  • 張り出しまでの流れ

    1. 応募する
    2. 抽選する
    3. /render-resultsにアクセスする
    4. PDFとして保存する(A0サイズで)
  • 発表用媒体(PDF, etc)を返すエンドポイントを作成 #183

修正前の挙動:

  • このPRを作る前はどうだったのか。

修正後の挙動:

  • あなたのローカルで再現できている挙動について書いてください。

影響範囲

  • 今回の変更部分以外に、この変更が影響を与えそうなところがあったら書いてください

…us time index

This method would work like this:

|-- TIME_POINTS[0]
|
|             |-- TIME_POINTS[1]
|             |
|             ||-- TIMEPOINT_END_MARGIN
|             ||
|             ||   |-- DRAWWING_TIME EXTENSION
|             ||   |
|             ||   |       |-- Void time (annoucements, the show is going...)
|             ||   |       |
v  index: x   vv   v       v          index: y                      index: z
|=============|-|******|         |=============|-|******|         |=============|-|
              |++++++++++++++++++++++++++++++++|
                                               |________________________________|

In the range of |+|, `get_prev_time_index` will return `x`.
In the range of |_|, `get_prev_time_index` will return `y`.
The diagram on the commit message was wrong,
so DON'T PREFER TO IT.
Instead, see notes.
you can show notes by using:
```
git notes show 3fb5c1a
```
…dex'

Test whether it fail when the time is out of acceptable range
…e edge of range

If I do `ends[i] <= time <= ends[i+1]`,
This expression will be True twice when `time` is the same as
`ends[i+1]` because that would be the same as `ends[i] for the
next expression.

Of cource, this conflict won't work because of looping,
But it is not good idea to leave things confusing, right?
So I fixed it
'data' will be thrown to the jinja2 template
it's because the way generating PDF could be hard to do in such a
limited time.
I found that wkhtmltopdf doesn't treat CSS on alpine.
It'll take more times to solve
@Cj-bc Cj-bc added the enhancement New feature or request label Sep 14, 2018
client = client()


id_list = load_id_json_file(Path(__file__).parent.parent / Path('cards/test_users.json'))

Choose a reason for hiding this comment

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

line too long (89 > 79 characters)

client = client()


id_list = load_id_json_file(Path(__file__).parent.parent/ Path('cards/test_users.json'))

Choose a reason for hiding this comment

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

missing whitespace around operator
line too long (88 > 79 characters)

@Sakuten-Automation Sakuten-Automation temporarily deployed to sakuten-api-dev-pr-212 September 14, 2018 11:19 Inactive
@Sakuten-Automation Sakuten-Automation temporarily deployed to sakuten-api-dev-pr-212 September 14, 2018 11:22 Inactive
@codeclimate
Copy link

codeclimate bot commented Sep 14, 2018

Code Climate has analyzed commit 15875c2 and detected 0 issues on this pull request.

View more on Code Climate.

@shino16 shino16 merged commit ca9345a into develop Sep 14, 2018
@shino16 shino16 deleted the feature/183-generate-media-to-announce branch September 14, 2018 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants