Skip to content

Commit

Permalink
Merge pull request #31 from davidycliao/0.0.6
Browse files Browse the repository at this point in the history
UPDATE 0.0..6
  • Loading branch information
davidycliao authored Nov 15, 2023
2 parents c782c2c + aa863f1 commit 64aafaf
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 125 deletions.
69 changes: 0 additions & 69 deletions .github/workflows/r_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,75 +5,6 @@
#
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.
#
# name: R-MacOS
#
# on:
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
#
# permissions:
# contents: read
#
# jobs:
# build:
# runs-on: macos-latest
# strategy:
# matrix:
# r-version: ['4.3.2', '4.2.0', '4.2.1'] # Ensure these versions are available
#
# steps:
# - uses: actions/checkout@v3
#
# - name: Install pandoc
# run: brew install pandoc
#
# - name: Set up R ${{ matrix.r-version }}
# uses: r-lib/actions/setup-r@v2
# with:
# r-version: ${{ matrix.r-version }}
#
# - name: Install R dependencies
# run: |
# install.packages(c("remotes", "rcmdcheck", "reticulate"))
# remotes::install_deps(dependencies = TRUE)
# shell: Rscript {0}
#
# # Set up Python environment
# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: '3.10.x' # Python version specified
#
# - name: Install Python virtualenv
# run: pip install virtualenv
#
# - name: Create Python virtual environment
# run: virtualenv flair_env
#
# - name: Install Python dependencies in virtual environment
# run: |
# source flair_env/bin/activate
# pip install flair
#
# # After setting up R
# - name: Restore R packages with renv
# run: |
# install.packages("renv")
# renv::restore()
# shell: Rscript {0}
#
# # Optionally, add a step to install LaTeX if PDF documentation is needed
# - name: Install LaTeX
# run: brew install --cask mactex
#
#
# - name: Check R package
# run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
# shell: Rscript {0}


name: R-MacOS

Expand Down
47 changes: 0 additions & 47 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -434,53 +434,6 @@ install_python_package <- function(package_name, package_version = NULL, python_
}
}


# install_python_package <- function(package_name, package_version = NULL, python_path = Sys.which("python3")) {
# if (python_path == "") {
# stop("Python is not installed, not found in the system PATH, or an incorrect path was provided.")
# } else {
# message("Using Python at: ", python_path)
# }
#
# if (is.null(package_version)) {
# package_ref <- package_name
# warning("The version of the Python package is not defined. The latest version of the package will be installed.")
# } else {
# package_ref <- paste(package_name, "==", package_version, sep = "")
# }
#
# # Upgrade pip before installing the package
# update_pip_command <- paste(python_path, "-m pip install --upgrade pip")
# if (system(update_pip_command, intern = TRUE) != 0) {
# warning("Failed to upgrade pip. Please check your Python installation.")
# }
#
# # Install the specified package
# install_command <- paste(python_path, "-m pip install", package_ref)
# if (system(install_command, intern = TRUE) != 0) {
# stop("Failed to install the package. Please check the command and try again.")
# }
#
# # Check if the package is installed and get the version
# check_version_command <- paste(python_path, "-c 'import", package_name, "; print(", package_name, ".__version__)'")
# package_version_installed <- tryCatch({
# system(check_version_command, intern = TRUE)
# }, error = function(e) {
# NA
# })
#
# if (is.na(package_version_installed)) {
# stop("Failed to install the package or retrieve the version.")
# }
#
# message("Package '", package_name, "' installed successfully, version: ", package_version_installed)
# return(list(
# package_name = package_name,
# package_version = package_version_installed,
# python_path = python_path
# ))
# }

#' @title Uninstall a Python Package
#'
#' @description `uninstall_python_package` function uninstalls a specified Python
Expand Down
10 changes: 5 additions & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ output: github_document

## <u>`flairR`</u>: An R Wrapper for Accessing Flair NLP Library <img src="man/figures/logo.png" align="right" width="180"/>

