Skip to content

Commit

Permalink
Change name from gitty to relic
Browse files Browse the repository at this point in the history
  • Loading branch information
Noam Ross committed Nov 9, 2023
1 parent 1b1d132 commit c7dcc3d
Show file tree
Hide file tree
Showing 18 changed files with 357 additions and 57 deletions.
5 changes: 4 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
^gitty\.Rproj$
^relic\.Rproj$
^\.Rproj\.user$
^README\.Rmd$
^\.github$
^CODE_OF_CONDUCT\.md$
^LICENSE\.md$
^man/install_minio\.Rd$
^man/sys_tempdir\.Rd$
^man/sys_tempfile\.Rd$
55 changes: 50 additions & 5 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,51 @@
# Contributing to gitty

This outlines how to propose a change to gitty.
# Contributing to `relic`

This outlines how to propose a change to `relic`.

## General design considerations

- `relic` is a high-level interface designed for working with git repositories
of data science workflows. It is not intended to be a general-purpose client
for git.
- `relic`'s primary features are for extracting and comparing files and data
from git history and running code within and across git history. Functions
in the package are generally _read-only_ and do not commit or modify history.
- `relic` aims to have relatively few dependencies for its core functions (`git2r`
and low-level packages such as `fs` and `rlang`). For extended functionality,
other packages may be used, but these should live under `Suggests:` and
make use of `rlang::check_installed()`.

Alternatively, using another package in a vignette may be a good way to
demonstrate how `relic` can be used with other packages rather than extending
`relic` itself.
- `relic` has specific support for workflows using
[`targets`](https://books.ropensci.org/targets/). Similar functionality
for other workflow managers may be considered in the future, as may high-level
interfaces for dealing with other versioned data such as S3 buckets.
- `relic` uses `git2r` to interface with git/libgit2. In general `relic` functions
should not call `libgit2` directly nor call `git` via the command line. If
`git2r` does not expose needed functionality in `libgit2`, consider making
a contribution to `git2r`.
- In general `relic` only deals with the local git repository. It does not
interface with remote repositories, nor interact with the APIs of services like
GitLab, GitHub, or gitea.

## Testing

Tests for `relic` require some considerable bootstrapping outlined in the
[testing README](tests/README.md). Notably, for testing workflows that interact
with S3 cloud storage, a MinIO server is run in the background to serve as an
S3 API endpoint. You will need the `minio` command line tool installed as well
as the `mc` MinIO client.

## Lifecycle Statement

`relic` is a new package and its API is still under development.

`relic` developed to support internal projects at EcoHealth Alliance. We strive
to be good contributors to the open-source ecosystem and for this to be a
general-purpose tool, but internal needs will drive prioritization of development
and design decisions.

## Fixing typos

Expand All @@ -17,7 +62,7 @@ See our guide on [how to create a great issue](https://code-review.tidyverse.org

### Pull request process

* Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("noamross/gitty", fork = TRUE)`.
* Fork the package and clone onto your computer. If you haven't done this before, we recommend using `usethis::create_from_github("noamross/relic", fork = TRUE)`.

* Install all development dependencies with `devtools::install_dev_deps()`, and then make sure the package passes R CMD check by running `devtools::check()`.
If R CMD check doesn't pass cleanly, it's a good idea to ask for help before continuing.
Expand All @@ -41,6 +86,6 @@ See our guide on [how to create a great issue](https://code-review.tidyverse.org

## Code of Conduct

Please note that the gitty project is released with a
Please note that the relic project is released with a
[Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this
project you agree to abide by its terms.
48 changes: 48 additions & 0 deletions .github/workflows/update-docs-and-meta.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/master/examples
# The action runs when:
# - A new release is published
# - Changes to the main branch
on:
release:
types: [published]
push:
branches: [master, main]
workflow_dispatch:

name: Update Docs and Metadata

jobs:
update-docs-and-meta:
runs-on: macos-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::cffr
any::codemeta
any::rmarkdown
any::devtools
- name: Update package metadata and docs
run: |
devtools::document()
cffr::cff_write(keys = list())
codemeta::write_codemeta()
rmarkdown::render('README.Rmd', output_options = list(html_preview = FALSE))
shell: Rscript {0}

- name: Commit results
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add CITATION.cff codemeta.json README.md NAMESPACE man/**
git commit -m 'Update package metadata and documentation' || echo "No changes to commit"
git push origin || echo "No changes to commit"
30 changes: 19 additions & 11 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
Package: gitty
Title: Tools for working with version-controlled data science workflows
Package: relic
Title: Objects from History
Version: 0.0.0.9000
Authors@R:
Authors@R: c(
person("Noam", "Ross", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-2136-0000"))
Description: Tools for working with version-controlled data science workflows
comment = c(ORCID = "0000-0002-2136-0000")),
person("EcoHealth Alliance", role = c("cph", "fnd"))
)
Description: Tools working with the history of version-controlled projects,
License: MIT + file LICENSE
Encoding: UTF-8
Language: es
Language: en-US
Roxygen: list(markdown = TRUE, roclets = c("collate", "rd", "namespace", "devtag::dev_roclet"))
RoxygenNote: 7.2.3
Imports:
Expand All @@ -21,12 +23,18 @@ Suggests:
testthat (>= 3.0.0),
devtag,
pkgcheck,
lintr
lintr,
processx,
paws,
httr,
autotest,
callr,
spelling
Remotes:
ropensci/git2r
moodymudskipper/devtag
ropensci/git2r,
moodymudskipper/devtag,
ropensci-review-tools/pkgcheck
Config/testthat/edition: 3
URL: https://noamross.github.io/gitty, https://noamross.r-universe.dev/gitty
BugReports: https://github.com/noamross/gitty/issues
URL: https://noamross.github.io/relic, https://noamross.r-universe.dev/relic
BugReports: https://github.com/noamross/relic/issues
VignetteBuilder: knitr
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2023
COPYRIGHT HOLDER: gitty authors
COPYRIGHT HOLDER: relic authors
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2023 gitty authors
Copyright (c) 2023 relic authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 7 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Generated by roxygen2: do not edit by hand

export(commits_between)
export(file_copy_versions)
export(graph_from_commits)
export(graph_from_git_repository)
export(tar_load_version)
export(tar_read_version)
export(tar_read_versions)
import(fs)
import(git2r)
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# relic (development version)

* Initial proof of concept
7 changes: 7 additions & 0 deletions R/relic-package.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#' @keywords internal
"_PACKAGE"

## usethis namespace: start
#' @import fs git2r
## usethis namespace: end
NULL
Loading

0 comments on commit c7dcc3d

Please sign in to comment.