npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

edu-git

v0.11.0

Published

Script Files for Educational Purposes

Downloads

105

Readme

edu-git

About this project

edu-git is a toolkit or set of scripts that facilitates the synchronization of repositories in an academic environment where there is an instructor/teacher-student relationship. This tool is based on having a base repository, where the activity will be defined, and a set of FORKs where the work done by the students is expected to be submitted.

The edu-git toolkit consists of a set of scripts that simplify and automate the most frequent and repetitive tasks, such as adding all the students' FORK repositories as remote repositories in the instructor/teacher's repository. Through a CSV file, the necessary data will be provided to carry out this task, as well as a series of scripts to perform the most common operations (branch synchronization or fetch, checkouts with associated actions, solution archiving for auditing, etc.).

It may be useful for other purposes, but it is primarily designed for an academic environment.

Installation

Either by cloning with git or using npm (the recommended method):

npm install -g edu-git

It is installed globally because the purpose of the edu-git scripts is to be used with repositories spread across different paths in the system.

Usage

Automatically add remote repositories

The first step is to add a more or less large set of remote repository connection strings (usually from students). For this, there must be a CSV file with the necessary data to add these remote repositories.

The file will be located by default in the internal path of the repository with the exact name .git/people.csv. An example of this file could be:

default_release_branch ,acount     ,prefix      ,suffix, platform       ,surname  ,name   ,
main                   ,student01 ,COURSE1920- ,-dist  , [email protected] ,Martinez ,Kike   ,
main                   ,student02 ,COURSE1920- ,-dist  , [email protected] ,Perez    ,Pepe   ,
main                   ,student03 ,COURSE1920- ,-dist  , [email protected] ,Álvarez  ,Manolo ,
master                 ,student04 ,COURSE1920- ,-dist  , [email protected] ,Inválido ,Paco   ,

In this file, you can see the necessary fields to synchronize a repository with its remotes, as well as a field named default_release_branch, which will be the default branch where students submit their own solution, their own release branch or delivery branch.

A tip for generating this file is to have it created by the students themselves in a collaborative spreadsheet, such as a Google Sheet, which can then be exported in .csv format. The delivery branch or release branch, on the other hand, should follow a standardized format. For example, rb/nameSurname/develop.

The script used in this case will be edu-git-remote, and its usage can be checked with the --help option, either for general use or for a specific subcommand in particular:

# edu-git remote --help
edu-git-remote <command> [args]

Comandos:
  edu-git-remote add     Add remote repositories from a file
  edu-git-remote remove  Delete remote repositories

Opciones:
  --version  Show versión installed                               [booleano]
  --help     Show help                                            [booleano]

Next, starting from a repository where an academic exercise is defined and you want to add the students' FORKs, the following operation would be performed:

# For example, being in ~/git/programming-exercise-01/
edu-git-remote add

The result produced by the script is:

[ADDED] git remote add COURSE1920-MartinezKike ssh://[email protected]/student01/programming-exercise-01
[ADDED] git remote add COURSE1920-PerezPepe ssh://[email protected]/student02/programming-exercise-01
[ADDED] git remote add COURSE1920-ÁlvarezManolo ssh://[email protected]/student03/programming-exercise-01
[ADDED] git remote add COURSE1920-InválidoPaco ssh://[email protected]/student04/programming-exercise-01

Repository synchronization

Once the connection strings have been added to the remote repositories, synchronization can be carried out with the following script:

# edu-git-fetch --help
edu-git-fetch <command> [args]

Opciones:
      --version  Muestra número de versión                            [booleano]
  -p, --prefix
  -b, --branch
      --help     Muestra ayuda                                        [booleano]

To perform basic synchronization:

# For example, being in ~/git/programming-exercise-01/
edu-git-fetch
[REF] git remote update COURSE1920-InválidoPaco
[FETCHED] git remote update COURSE1920-MartinezKike
[FETCHED] git remote update COURSE1920-PerezPepe
[FETCHED] git remote update COURSE1920-ÁlvarezManolo
[FETCHED] git remote update origin

Note that the output shows whether each remote has been correctly synchronized or not. It may have synchronized (FETCHED), failed due to credentials or an incorrect connection string (FAIL), or the connection may have been made but synchronization of the branch was not possible due to a naming issue (REF).

Licence

MIT especificada en LICENCE.txt

Contact

Project Link: https://github.com/faiadolabs/edu-git