Skip to content

Commit

Permalink
fix(cli): fix fractopo network entrypoint
Browse files Browse the repository at this point in the history
Added the entrypoint to pyproject.toml and
updated docs and changelog with new version.
  • Loading branch information
nialov committed Sep 22, 2021
1 parent 0411348 commit d721007
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 16 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 24 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -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
------------------

Expand Down
2 changes: 1 addition & 1 deletion fractopo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
readme = "README.rst"
Expand Down Expand Up @@ -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

0 comments on commit d721007

Please sign in to comment.