Skip to content

Commit

Permalink
Lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
randef1ned committed May 4, 2024
1 parent 3940834 commit 29d2202
Show file tree
Hide file tree
Showing 10 changed files with 129 additions and 127 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
name: pkgdown

jobs:
distribution-check:
pkgdown:
runs-on: ubuntu-latest
container:
image: fedora:latest
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
run: |
devtools::document()
devtools::load_all()
pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
pkgdown::build_site_github_pages(new_process = FALSE, install = TRUE)
pkgdown::build_reference(topics = 'random_walk')
shell: Rscript {0}

Expand Down
7 changes: 3 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ Title: Labyrinth: A Simulation of Knowledge Networks
Version: 0.3.0
Date: 2023-12-31
Authors@R: c(
person("Yinchun","Su", role = c("aut", "cre"),
email = "[email protected]"),
person("Junwei", "Han", role = "ctb",
email = "[email protected]"))
person("Junwei","Han", role = c("aut", "cre", "ctb"),
email = "[email protected]"),
person("Yinchun", "Su", role = "aut")
Maintainer: Junwei Han <[email protected]>
Description: One paragraph description of what the package does
as one or more full sentences. I can use Config/testthat/parallel as
Expand Down
5 changes: 4 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## labyrinth v0.3.0

* Updated docs

## labyrinth v0.2.3

* Added `predict()` function
Expand Down Expand Up @@ -51,4 +55,3 @@
## labyrinth v0.0.1

* Initial submission

1 change: 0 additions & 1 deletion R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -358,4 +358,3 @@
#' drug_id <- drug_annot$drug_id
#' hist(table(drug_id))
"drug_annot"

4 changes: 2 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ load_data <- function(required_file) {
user_dir <- R_user_dir("labyrinth", which = "data")
model_path <- file.path(user_dir, required_file)
data_path <- system.file("extdata", required_file, package = "labyrinth")

e <- new.env()
if (file.exists(data_path)) {
load(data_path, envir = e)
Expand All @@ -189,7 +189,7 @@ load_data <- function(required_file) {
}
}
}

variable_name <- ls(envir = e)
return(e[[variable_name[1]]])
}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ I developed and tested `labyrinth` on Fedora Linux version 38 and 39. While this

We recommended these dependencies to be installed:

- **R (≥ 4.3.0)**: We developed this R package using R version 4.3.3.
- **R (≥ 4.3.0)**: We developed this R package using R version 4.3.x.
- **Python**: Python is required for drawing plots in demos. It is recommended to have Python and `seaborn` installed, as the `reticulate` package will use the system's Python installation.
- **OpenMP**: This package uses OpenMP for parallelization and multithreading if OpenMP exists. Having OpenMP installed can significantly improve performance.
- **Intel oneAPI Math Kernel Library (oneMKL)**: This library can further enhance mathematical performance, especially on Intel processors. oneMKL is not required but highly recommended.

It would takes less than ten minutes to install this package. If you encounter any issues while running this package on other operating system, please open an [issue](https://github.com/randef1ned/labyrinth/issues).
It would takes less than ten minutes to install this package. If you encounter any issues while running this package on other operating system, please open an issue.


## Before installation
Expand Down Expand Up @@ -98,7 +98,7 @@ Or you can download the pre-built binary packages from [Releases](https://github

## Usage

Load the package using `library(labyrinth)`. We provide a vignette for the package that can be called using: `vignette("labyrinth")`. Alternatively, you can view the online version on [website](https://labyrinth.yinchun.su/articles/labyrinth) or [GitHub](doc/labyrinth_knit.md). The examples I provided would take several minutes to run on a normal desktop computer. Basically that is all you have to know.
Load the package using `library(labyrinth)`. We provide a vignette for the package that can be called using: `vignette("labyrinth")`. Alternatively, you can view the online version on [GitHub](doc/labyrinth_knit.md), or [`pkgdown` documentation](https://labyrinth.yinchun.su/articles/labyrinth). The examples I provided would take several minutes to run on a normal desktop computer. Basically that is all you have to know.

[This documentation](doc/training_knit.md) contains information about the contents and the necessary information for training the model used in this project. The `tools/` folder contains all the code and scripts required for constructing your own model, so that you can understand the technical details. Besides, you can refer to [this documentation](doc/preface_knit.md) for the background and inspirations behind the overall workflow of `labyrinth.

Expand Down
12 changes: 4 additions & 8 deletions doc/labyrinth_knit.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ WSL](https://github.com/WhitewaterFoundry/Fedora-Remix-for-WSL).

To get started, you will need to prepare the following dependencies.

1. **Fedora** or **Red Hat Enterprise Linux** with or without WSL.
1. **Fedora** or **Red Hat Enterprise Linux** with or without WSL.

2. **R 4.3**.
2. **R 4.3**.

3. **Required libraries**.
3. **Required libraries**.

``` r
# pROC ggthemes
Expand Down Expand Up @@ -225,11 +225,7 @@ p1 + p2 + plot_layout(guides = 'collect') +
theme(legend.position = 'bottom')
```

<div class="figure">

<img src="img/unnamed-chunk-5-1.png" />
</div>
![](img/unnamed-chunk-5-1.png)
![Figure 3](../vignettes/img/unnamed-chunk-5-1.png)

### Reproducibility statement

Expand Down
2 changes: 1 addition & 1 deletion doc/preface_knit.md
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ fields, which is defined as the number of articles retrieved using

<div class="figure">

<img src="img/banana.png" alt="\label{fig:banana}**Bibliometric analysis for drug repurposing. **Drug repurposing gains significant attention since 2010. We adopted banana scale to depict this trend." width="100%" />
<img src="../vignettes/img/banana.png" alt="\label{fig:banana}**Bibliometric analysis for drug repurposing. **Drug repurposing gains significant attention since 2010. We adopted banana scale to depict this trend." width="100%" />
<p class="caption">
**Bibliometric analysis for drug repurposing. **Drug repurposing gains
significant attention since 2010. We adopted banana scale to depict this
Expand Down
Loading

0 comments on commit 29d2202

Please sign in to comment.