Skip to content

Commit

Permalink
Release/1.1.1 (#94)
Browse files Browse the repository at this point in the history
* Update change log

* Update version

* Fix bug around version notification

* Update README
  • Loading branch information
kyuridenamida authored Feb 14, 2019
1 parent 75b629e commit 6a52363
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 9 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## 1.1.1 / 2018-02-14
- [#84](https://github.com/kyuridenamida/atcoder-tools/pull/84) Output stdout even when getting RE or TLE.
- [#86](https://github.com/kyuridenamida/atcoder-tools/pull/86) Support Rust
- Thanks for [@fukatani](https://github.com/fukatani/)'s contribution and [@koba-e964](https://github.com/koba-e964/)'s code review!
- [#88](https://github.com/kyuridenamida/atcoder-tools/pull/88) Fix a bug you can't specify a code to submit by --code for submit command.
- [#92](https://github.com/kyuridenamida/atcoder-tools/pull/92) Add unit tests to check if the default templates / code generators are correct, including a bug fix of Java code generator about two-dimensional input.


## 1.1.0 / 2018-01-18
This version includes a breaking change. Deleting --replacement parameter requires some changes in your template. See [#79](https://github.com/kyuridenamida/atcoder-tools/pull/79).
- [#80](https://github.com/kyuridenamida/atcoder-tools/pull/80) Anything configurable from command line is configurable from toml
Expand Down
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ Python 3.5 以降で動作する [AtCoder](http://atcoder.jp/) からサンプ
- AtCoderへのログイン,入出力例データなどの抽出
- 枝刈り探索による高精度・高速な入力フォーマット解析 (ARC、ABC、AGCについては約9割ほど)
- 問題文中に含まれるMOD値やYES/NO文字列等の定数値抽出
- 入力フォーマット解析結果や抽出した定数値を用いたテンプレートコードの自動生成(C++, Java, Rust)
- コード提出機能
- 入力フォーマット解析結果や抽出した定数値を用いたテンプレートからのコード自動生成(以下の表に記載されている言語をサポートしています)
- カスタムテンプレートに対応
- 他言語対応のためのコントリビューション(≒中間形式からコードに変換する部分のPR)を募集中です!
- コード提出機能

|対応言語 |Contributor 1|Contributor 2|
|:---:|:---:|:---:|
|C++|[@kyuridenamida](https://github.com/kyuridenamida/) (generator, template)|[@asi1024](https://github.com/asi1024/) (template)|
|Java|[@kyuridenamida](https://github.com/kyuridenamida/) (generator, template)||
|Rust|[@fukatani](https://github.com/fukatani/) (generator, template)|[@koba-e964](https://github.com/koba-e964/) (template, CR)|

## How to install
`pip3 install atcoder-tools`
Expand Down Expand Up @@ -71,8 +77,10 @@ optional arguments:
--lang LANG Programming language of your template code, cpp or java.
[Default] cpp
--template TEMPLATE File path to your template code
[Default (C++)] /atcoder-tools/atcodertools/tools/templates/cpp/default_template.cpp
[Default (Java)] /atcoder-tools/atcodertools/tools/templates/java/default_template.java
[Default (C++)] /atcodertools/tools/templates/default_template.cpp
[Default (Java)] /atcodertools/tools/templates/default_template.java
[Default (Rust)] /atcodertools/tools/templates/default_template.rs
--parallel Prepare problem directories asynchronously using multi processors.
--save-no-session-cache
Save no session cache to avoid security risk
Expand Down Expand Up @@ -224,3 +232,6 @@ int main(){
## Author

[kyuridenamida](https://github.com/kyuridenamida) ([@kyuridenamida](https://twitter.com/kyuridenamida))

## 免責
このソフトウェア等に起因するいかなる損害に対しても、[@kyuridenamida](https://github.com/kyuridenamida)並びにこのソフトウェアの開発者達は何ら責任を負いません。
2 changes: 1 addition & 1 deletion atcodertools/release_management/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.1.0"
__version__ = "1.1.1"
15 changes: 11 additions & 4 deletions atcodertools/release_management/version_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import time

import requests

from atcodertools.release_management.version import __version__
from atcodertools.fileutils.artifacts_cache import get_cache_file_path


Expand All @@ -26,10 +26,17 @@ def _get_latest_version_cache():
if not os.path.exists(cache_file_path):
return None
with open(cache_file_path, 'r') as f:
version, timestamp_sec = f.read().split()
info = f.read().split()
version, timestamp_sec = info[:2]

if len(info) >= 3:
captured_version = info[2]
else:
captured_version = None

timestamp_sec = float(timestamp_sec)

if time.time() - timestamp_sec > HOUR_IN_SEC:
if time.time() - timestamp_sec > HOUR_IN_SEC or __version__ != captured_version:
return None

return version
Expand All @@ -38,7 +45,7 @@ def _get_latest_version_cache():
def store_version_cache(version):
os.makedirs(os.path.dirname(cache_file_path), exist_ok=True)
with open(cache_file_path, 'w') as f:
f.write("{} {}".format(version, time.time()))
f.write("{} {} {}".format(version, time.time(), __version__))


def get_latest_version(use_cache=True):
Expand Down

0 comments on commit 6a52363

Please sign in to comment.