Skip to content

Commit 2c22e5c

Browse files
authored
Merge pull request #203 from RacimoLab/prep
prepare for release
2 parents e7b4da9 + e4f3b90 commit 2c22e5c

File tree

4 files changed

+25
-7
lines changed

4 files changed

+25
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Changelog
22

3-
## unreleased
3+
## 0.3.0 - 2022-08-08
44

5+
* Changed how the CLI is used. Now the model and discriminator
6+
are specified with the -m/--model and -d/--discriminator
7+
options, even when they are required.
58
* Removed DinfModel.feature_shape.
69
* Simplified Discriminator API.
710
* Add progress bars and do logging with `rich`.

dinf/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,8 @@ def __init__(self, subparsers):
693693
self.add_argument_model(parser=group)
694694
self.add_argument_discriminator(parser=group)
695695
group.add_argument(
696-
"output_file",
696+
"-o",
697+
"--output-file",
697698
metavar="output.npz",
698699
type=pathlib.Path,
699700
help="Output data, matching thetas to discriminator predictions.",

docs/_config.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ repository:
1818
path_to_book: docs
1919
branch: main
2020

21-
html:
22-
use_issues_button: true
23-
use_repository_button: true
24-
use_edit_page_button: true
21+
## Jupyter-book uses this to set *some* sphinx config variables, but not all.
22+
## We use sphinx.config.html_theme_options instead.
23+
#html:
24+
# use_issues_button: true
25+
# use_repository_button: true
26+
# use_edit_page_button: true
2527

2628
sphinx:
2729
extra_extensions:
@@ -40,6 +42,18 @@ sphinx:
4042
intersphinx_aliases: _ext
4143

4244
config:
45+
# Jupyter-book also has a "html" top-level config property that can be
46+
# used to set *some* sphinx config variables, but not all.
47+
# Some documented variables will have no effect unless used inside
48+
# sphinx.config.html_theme_options, so we just put everything here.
49+
html_theme_options:
50+
repository_url: https://github.com/RacimoLab/dinf
51+
use_fullscreen_button: true
52+
use_issues_button: true
53+
use_repository_button: true
54+
use_edit_page_button: false
55+
use_download_button: false
56+
4357
autodoc_typehints: description
4458
autodoc_type_aliases:
4559
FeatureCollection: dinf.FeatureCollection

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def test_predict_example(self, tmp_path, sample_target):
292292
{target}
293293
--model {ex}
294294
--discriminator {discriminator_file}
295-
{output_file}
295+
--output-file {output_file}
296296
""".split(),
297297
check=True,
298298
stdout=subprocess.PIPE,

0 commit comments

Comments
 (0)