Skip to content

Commit

Permalink
Merge pull request #480 from LAAC-LSCP/cmdline/init
Browse files Browse the repository at this point in the history
docs and test cli call for init command
  • Loading branch information
LoannPeurey authored Jul 9, 2024
2 parents b36d41c + a3cb9e3 commit 05e2849
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

### Added

- docs and tests for init command

## [0.2.2] 2024-06-26

### Added
Expand Down
16 changes: 16 additions & 0 deletions docs/source/tools.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
Basic tools
===========

Dataset initialization
----------------------

This command allows you to create a new and empty dataset, with the correct structure

.. clidoc::

child-project init /path/to/dataset --help

Example:

.. code:: bash
# create a dataset in a folder named mydataset
child-project init mydataset
.. _tools-data-validation:

Data validation
Expand Down
8 changes: 8 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ def test_overview(project):
assert exit_code == 0


def test_init():
shutil.rmtree(PATH, ignore_errors=True)
stdout, stderr, exit_code = cli(
["child-project", "init", PATH]
)
assert exit_code == 0


def test_import_annotations(project):
stdout, stderr, exit_code = cli(
[
Expand Down

0 comments on commit 05e2849

Please sign in to comment.