diff --git a/.circleci/config.yml b/.circleci/config.yml index 64a6449..ab5ba07 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,14 +19,16 @@ jobs: - checkout - run: rm -fr dist/ - run: python setup.py sdist + - run: python setup.py bdist_wheel - run: pip install twine - - run: twine upload dist/* + - run: twine upload --username $USERNAME --password $PASSWORD dist/* workflows: version: 2 build_and_test: jobs: - run-tests - build-deploy: + context: pypi requires: - run-tests filters: diff --git a/README.rst b/README.rst index 5eb9345..2693573 100644 --- a/README.rst +++ b/README.rst @@ -9,7 +9,8 @@ Dclick .. image:: https://circleci.com/gh/AnOtterGithubUser/double_click.svg?style=shield :target: https://circleci.com/gh/AnOtterGithubUser/double_click - +.. image:: https://img.shields.io/badge/python-3.7|3.8-blue.svg + :target: https://www.python.org/downloads/ Extend click functionnalities by allowing parameters to be passed in a config file. @@ -51,7 +52,7 @@ With `dclick` you just have to change one line: from dclick import command_with_config from click import option - @command_with_config('path_to_config.json') + @command_with_config() @option('-n', '--n-epochs', type=int) def train(n_epochs): run_training_for(n_epochs): @@ -59,6 +60,12 @@ With `dclick` you just have to change one line: if __name__ == '__main__': train() +`path_to_config.yml` + +.. code-block:: yaml + + n-epochs: 5 + Just be careful that the name in the config matches the name of the option. `dclick` takes care of the rest. You can pass a config as json, yaml or txt. Json and yaml are preferred. diff --git a/setup.py b/setup.py index cc38dbf..1f96a86 100644 --- a/setup.py +++ b/setup.py @@ -55,6 +55,6 @@ test_suite="tests", tests_require=test_requirements, url="https://github.com/anottergithubuser/double_click", - version="0.1.3", + version="0.1.4", zip_safe=False, )