Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: piotrbajdek/coprosize
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.3
Choose a base ref
...
head repository: piotrbajdek/coprosize
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 2 commits
  • 12 files changed
  • 1 contributor

Commits on Jan 31, 2023

  1. Add files via upload

    piotrbajdek authored Jan 31, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    eda0565 View commit details

Commits on Jun 5, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b4361b6 View commit details
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "coprosize"
version = "1.0.3"
version = "1.0.4"
authors = ["Piotr Bajdek <piotr.bajdek@proton.me>"]
edition = "2021"
description = "coprolite research (paleontology and archaeology): estimate the producer's body mass based on coprolite diameter by the use of regression models"
56 changes: 26 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# INTRODUCING COPROSIZE

[coprosize](https://github.com/piotrbajdek/coprosize) employs power, exponential and cubic regression models allowing to estimate the producer's body mass based on coprolite diameter. Models can be chosen accordingly to the supposed producer's taxon (at this stage of program development, only tetrapod models are implemented) and its diet type (carnivorous, herbivorous, omnivorous, unspecified). Implemented regression formulae are provided in [Supplement 1. Regression models](https://github.com/piotrbajdek/coprosize/blob/main/docs/supplement-1.ods) and constructed based on the data given in [Supplement 2. Scat diameters and body masses](https://github.com/piotrbajdek/coprosize/blob/main/docs/supplement-2.ods).
[coprosize](https://github.com/piotrbajdek/coprosize) uses power, exponential, and cubic regression models to estimate the body mass of the producer based on coprolite diameter. These models can be selected based on the suspected taxonomy of the producer (currently limited to tetrapod models) and its dietary type (carnivorous, herbivorous, omnivorous, or unspecified). The regression formulae utilised are described in detail in [Supplement 1. Regression models](https://github.com/piotrbajdek/coprosize/blob/main/docs/supplement-1.ods) and were constructed using data found in [Supplement 2. Scat diameters and body masses](https://github.com/piotrbajdek/coprosize/blob/main/docs/supplement-2.ods).

As it is aimed for science, [coprosize](https://github.com/piotrbajdek/coprosize) is written in Rust. The reasons for this choice are (1) the high code correctness guaranteed by Rust, (2) to ensure that each program version will be accessible in the [registry](https://docs.rs/crate/coprosize/latest) 'in perpetuity' and (3) that each program version will remain easily installed and cross-platform 'in perpetuity', thanks to the Rust's strict policy of backwards compatibility.
To meet the demands of the scientific community, coprosize was created using Rust. This choice was made for the following reasons: to ensure the code produced has a high level of accuracy, to maintain the accessibility of program versions in the [registry](https://docs.rs/crate/coprosize/latest) forever, and to make it easy to install and use on various platforms due to Rust's strict policy of maintaining backwards compatibility.

[keywords (en-AU): animal scats, archaeology, biology, body mass, body size, coprolites, dung, fossil faeces, fossils, geology, ichnology, palaeontology, scientific computing, weight; (en-US): fossil feces, paleontology]

@@ -18,17 +18,17 @@ As it is aimed for science, [coprosize](https://github.com/piotrbajdek/coprosize

# CITATION AND REUSE

Please, always refer to a specific program version--implemented formulae are subject to change if new data are available (or simply studied by the author) or bugs of any kind are detected. Although coprosize is designed with the needs of a user in mind, you are perfectly OK to use my models in your study without really installing it as long as you cite this computer program as the original source:
When citing coprosize in research, it's essential to mention the exact program version. The formulae implemented may change with the availability of new data or bug fixes. coprosize is designed for ease of use, but it's still appropriate to use the models in your research without installation, as long as proper credit is given to the software as the source.

Bajdek, P., 2023. coprosize (version 1.0.3). [computer software] https://github.com/piotrbajdek/coprosize
Bajdek, P., 2023. coprosize (version 1.0.4). [computer software] https://github.com/piotrbajdek/coprosize

You are also OK to modify and fork coprosize under terms of the [MIT License](https://github.com/piotrbajdek/coprosize/blob/main/LICENSE.md). It is moreover possible to link against coprosize using its library as a dependency for other bioinformatics projects (see [public functions](https://docs.rs/coprosize/1.0.3/coprosize/#functions)). The usage is best explained by example:
coprosize can be modified and forked under the terms of the [MIT License](https://github.com/piotrbajdek/coprosize/blob/main/LICENSE.md). It is moreover possible to link against coprosize using its library as a dependency for other bioinformatics projects (see [public functions](https://docs.rs/coprosize/1.0.4/coprosize/#functions)). The usage is best explained by example:

Add to your `Cargo.toml` file:

```
[dependencies]
coprosize = "1.0.3"
coprosize = "1.0.4"
```

Put in your `src/main.rs` file:
@@ -45,68 +45,64 @@ println!();
coprosize::citation();
}
```
The above program will reuse the internal library of coprosize. Note that the 'diameter' must be given as a _string slice_ (of numbers and optionally including a dot)--the library won't work receiving neither an _integer_ nor a _floating point_.
This program will utilise coprosize's internal library. It's important to note that the 'diameter' must be provided as a _string slice_ (of numeric characters and a dot, if necessary). The library won't function if either an _integer_ or a _floating point_ value is given.

# INSTALLATION ON LINUX

[coprosize](https://github.com/piotrbajdek/coprosize) should run smoothly on **Windows** and **macOS**, and can be installed by the use of [cargo](https://www.rust-lang.org/tools/install). Yet, it is being developed and primarily tested on **Fedora Linux**.
[coprosize](https://github.com/piotrbajdek/coprosize) is designed to be compatible with **Windows** and **macOS**, and can be easily installed using [cargo](https://www.rust-lang.org/tools/install). However, the primary development and testing environment for coprosize is **Fedora Linux**.

coprosize v1.0.3:
The current version of coprosize (v1.0.4) has been verified to work properly on Fedora Linux 37 and Ubuntu 22.10.

– Was successfully tested on Fedora Linux 37, openSUSE Tumbleweed, and Ubuntu 22.10.
## METHOD 1 – USING CARGO

– Failed to run on Mageia 8 due to an old glibc version (required ≥2.34).
**[Recommended for programmers]**

## METHOD 1 – BY THE USE OF CARGO

**[recommended for programmers]**

**1.** Install from crates.io by the use of cargo:
**1.** To install coprosize from [crates.io](https://crates.io/crates/coprosize), use the following cargo command:

_cargo install coprosize_

By default, the file will be downloaded to `.cargo/bin/`, a hidden folder in your home directory.
The executable will be saved in the hidden `.cargo/bin/` directory within your home directory.

**2a.** For convenience, you will probably want to copy coprosize to `/usr/bin/` as in Method 2 (3a, 3b).
**2a.** For easy access, you may want to copy the coprosize file to the `/usr/bin/` directory. This can be done by following the instructions in Method 2 (3a, 3b).

**2b.** Alternatively, add `~/.cargo/bin` directory to your PATH variable (can be set up by [rustup](https://www.rust-lang.org/tools/install)).
**2b.** As an alternative, you can add the `~/.cargo/bin/` directory to your system's PATH variable, which can be configured using [rustup](https://www.rust-lang.org/tools/install).

## METHOD 2 – LINUX UNIVERSAL BINARIES
## METHOD 2 – UNIVERSAL LINUX BINARIES

**1.** Download the distro-independent [binary](https://github.com/piotrbajdek/coprosize/releases/download/v1.0.3/coprosize) of coprosize from GitHub.
**1.** To install coprosize, first download the distro-independent [binary](https://github.com/piotrbajdek/coprosize/releases/download/v1.0.4/coprosize) from GitHub.

**2.** Make the file executable:
**2.** Then, make the file executable by running the command:

_sudo chmod +x ./coprosize_

**3a.** On most Linux distros, install coprosize via copying the binary to `/usr/bin/`:
**3a.** On most Linux distributions, install coprosize by copying the binary to `/usr/bin/`:

_sudo cp coprosize /usr/bin/_

**3b.** On Fedora Silverblue / Kinoite:
**3b.** For Fedora Silverblue / Kinoite, use this command:

_sudo cp coprosize /var/usrlocal/bin/_

## METHOD 3 – DISTRO-SPECIFIC PACKAGES

**[recommended for most users]**
**[Recommended for most users]**

Distro-specific packages are also available for download for [.rpm](https://github.com/piotrbajdek/coprosize/releases/download/v1.0.3/coprosize-1.0.3-1.x86_64.rpm)- and [.deb](https://github.com/piotrbajdek/coprosize/releases/download/v1.0.3/coprosize_1.0.3_amd64.deb)-based Linux distros. Installation instructions:
Distro-specific packages for [.rpm](https://github.com/piotrbajdek/coprosize/releases/download/v1.0.4/coprosize-1.0.4-1.x86_64.rpm) and [.deb](https://github.com/piotrbajdek/coprosize/releases/download/v1.0.4/coprosize_1.0.4_amd64.deb)-based Linux distributions are also available for download. To install coprosize on different Linux distributions, follow these instructions:

Fedora Linux / RHEL / openSUSE:

_sudo rpm -i coprosize-1.0.3-1.x86_64.rpm_
_sudo rpm -i coprosize-1.0.4-1.x86_64.rpm_

Fedora Silverblue / Kinoite:

_rpm-ostree install coprosize-1.0.3-1.x86_64.rpm_
_rpm-ostree install coprosize-1.0.4-1.x86_64.rpm_

Ubuntu:

_sudo dpkg -i coprosize_1.0.3_amd64.deb_
_sudo dpkg -i coprosize_1.0.4_amd64.deb_

## METHOD 4 – MANUAL COMPILATION

Download and unpack the coprosize [source](https://github.com/piotrbajdek/coprosize/archive/refs/tags/v1.0.3.zip) from GitHub. Then, build and install the program:
First, download and unpack the coprosize [source code](https://github.com/piotrbajdek/coprosize/archive/refs/tags/v1.0.4.zip) from GitHub. Next, to build and install the program, use the command:

_cargo build \--release && sudo cp target/release/coprosize /usr/bin/_
Binary file modified docs/images/example-image-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/example-image-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/help-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/supplement-1.ods
Binary file not shown.
Binary file modified docs/supplement-2.ods
Binary file not shown.
452 changes: 226 additions & 226 deletions src/lib.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/list.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COPROSIZE VERSION 1.0.3 / MIT LICENSE © 2022–2023 PIOTR BAJDEK
// COPROSIZE VERSION 1.0.4 / MIT LICENSE © 2022–2023 PIOTR BAJDEK

// MODULE LIST

2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// COPROSIZE VERSION 1.0.3 / MIT LICENSE © 2022–2023 PIOTR BAJDEK
// COPROSIZE VERSION 1.0.4 / MIT LICENSE © 2022–2023 PIOTR BAJDEK

// MAIN FILE

105 changes: 53 additions & 52 deletions src/menu.rs

Large diffs are not rendered by default.