[![R](https://github.com/davidycliao/flaiR/actions/workflows/r_macos.yml/badge.svg)](https://github.com/davidycliao/flaiR/actions/workflows/r_macos.yml)
[![R-CMD-check](https://github.com/davidycliao/flaiR/actions/workflows/r.yml/badge.svg)](https://github.com/davidycliao/flaiR/actions/workflows/r.yml)
[![R-MacOS](https://github.com/davidycliao/flaiR/actions/workflows/r_macos.yml/badge.svg)](https://github.com/davidycliao/flaiR/actions/workflows/r_macos.yml)
[![R-ubuntu](https://github.com/davidycliao/flaiR/actions/workflows/r_ubuntu.yaml/badge.svg)](https://github.com/davidycliao/flaiR/actions/workflows/r_ubuntu.yaml)
[![R-Windows](https://github.com/davidycliao/flaiR/actions/workflows/r_window.yml/badge.svg)](https://github.com/davidycliao/flaiR/actions/workflows/r_window.yml)

[![R-CMD-Check](https://github.com/davidycliao/flaiR/actions/workflows/r.yml/badge.svg)](https://github.com/davidycliao/flaiR/actions/workflows/r.yml)
[![coverage](https://github.com/davidycliao/flaiR/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/davidycliao/flaiR/actions/workflows/test-coverage.yaml)
[![codecov](https://codecov.io/gh/davidycliao/flaiR/graph/badge.svg?token=CPIBIB6L78)](https://codecov.io/gh/davidycliao/flaiR)
[![CodeFactor](https://www.codefactor.io/repository/github/davidycliao/flair/badge)](https://www.codefactor.io/repository/github/davidycliao/flair)
[![Codespaces Prebuilds](https://github.com/davidycliao/flaiR/actions/workflows/codespaces/create_codespaces_prebuilds/badge.svg)](https://github.com/davidycliao/flaiR/actions/workflows/codespaces/create_codespaces_prebuilds)

<!-- README.md is generated from README.Rmd. Please edit that file -->

Expand Down Expand Up @@ -70,8 +72,6 @@ remotes::install_github("davidycliao/flaiR", force = TRUE)
library(flaiR)
#> flaiR: An R Wrapper for Accessing Flair NLP 0.12
```


<br>


Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

## <u>`flairR`</u>: An R Wrapper for Accessing Flair NLP Library <img src="man/figures/logo.png" align="right" width="180"/>

[![R](https://github.com/davidycliao/flaiR/actions/workflows/r_macos.yml/badge.svg)](https://github.com/davidycliao/flaiR/actions/workflows/r_macos.yml)
[![R-CMD-check](https://github.com/davidycliao/flaiR/actions/workflows/r.yml/badge.svg)](https://github.com/davidycliao/flaiR/actions/workflows/r.yml)
[![R-MacOS](https://github.com/davidycliao/flaiR/actions/workflows/r_macos.yml/badge.svg)](https://github.com/davidycliao/flaiR/actions/workflows/r_macos.yml)
[![R-ubuntu](https://github.com/davidycliao/flaiR/actions/workflows/r_ubuntu.yaml/badge.svg)](https://github.com/davidycliao/flaiR/actions/workflows/r_ubuntu.yaml)
[![R-Windows](https://github.com/davidycliao/flaiR/actions/workflows/r_window.yml/badge.svg)](https://github.com/davidycliao/flaiR/actions/workflows/r_window.yml)

[![R-CMD-Check](https://github.com/davidycliao/flaiR/actions/workflows/r.yml/badge.svg)](https://github.com/davidycliao/flaiR/actions/workflows/r.yml)
[![coverage](https://github.com/davidycliao/flaiR/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/davidycliao/flaiR/actions/workflows/test-coverage.yaml)
[![codecov](https://codecov.io/gh/davidycliao/flaiR/graph/badge.svg?token=CPIBIB6L78)](https://codecov.io/gh/davidycliao/flaiR)
[![CodeFactor](https://www.codefactor.io/repository/github/davidycliao/flair/badge)](https://www.codefactor.io/repository/github/davidycliao/flair)
[![Codespaces
Prebuilds](https://github.com/davidycliao/flaiR/actions/workflows/codespaces/create_codespaces_prebuilds/badge.svg)](https://github.com/davidycliao/flaiR/actions/workflows/codespaces/create_codespaces_prebuilds)

<!-- README.md is generated from README.Rmd. Please edit that file -->

Expand Down

0 comments on commit 64aafaf

Please sign in to comment.