From d72100721ac0b6cb1144191cf5dacc9c060ab3aa Mon Sep 17 00:00:00 2001 From: nialov Date: Wed, 22 Sep 2021 14:39:38 +0300 Subject: [PATCH] fix(cli): fix fractopo network entrypoint Added the entrypoint to pyproject.toml and updated docs and changelog with new version. --- CHANGELOG.md | 4 ++-- CITATION.cff | 4 ++-- README.rst | 33 ++++++++++++++++++++++++--------- fractopo/__init__.py | 2 +- pyproject.toml | 4 ++-- 5 files changed, 31 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c558e1aa..95b1da02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,9 @@ # Changelog -## Unreleased (2021-09-20) +## v0.2.1 (2021-09-22) Full set of changes: -[`v0.2.0...27f32ad`](https://github.com/nialov/fractopo/compare/v0.2.0...27f32ad) +[`v0.2.0...v0.2.1`](https://github.com/nialov/fractopo/compare/v0.2.0...v0.2.1) ## v0.2.0 (2021-09-20) diff --git a/CITATION.cff b/CITATION.cff index 42ee6390..d5007e99 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -6,8 +6,8 @@ authors: given-names: Nikolas orcid: "https://orcid.org/0000-0003-1562-0280" title: fractopo -version: "0.2.0.post5.dev0+27f32ad" -date-released: "2021-09-20" +version: "0.2.1" +date-released: "2021-09-22" keywords: - python - data diff --git a/README.rst b/README.rst index 1d674d69..242bd5a4 100644 --- a/README.rst +++ b/README.rst @@ -116,8 +116,9 @@ Trace and target area data can be validated for further analysis with a validated_trace_data = validation.run_validation() Trace validation is also accessible as a command-line script, -``tracevalidate`` which is more straightforward to use than through -Python calls. +``fractopo tracevalidate`` which is more straightforward to use than through +Python calls. Note that all subcommands of ``fractopo`` are available by +appending them after ``fractopo``. ``tracevalidate`` always requires the target area that delineates trace data. @@ -126,23 +127,23 @@ data. # Get full up-to-date script help - tracevalidate --help + fractopo tracevalidate --help # Basic usage: - # --fix is recommended due to automatic fixing being very minor in effect - # currently + # --allow-fix is recommended due to automatic fixing being very minor in effect + # currently (default True) + # --summary can be given to print out summary data of validation + # i.e. error types and error counts (default True) # --output can be omitted. By default the same spatial filetype # as the input is used and the output is saved as e.g. # /path/to/validated/trace_data_validated.shp # i.e. a new folder is created (or used) for validated data - # --summary can be given to print out summary data of validation - # i.e. error types and error counts - tracevalidate /path/to/trace_data.shp /path/to/target_area.shp --fix --output /path/to/output_data.shp + fractopo tracevalidate /path/to/trace_data.shp /path/to/target_area.shp --fix --output /path/to/output_data.shp # Or with automatic saving to validated/ directory - tracevalidate /path/to/trace_data.shp /path/to/target_area.shp --fix --summary + fractopo tracevalidate /path/to/trace_data.shp /path/to/target_area.shp --fix --summary Geometric and topological trace network analysis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -184,6 +185,20 @@ visualizing different parameters and attributes of trace data. # Plotting is done by plot_ -prefixed methods network.plot_trace_lengths() +Network analysis is also available as a command-line script but I recommend +using a Python interface (e.g. ``jupyter lab``, ``ipython``) when analysing +``Networks`` to have access to all available analysis and plotting methods. The +command-line entrypoint is opinionated in what outputs it produces. Brief +example of command-line entrypoint: + +.. code:: bash + + fractopo network traces.gpkg area.gpkg --name mynetwork\ + --circular-target-area --truncate-traces + + # Use --help to see all up-to-date arguments and help + fractopo network --help + Development status ------------------ diff --git a/fractopo/__init__.py b/fractopo/__init__.py index c3ae2b74..92e9f984 100644 --- a/fractopo/__init__.py +++ b/fractopo/__init__.py @@ -16,7 +16,7 @@ from fractopo.analysis.network import Network # noqa: E402 from fractopo.tval.trace_validation import Validation # noqa: E402 -__version__ = "0.2.0.post5.dev0+27f32ad" +__version__ = "0.2.1" logging.info( diff --git a/pyproject.toml b/pyproject.toml index 10ccad60..652a8302 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "fractopo" -version = "0.2.0.post11.dev0+dde1603" +version = "0.2.1" description = "Fracture Network Analysis" authors = ["nialov "] readme = "README.rst" @@ -184,4 +184,4 @@ ignore-imports = true python_version = "3.8" warn_return_any = true warn_unused_configs = true -ignore_missing_imports = true +ignore_missing_imports = true \ No newline at end of file