Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
^docs$
^data-raw$
^_pkgdown\.yml$
^.*\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
^data/.*\.csv$
92 changes: 92 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Contributing

We welcome contributions! This document provides guidelines for contributing to JournalAnalysis.

## Submitting Bugs

### Before Submitting

Before submitting a bug report, please do the following:

- **Make sure you're on the latest version.** Your problem may have been solved already.
- **Try older versions.** If you're on the latest release, try rolling back a few minor versions to help narrow down when the problem first arose.
- **Search the project's issue tracker** to make sure it's not a known issue.

### Bug Report Contents

Make sure your report includes:

- **Operating system:** Windows? macOS? Linux? Include version details.
- **R version:** Output from `R.version.string` or `sessionInfo()`.
- **Package version:** Output from `packageVersion("JournalAnalysis")`.
- **RStudio version:** If the addin is involved, include your RStudio build.
- **Installation method:** r-universe, GitHub (`devtools::install_github`), or source.
- **Steps to reproduce:** Include a minimal example, the command or addin steps you used, and the full output or error message.

## Contributing Changes

### Licensing

By contributing to this project, you agree that your contributions will be licensed under the same terms as the rest of the project (see the `LICENSE` file in the repository root).

- Per-file copyright/license headers are typically not needed. Please don't add your own copyright headers to new files unless the project's license actually requires them.

### Version Control

- **Always make a new branch** for your work, no matter how small.
- **Don't submit unrelated changes in the same branch/pull request.**
- **Base your branch on `main`** for new features and most bug fixes.
- If your PR has been sidelined for a while, **rebase or merge to latest `main`** before resubmitting.

### Code Formatting

- **Follow the style used in the repository.** Consistency with the rest of the project always trumps other considerations.
- Use snake_case for functions and variables, `<-` for assignment, and 2-space indentation.

### Documentation

Documentation is required for all contributions:

- **Roxygen2 comments** must be created or updated for exported functions.
- **README or pkgdown docs** should be updated when user-facing behavior changes.
- **Changelog entry** should credit the contributor when the change is user-visible.

### Tests

Tests are required for all contributions:

- **Bug fixes** must include a test proving the existence of the bug being fixed.
- **New features** must include tests proving they actually work.
- Run `devtools::test()` locally before opening a pull request.

## Workflow Example

Here's an example workflow for contributing:

### Preparing Your Fork

1. Fork the repository on GitHub.
2. Clone your fork: `git clone git@github.com:yourname/JournalAnalysis.git`
3. `cd JournalAnalysis`
4. Install development dependencies: `devtools::install_dev_deps()`
5. Create a branch: `git checkout -b fix-description main`

### Making Your Changes

1. Write tests expecting the correct/fixed functionality; make sure they fail initially.
2. Implement your changes.
3. Run tests again: `devtools::test()`
4. Run a full check: `devtools::check()`
5. Update documentation as needed.
6. Commit your changes: `git commit -m "Brief description of changes"`

### Creating Pull Requests

1. Push your branch: `git push origin HEAD`
2. Visit GitHub and click the "Pull request" button.
3. In the description field, reference the issue number (if fixing an existing issue) or describe the issue and your fix.
4. Submit and be patient - maintainers will review when they can.

## Questions?

If you have questions about contributing, please [open an issue](https://github.com/vallenderlab/JournalAnalysis/issues) or contact the maintainers.
48 changes: 48 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
release:
types: [published]
workflow_dispatch:

name: pkgdown

permissions: read-all

jobs:
pkgdown:
runs-on: ubuntu-latest
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
folder: docs
65 changes: 65 additions & 0 deletions .github/workflows/r-cmd-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: R-CMD-check

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
env:
RSPM: ${{ matrix.config.rspm }}
strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: "release"}
- {os: macOS-latest, r: "release"}
- {os: ubuntu-latest, r: "release", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
- {os: ubuntu-latest, r: "devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- name: Session info
run: |
options(width = 100)
sessioninfo::session_info()
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
_R_CHECK_FORCE_SUGGESTS_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \;
shell: bash

- name: Upload check results
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
19 changes: 19 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
type: software
title: "JournalAnalysis: Explore and Identify Journals to Publish in."
abstract: >-
A package for exploring and identifying the best journals in which to
publish a paper.
authors:
- given-names: Robert
family-names: Gilmore
email: robgilmore127@gmail.com
- given-names: Shaurita
family-names: Hutchins
email: shaurita.d.hutchins@gmail.com
version: 0.2.0
date-released: 2026-06-10
url: https://github.com/vallenderlab/JournalAnalysis
repository-code: https://github.com/vallenderlab/JournalAnalysis
license: MIT
28 changes: 15 additions & 13 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
Package: JournalAnalysis
Title: Explore and Identify Journals to Publish in.
Version: 0.0.1
Version: 0.2.0
Authors@R: c(
person("Robert", "Gilmore", email = "rgilmore@umc.edu", role = "cre"),
person("Shaurita", "Hutchins", email = "shutchins2@umc.edu", role = "aut"))
person("Robert", "Gilmore", email = "robgilmore127@gmail.com", role = c("aut", "cre")),
person("Shaurita", "Hutchins", email = "shaurita.d.hutchins@gmail.com", role = "aut"))
Description: A package for exploring and identifying the best journals in which to publish a paper.
Depends: R (>= 3.4.3)
License: MIT
Depends:
R (>= 3.5)
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
URL: https://github.com/vallenderlab/JournalAnalysis
BugReports: https://github.com/vallenderlab/JournalAnalysis/issues
Imports:
dplyr,
europepmc,
rlang,
tibble,
magrittr,
PubMedWordcloud,
ggplot2,
ggthemes,
stringr,
BiocParallel
Suggests: knitr,
rmarkdown
stringr
Suggests:
knitr,
rmarkdown,
devtools,
testthat (>= 3.0.0)
VignetteBuilder: knitr
RoxygenNote: 6.1.0
RoxygenNote: 7.3.3
Config/testthat/edition: 3
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
YEAR: 2026
COPYRIGHT HOLDER: Vallender Lab
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MIT License

Copyright (c) 2018-2026 Vallender Lab

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
6 changes: 6 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ export(query1)
export(query2)
export(query3)
export(save_as_csv)
importFrom(grDevices,dev.off)
importFrom(grDevices,png)
importFrom(rlang,.data)
importFrom(utils,install.packages)
importFrom(utils,installed.packages)
importFrom(utils,write.csv)
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# JournalAnalysis 0.2.0

* Initial package release on GitHub.
Loading
Loading