Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 🐛 Codefair v2.0.1 #65

Merged
merged 78 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from 77 commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
e32e766
feat: :sparkles: improvement to bot workflow
slugb0t Jul 25, 2024
922dbff
fix: :bug: correct codemeta url
slugb0t Jul 25, 2024
4a53a59
fix: :bug: correct collection call with correct name
slugb0t Jul 25, 2024
cf0bfca
style: :art: prettier refactor
slugb0t Jul 25, 2024
40b9fd3
refactor: :recycle: update on call for installation and analytics col…
slugb0t Jul 25, 2024
55070f3
✨ feat: add front end support for cwl validation (#41)
megasanjay Aug 1, 2024
ba378cc
feat: ✨ CWL validations across repo, single instance db, bot restruct…
slugb0t Aug 2, 2024
ed91ea5
refactor: :recycle: exit push event in the case of no entry in instal…
slugb0t Aug 2, 2024
098c94a
feat: ✨ bot event listeners concised + extra cwl validation checks (#43)
slugb0t Aug 6, 2024
89416f6
🐛 fix: rework dashboard page for clarity (#44)
megasanjay Aug 6, 2024
c69aecb
feat: ✨ action queue limit + cwl template updates (#45)
slugb0t Aug 7, 2024
2f06a2a
fix: :bug: add await to db call
slugb0t Aug 7, 2024
7293f75
fix: :bug: overwriting previous cwl files in db patched
slugb0t Aug 7, 2024
631d34a
feat: :sparkles: set action key to false upon reaching action count l…
slugb0t Aug 7, 2024
fa72532
feat: :sparkles: full run through on action limit, display previous v…
slugb0t Aug 7, 2024
f9b3791
dev: :memo: better comments
slugb0t Aug 7, 2024
f4583bd
feat: :sparkles: better comments and always show total validations on…
slugb0t Aug 7, 2024
38e00ca
✨ feat: Add support for DB migrations (#46)
megasanjay Aug 7, 2024
8a59388
✨ feat: add a simple faq for errors (#47)
megasanjay Aug 8, 2024
d44ae7b
fix: 🐛 bot patches for cwl and action queue features (#48)
slugb0t Aug 8, 2024
39d4f8b
refactor: :recycle: const declaration on validateCWLFile function call
slugb0t Aug 8, 2024
ea5f153
feat: :sparkles: consola for logging (#49)
slugb0t Aug 8, 2024
1794a53
🐛 fix: check github org permissions (#50)
megasanjay Aug 8, 2024
3e61a06
🧑‍💻 chore: remove old dashboard
megasanjay Aug 9, 2024
7f2b6c2
refactors: ♻️ action limit update (#51)
slugb0t Aug 9, 2024
1225839
Merge branch 'staging' of https://github.com/fairdataihub/codefair-ap…
megasanjay Aug 9, 2024
b2ec880
📈 feat: add metrics for ui side (#52)
megasanjay Aug 9, 2024
5b9807b
feat: :sparkles: analytics validatedFileCount (#53)
slugb0t Aug 12, 2024
c577af6
fix: :bug: if file is deleted, check for overall status before final …
slugb0t Aug 12, 2024
941bec8
chore: :hammer: todo removed
slugb0t Aug 12, 2024
baddb93
refactor: :recycle: update issue dashboard template for CWL section (…
slugb0t Aug 12, 2024
5d50f49
refactor: :refactor: additional cwl logs and action queue decreases
slugb0t Aug 12, 2024
6f6071e
chore: :hammer: removed unnecessary logs
slugb0t Aug 12, 2024
4534d4c
➖ chore: remove consola from ui
megasanjay Aug 13, 2024
6831c00
🔊 chore: log error
megasanjay Aug 13, 2024
353b1a4
🔥 Feat: removing old cwl UI
slugb0t Aug 13, 2024
3e2f344
fix: :bug: update cwl db when file is modified
slugb0t Aug 13, 2024
72afbca
fix: :bug: failedcount/cwlfilecount ratio for issue template
slugb0t Aug 13, 2024
8bf3f83
fix: 🐛 cwl bug patches (#55)
slugb0t Aug 14, 2024
ce0789e
refactor: :recycle: align contains_license key with other collections
slugb0t Aug 14, 2024
3630a7d
feat: ✨ validation status + trigger bot rerun full validation (#56)
slugb0t Aug 16, 2024
51a4fa8
feat: :sparkles: include validation check for when only one metadata …
slugb0t Aug 16, 2024
f94c47e
refactor: :memo: update readme run githb app locally section
slugb0t Aug 20, 2024
b3d3308
Update README.md
slugb0t Aug 20, 2024
fe2a5fc
refactor: :recycle: update /fairsoftware page text
slugb0t Aug 20, 2024
ef7847c
feat: :sparkles: Add button to direct to docs on codefair homepage
slugb0t Aug 20, 2024
9dc2d89
refactor: :recycle: /fairsoftware learn more about codefair directs t…
slugb0t Aug 20, 2024
fef258c
refactor: :recycle: remove mention of fair-biors guidelines from bot
slugb0t Aug 20, 2024
f6ae158
refactor: :recycle: remove mention of fair biors guidelines in UI
slugb0t Aug 20, 2024
5d41fba
✨ feat: bring ui dashboard to issue dashboard level (#57)
megasanjay Aug 24, 2024
6cd55db
🐛 fix: undefined vars
megasanjay Aug 24, 2024
3aa0a06
fix: :bug: get default branch name for commit info
slugb0t Aug 27, 2024
e5b2424
fix: :bug: patch iterating through existing cwl files for removal
slugb0t Aug 27, 2024
02b03ff
refactor: :recycle: Prettier refactors
slugb0t Aug 27, 2024
9b2d9eb
refactor: :recycle: display repos with no action limit in UI dashboard
slugb0t Aug 27, 2024
4d58422
refactor: :building_construction: update bot file structure (#59)
slugb0t Aug 27, 2024
3ec85bd
refactor: :art: standardize spacing of content for dashboard cards
slugb0t Aug 27, 2024
4a5bd2c
refactor: :recycle: update on styling of repo cards
slugb0t Aug 27, 2024
75fa2ec
🔀 merge: main to staging branch (#60)
slugb0t Aug 27, 2024
bb92783
fix: :bug: correct typo in README
slugb0t Aug 27, 2024
a33c789
feat: :bookmark: bump version number to v2.0.0
slugb0t Aug 27, 2024
a34ecd2
feat: :sparkles: activate dashboard
slugb0t Aug 27, 2024
a9d3883
refactor: :recycle: remove mention of the fair-biors guidelines in bot
slugb0t Aug 27, 2024
97df0a9
feat: :sparkles: if issue is reopened update the latest commits in db
slugb0t Aug 28, 2024
4fd4f61
feat: :sparkles: fetch commit details if bot yet has not done so
slugb0t Aug 28, 2024
738c098
revert: :rewind: remove fetching commits from UI
slugb0t Aug 28, 2024
0a9a7ad
Update CITATION.cff
bvhpatel Aug 29, 2024
b5a2567
Update codemeta.json
bvhpatel Aug 29, 2024
d957734
Update README.md
bvhpatel Aug 29, 2024
a8027b9
Update CHANGELOG.md
bvhpatel Aug 29, 2024
4ce4e8b
update: :memo: update CHANGELOG for v2
slugb0t Aug 29, 2024
4b6c306
Merge branch 'main' into staging
slugb0t Aug 29, 2024
4161959
refactor: :recycle: PR feedback resolved
slugb0t Aug 29, 2024
099bf89
refactor: :recycle: update validator endpoint
slugb0t Aug 29, 2024
ff0c312
feat: :sparkles: migration update (#62)
slugb0t Aug 29, 2024
1bb82fd
feat: :sparkles: Migrations update (#63)
slugb0t Aug 29, 2024
f858326
fix: 🐛 Codefair v2.0.1 (#64)
slugb0t Sep 3, 2024
dd38f92
Merge branch 'main' into staging
slugb0t Sep 3, 2024
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
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,55 @@ All notable changes the Codefair App will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## v.2.0.1 - 2024-09-03

### Identifier

https://doi.org/10.5281/zenodo.13651177

### Added

- Added a migration script to update the database for users who may try to access the dashboard before the v2.0.0 bot has ran on all their repositories.
- Added badges to the CWL card on the dashboard to show the overall status of the CWL validations.

### Fixed

- Fixed a bug where the bot would updated the overall status of the CWL validation on the database.
- Link generator for Codefair repository settings was fixed to correctly generate the link for a user or repository.

### Removed

- Removed references to the action key in the database as it was not being used.

## v.2.0.0 - 2024-08-29

### Identifier

https://doi.org/10.5281/zenodo.13544387

### Added

- Full CWL Validation to entire repositories and an user interface to view the validation reports.
- UI Dashboard has been added for beta testing. The dashboard will provide a central location of the repositories being managed by Codefair. Users will have the ability to update their FAIR compliance items along with rerunning CWL validations and/or enture FAIR compliance checks.
- Single instance database was created for the bot to remove the need for the database to be passed as a parameter in most of the bot functions.
- An action queue was created for users who install Codefair to a large number of repositories in one installation. This will prevent an organization/user account from being spammed with alerts on issues being opened for each repository. The action queue will require 5 actions on said repository before the bot will begin to open a Fair Compliance Dashboard issue.

### Changed

- Workflow on the bot has been optimzed to reduce the number of database calls and improving the overall performance/readability of the bot.
- File restructuring was done on the bot to improve maintainability and readability.
- Logging has been updated on the bot side to use Consola for better tracking of bot errors and runtime details.

### Removed

- Mention of the FAIR-BioRS Guidelines have been removed to prevent users from thinking Codefair is solely for biomedical research software.

## v1.0.0 - 2024-08-26

### Identifier

https://doi.org/10.5281/zenodo.13376617

### Added

- First release with license file and metadata files generating features
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ message: If you use this software, please cite it using the metadata from this f
type: software
identifiers:
- type: doi
value: https://doi.org/10.5281/zenodo.13376617
value: https://doi.org/10.5281/zenodo.13651177
abstract: "Codefair is a free and open source GitHub app that acts as your
personal assistant when it comes to making your research software reusable and
especially complying with the Findable, Accessible, Interoperable, Reusable
Expand All @@ -33,5 +33,5 @@ keywords:
- software
license: MIT
repository-code: https://github.com/fairdataihub/codefair-app
version: 1.0.0
date-released: 2024-08-26
version: 2.0.1
date-released: 2024-09-03
48 changes: 8 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Your coding assistant to make research software reusable without breaking a swea
<a href="https://github.com/fairdataihub/codefair-app/blob/main/LICENSE">
<img src="https://img.shields.io/github/license/fairdataihub/codefair-app.svg?style=flat-square" alt="license" />
</a>
<a href="https://doi.org/10.5281/zenodo.13376617">
<img src="https://zenodo.org/badge/DOI/10.5281/zenodo.13376617.svg" alt="Zenodo DOI" />
<a href="https://doi.org/10.5281/zenodo.13376616">
<img src="https://zenodo.org/badge/DOI/10.5281/zenodo.13376616.svg" alt="Zenodo DOI" />
</a>
<a href="https://archive.softwareheritage.org/browse/origin/https://github.com/fairdataihub/codefair-app/">
<img src="https://archive.softwareheritage.org/badge/origin/https://github.com/fairdataihub/codefair-app/" alt="Software Heritage archive" />
Expand Down Expand Up @@ -65,46 +65,17 @@ Codefair is your personal assistant when it comes to making your research softwa
> While Codefair is free, installing it via the GitHub Marketplace may still require a credit card to be associated with your (or your organization’s) GitHub account. To circumvent this requirement, you can alternatively install Codefair directly from the [app page](https://github.com/apps/codefair-app).

### Documentation
See the our [dedicated webpage](https://docs.codefair.io) for the full documentation, including details about each features and how to use them.

## Run the GitHub app locally

### Setup

This repository uses a pnpm workspace to handle both the bot and the frontend UI. You will need to install pnpm globally to run the app locally. You will also need to be on Node.js version 20 or higher.

```bash
npm install -g pnpm
```

To start both the bot and the frontend UI, run the following command at the root of the repository:

```bash
pnpm dev
```
See our [dedicated webpage](https://docs.codefair.io/docs/installation.html) for full details on what permissions are used and the features Codefair provides.

This will start the bot and the frontend UI in development mode. The bot will be available at `http://localhost:3001` and the frontend UI will be available at `http://localhost:3000`.

The .env files for each package are located in the respective package directories. You will need to create a `.env` file in the `bot` and `ui` directories. Use the .env.example files in each directory as a template.

To run the bot only, run the following command at the root of the repository:

```bash
cd bot
pnpm dev
```

To run the frontend UI only, run the following command at the root of the repository:
## Run the GitHub app locally

```bash
cd ui
pnpm dev
```
For detailed instructions on setting up running the application locally, please refer to our [documentation site](https://docs.codefair.io/dev/running-locally.html).

## How Codefair is developed

Codefair is developed using Probot and is deployed on a server as a serverless function. The GitHub app is configured to receive webhooks for important actions such as pushing code, opening or closing issues, opening or merging pull requests and commenting on discussions.
By leveraging a serverless environment on a server, Codefair can automatically scale to handle the workload of the GitHub app. The app is written in Node.js and utilizes the Octokit library to interact with the GitHub APIenabling seamless integration with GitHub's features and functionality.
Codefair is developed using [Probot](https://probot.github.io/docs/) and is deployed on a server as a serverless function. The GitHub app is configured to receive webhooks for important actions such as pushing code, opening or closing issues, opening or merging pull requests and commenting on discussions.
By leveraging a serverless environment on a server, Codefair can automatically scale to handle the workload of the GitHub app. The app is written in [Node.js](https://nodejs.org/en) and utilizes the [Octokit library](https://github.com/octokit) to interact with the GitHub API enabling seamless integration with GitHub's features and functionality.

## Contributing

Expand All @@ -127,11 +98,8 @@ This work is licensed under

## How to cite

If you are using this package or reusing the source code from this repository for any purpose, please cite:
If you are using this package or reusing the source code from this repository for any purpose, please cite the corresponding Zenodo record. If you are using the latest version, you can see the citation instruction in the GitHub Citation panel or in the CITATION.cff file. You can also find the citation instruction on the Zenodo page 10.5281/zenodo.13376616 (especially if you would like to cite an older version).

```text
Portillo, D., Soundarajan, S., & Patel, B., (2024). Codefair App. Zenodo. 10.5281/zenodo.13376617
```
<br />

---
Expand Down
1 change: 1 addition & 0 deletions bot/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-manager-strict=false
5 changes: 1 addition & 4 deletions bot/utils/citation/index.js → bot/citation/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { gatherRepoAuthors } from "../tools/index.js";
import { gatherRepoAuthors } from "../utils/tools/index.js";

export async function checkForCitation(context, owner, repo) {
try {
Expand All @@ -14,7 +14,6 @@ export async function checkForCitation(context, owner, repo) {
}
}


// TODO: Verify if this is still needed
export async function gatherCitationInfo(context, owner, repo) {
// Verify there is no PR open already for the CITATION.cff file
Expand Down Expand Up @@ -86,9 +85,7 @@ export async function gatherCitationInfo(context, owner, repo) {
// Get the keywords of the repo
let keywords = [];
if (repoData.data.topics != null && repoData.data.topics.length > 0) {
// console.log(repoData.data.topics);
keywords = repoData.data.topics;
// console.log(keywords);
}

// Begin creating json for CITATION.cff file
Expand Down
4 changes: 1 addition & 3 deletions bot/utils/codemeta/index.js → bot/codemeta/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { gatherRepoAuthors } from "../tools/index.js";
import { gatherRepoAuthors } from "../utils/tools/index.js";

export async function checkForCodeMeta(context, owner, repo) {
try {
Expand All @@ -23,8 +23,6 @@ export async function gatherCodeMetaInfo(context, owner, repo) {
});

// Get the languages used in the repo
console.log(repoData.data);

const languagesUsed = await gatherLanguagesUsed(context, owner, repo);
const authors = await gatherRepoAuthors(context, owner, repo, "codemeta");
const codeRepository = repoData.data.html_url;
Expand Down
Loading
Loading