Skip to content

Update installation docs#821

Closed
ivan9989-pkj wants to merge 4 commits intotorrust:developfrom
ivan9989-pkj:811-updatelibrs
Closed

Update installation docs#821
ivan9989-pkj wants to merge 4 commits intotorrust:developfrom
ivan9989-pkj:811-updatelibrs

Conversation

@ivan9989-pkj
Copy link
Copy Markdown

@ivan9989-pkj ivan9989-pkj commented Apr 29, 2024

Update installation docs.

We updated the installation part of lib.rs and changed some other small bugs in the Configuration part.
Update on the fmt charge
We update the library with new data
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 29, 2024

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 78.93%. Comparing base (92349d3) to head (2b78e01).

Files Patch % Lines
src/lib.rs 80.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #821      +/-   ##
===========================================
+ Coverage    78.91%   78.93%   +0.02%     
===========================================
  Files          163      163              
  Lines         9186     9196      +10     
===========================================
+ Hits          7249     7259      +10     
  Misses        1937     1937              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Member

@josecelano josecelano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ivan9989-pkj there are some things that have to be fixed.

Comment thread src/lib.rs
Comment on lines 161 to 163
//! In order to run the tracker you need to provide the configuration. If you run the tracker without providing the configuration,
//! the tracker will generate the default configuration the first time you run it. It will generate a `tracker.toml` file with
//! the tracker will generate the default configuration the first time you run it. It will generate a `Cargo.toml` file with
//! in the root directory.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ivan9989-pkj, this is not true anymore. Now, the tracker uses the default config file ./share/default/config/tracker.development.sqlite3.toml.

You can use any name for the config file, but we usually use this name tracker.toml or config.toml but never Cargo.toml. That's the Rust crate config file.

Comment thread src/lib.rs
//! For more information about each service and options you can visit the documentation for the [torrust-tracker-configuration crate](https://docs.rs/torrust-tracker-configuration).
//!
//! Alternatively to the `tracker.toml` file you can use one environment variable `TORRUST_TRACKER_CONFIG` to pass the configuration to the tracker:
//! Alternatively to the `Cargo.toml` file you can use one environment variable `TORRUST_TRACKER_CONFIG` to pass the configuration to the tracker:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change Cargo.toml to tracker.toml.

Comment thread src/lib.rs
//!
//! ```text
//! TORRUST_TRACKER_CONFIG=$(cat tracker.toml)
//! TORRUST_TRACKER_CONFIG=$(cat Cargo.toml)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change Cargo.toml to tracker.toml.

Comment thread src/lib.rs
//! ```
//!
//! In the previous example you are just setting the env var with the contents of the `tracker.toml` file.
//! In the previous example you are just setting the env var with the contents of the `Cargo.toml` file.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change Cargo.toml to tracker.toml.

Comment thread src/lib.rs
//! In the previous example you are just setting the env var with the contents of the `Cargo.toml` file.
//!
//! The env var contains the same data as the `tracker.toml`. It's particularly useful in you are [running the tracker with docker](https://github.com/torrust/torrust-tracker/tree/develop/docker).
//! The env var contains the same data as the `Cargo.toml`. It's particularly useful in you are [running the tracker with docker](https://github.com/torrust/torrust-tracker/tree/develop/docker).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change Cargo.toml to tracker.toml.

Comment thread src/lib.rs
//! The env var contains the same data as the `Cargo.toml`. It's particularly useful in you are [running the tracker with docker](https://github.com/torrust/torrust-tracker/tree/develop/docker).
//!
//! > NOTE: The `TORRUST_TRACKER_CONFIG` env var has priority over the `tracker.toml` file.
//! > NOTE: The `TORRUST_TRACKER_CONFIG` env var has priority over the `Cargo.toml` file.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change Cargo.toml to tracker.toml.

Comment thread src/lib.rs
Comment on lines +126 to +129
//! ```text
//! mkdir torrust
//! cd torrust/
//! ```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove the indentation.

mkdir torrust
cd torrust

Comment thread src/lib.rs
//!
//! By default the tracker uses `SQLite` and the database file name `data.db`.
//!
//! We will have to have a file to save the torrust-tracker, which we will call "torrust".
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"We need a folder to clone the repository".

Folder not file.

@josecelano josecelano changed the title 811 updatelibrs Update installation docs Apr 30, 2024
@josecelano
Copy link
Copy Markdown
Member

Hi @ivan9989-pkj I've resolved these issues in a new PR.

@josecelano josecelano closed this May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants