Skip to content

Commit a54edce

Browse files
authored
Improve project setup with workflows, licensing, and docs. (#9)
* Add github workflow actions. * Add MIT license files. * Update package metadata, authors, and CITATION.cff. * Replace legacy journal metrics with JCR 2023 and Scimago 2025 data. * Refactor R package code for ISSN helpers and journal sources. * Add testthat coverage for ISSN helpers and pipeline. * Update vignette for live Europe PMC tutorial workflow. * Add NEWS.md changelog. * Add contributing guidelines. * Update CI workflow and R build configuration. * Configure pkgdown with styling, navbar, and changelog. * Rebuild pkgdown documentation site. * Update DESCRIPTION and NAMESPACE to include rlang. * Update example documentation. * Update DESCRIPTION to suggest BiocManager and refactor ISSN handling in get_articles_with_journal_data function. * Update .Rbuildignore to exclude CSV files. * Add example_queries documentation and update pkgdown configuration.
1 parent 3838e26 commit a54edce

267 files changed

Lines changed: 82101 additions & 2689 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.Rbuildignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
^docs$
2+
^data-raw$
23
^_pkgdown\.yml$
34
^.*\.Rproj$
45
^\.Rproj\.user$
6+
^LICENSE\.md$
7+
^data/.*\.csv$

.github/CONTRIBUTING.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Contributing
2+
3+
We welcome contributions! This document provides guidelines for contributing to JournalAnalysis.
4+
5+
## Submitting Bugs
6+
7+
### Before Submitting
8+
9+
Before submitting a bug report, please do the following:
10+
11+
- **Make sure you're on the latest version.** Your problem may have been solved already.
12+
- **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.
13+
- **Search the project's issue tracker** to make sure it's not a known issue.
14+
15+
### Bug Report Contents
16+
17+
Make sure your report includes:
18+
19+
- **Operating system:** Windows? macOS? Linux? Include version details.
20+
- **R version:** Output from `R.version.string` or `sessionInfo()`.
21+
- **Package version:** Output from `packageVersion("JournalAnalysis")`.
22+
- **RStudio version:** If the addin is involved, include your RStudio build.
23+
- **Installation method:** r-universe, GitHub (`devtools::install_github`), or source.
24+
- **Steps to reproduce:** Include a minimal example, the command or addin steps you used, and the full output or error message.
25+
26+
## Contributing Changes
27+
28+
### Licensing
29+
30+
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).
31+
32+
- 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.
33+
34+
### Version Control
35+
36+
- **Always make a new branch** for your work, no matter how small.
37+
- **Don't submit unrelated changes in the same branch/pull request.**
38+
- **Base your branch on `main`** for new features and most bug fixes.
39+
- If your PR has been sidelined for a while, **rebase or merge to latest `main`** before resubmitting.
40+
41+
### Code Formatting
42+
43+
- **Follow the style used in the repository.** Consistency with the rest of the project always trumps other considerations.
44+
- Use snake_case for functions and variables, `<-` for assignment, and 2-space indentation.
45+
46+
### Documentation
47+
48+
Documentation is required for all contributions:
49+
50+
- **Roxygen2 comments** must be created or updated for exported functions.
51+
- **README or pkgdown docs** should be updated when user-facing behavior changes.
52+
- **Changelog entry** should credit the contributor when the change is user-visible.
53+
54+
### Tests
55+
56+
Tests are required for all contributions:
57+
58+
- **Bug fixes** must include a test proving the existence of the bug being fixed.
59+
- **New features** must include tests proving they actually work.
60+
- Run `devtools::test()` locally before opening a pull request.
61+
62+
## Workflow Example
63+
64+
Here's an example workflow for contributing:
65+
66+
### Preparing Your Fork
67+
68+
1. Fork the repository on GitHub.
69+
2. Clone your fork: `git clone git@github.com:yourname/JournalAnalysis.git`
70+
3. `cd JournalAnalysis`
71+
4. Install development dependencies: `devtools::install_dev_deps()`
72+
5. Create a branch: `git checkout -b fix-description main`
73+
74+
### Making Your Changes
75+
76+
1. Write tests expecting the correct/fixed functionality; make sure they fail initially.
77+
2. Implement your changes.
78+
3. Run tests again: `devtools::test()`
79+
4. Run a full check: `devtools::check()`
80+
5. Update documentation as needed.
81+
6. Commit your changes: `git commit -m "Brief description of changes"`
82+
83+
### Creating Pull Requests
84+
85+
1. Push your branch: `git push origin HEAD`
86+
2. Visit GitHub and click the "Pull request" button.
87+
3. In the description field, reference the issue number (if fixing an existing issue) or describe the issue and your fix.
88+
4. Submit and be patient - maintainers will review when they can.
89+
90+
## Questions?
91+
92+
If you have questions about contributing, please [open an issue](https://github.com/vallenderlab/JournalAnalysis/issues) or contact the maintainers.

.github/workflows/pkgdown.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
release:
8+
types: [published]
9+
workflow_dispatch:
10+
11+
name: pkgdown
12+
13+
permissions: read-all
14+
15+
jobs:
16+
pkgdown:
17+
runs-on: ubuntu-latest
18+
concurrency:
19+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
20+
env:
21+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
22+
permissions:
23+
contents: write
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- uses: r-lib/actions/setup-pandoc@v2
28+
29+
- uses: r-lib/actions/setup-r@v2
30+
with:
31+
use-public-rspm: true
32+
33+
- uses: r-lib/actions/setup-r-dependencies@v2
34+
with:
35+
extra-packages: any::pkgdown, local::.
36+
needs: website
37+
38+
- name: Build site
39+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
40+
shell: Rscript {0}
41+
42+
- name: Deploy to GitHub pages
43+
if: github.event_name != 'pull_request'
44+
uses: JamesIves/github-pages-deploy-action@v4.5.0
45+
with:
46+
clean: false
47+
branch: gh-pages
48+
folder: docs

.github/workflows/r-cmd-check.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: R-CMD-check
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
env:
10+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
11+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
12+
13+
jobs:
14+
R-CMD-check:
15+
runs-on: ${{ matrix.config.os }}
16+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
17+
env:
18+
RSPM: ${{ matrix.config.rspm }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
config:
23+
- {os: windows-latest, r: "release"}
24+
- {os: macOS-latest, r: "release"}
25+
- {os: ubuntu-latest, r: "release", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
26+
- {os: ubuntu-latest, r: "devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: r-lib/actions/setup-r@v2
32+
with:
33+
r-version: ${{ matrix.config.r }}
34+
35+
- uses: r-lib/actions/setup-pandoc@v2
36+
37+
- uses: r-lib/actions/setup-r-dependencies@v2
38+
with:
39+
extra-packages: any::rcmdcheck
40+
needs: check
41+
42+
- name: Session info
43+
run: |
44+
options(width = 100)
45+
sessioninfo::session_info()
46+
shell: Rscript {0}
47+
48+
- name: Check
49+
env:
50+
_R_CHECK_CRAN_INCOMING_REMOTE_: false
51+
_R_CHECK_FORCE_SUGGESTS_: false
52+
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
53+
shell: Rscript {0}
54+
55+
- name: Show testthat output
56+
if: always()
57+
run: find check -name 'testthat.Rout*' -exec cat '{}' \;
58+
shell: bash
59+
60+
- name: Upload check results
61+
if: failure()
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
65+
path: check

CITATION.cff

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
cff-version: 1.2.0
2+
message: "If you use this software, please cite it as below."
3+
type: software
4+
title: "JournalAnalysis: Explore and Identify Journals to Publish in."
5+
abstract: >-
6+
A package for exploring and identifying the best journals in which to
7+
publish a paper.
8+
authors:
9+
- given-names: Robert
10+
family-names: Gilmore
11+
email: robgilmore127@gmail.com
12+
- given-names: Shaurita
13+
family-names: Hutchins
14+
email: shaurita.d.hutchins@gmail.com
15+
version: 0.2.0
16+
date-released: 2026-06-10
17+
url: https://github.com/vallenderlab/JournalAnalysis
18+
repository-code: https://github.com/vallenderlab/JournalAnalysis
19+
license: MIT

DESCRIPTION

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
Package: JournalAnalysis
22
Title: Explore and Identify Journals to Publish in.
3-
Version: 0.0.1
3+
Version: 0.2.0
44
Authors@R: c(
5-
person("Robert", "Gilmore", email = "rgilmore@umc.edu", role = "cre"),
6-
person("Shaurita", "Hutchins", email = "shutchins2@umc.edu", role = "aut"))
5+
person("Robert", "Gilmore", email = "robgilmore127@gmail.com", role = c("aut", "cre")),
6+
person("Shaurita", "Hutchins", email = "shaurita.d.hutchins@gmail.com", role = "aut"))
77
Description: A package for exploring and identifying the best journals in which to publish a paper.
8-
Depends: R (>= 3.4.3)
9-
License: MIT
8+
Depends:
9+
R (>= 3.5)
10+
License: MIT + file LICENSE
1011
Encoding: UTF-8
1112
LazyData: true
1213
URL: https://github.com/vallenderlab/JournalAnalysis
1314
BugReports: https://github.com/vallenderlab/JournalAnalysis/issues
1415
Imports:
1516
dplyr,
1617
europepmc,
18+
rlang,
1719
tibble,
18-
magrittr,
1920
PubMedWordcloud,
20-
ggplot2,
21-
ggthemes,
22-
stringr,
23-
BiocParallel
24-
Suggests: knitr,
25-
rmarkdown
21+
stringr
22+
Suggests:
23+
knitr,
24+
rmarkdown,
25+
devtools,
26+
testthat (>= 3.0.0)
2627
VignetteBuilder: knitr
27-
RoxygenNote: 6.1.0
28+
RoxygenNote: 7.3.3
29+
Config/testthat/edition: 3

LICENSE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
YEAR: 2026
2+
COPYRIGHT HOLDER: Vallender Lab

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# MIT License
2+
3+
Copyright (c) 2018-2026 Vallender Lab
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

NAMESPACE

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,9 @@ export(query1)
1212
export(query2)
1313
export(query3)
1414
export(save_as_csv)
15+
importFrom(grDevices,dev.off)
16+
importFrom(grDevices,png)
17+
importFrom(rlang,.data)
18+
importFrom(utils,install.packages)
19+
importFrom(utils,installed.packages)
20+
importFrom(utils,write.csv)

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# JournalAnalysis 0.2.0
2+
3+
* Initial package release on GitHub.

0 commit comments

Comments
 (0)