Skip to content

Getting started with Eclipse CARE

Description

Eclipse CARE lets you assess any Eclipse project regarding Eclipse open source best practices, and get recommendations for improvement.

Its features include: * Recommended files (e.g. README, LICENSE, SECURITY, etc.) in repositories (Implemented). * Copyright headers checks (Implemented). * IP and license management (Coming Soon). * Headers generator (Coming Soon).

Resources

To learn more about the Eclipse way on open source best practices, see: * The Eclipse project handbook.

The EMO team also provides several trainings, resources and presentations: * Eclipse project governance articles on eclipse.org. * Committer training resources for developers and maintainers. * EMO Office hours to ask us anything!

Installation

Eclipse CARE requires Python 3.10 or higher. You can install the package directly from PyPI:

pip install eclipse-care

Or from the source:

  1. Clone the repository.
  2. Get Hatch to build the tool.
  3. Build and install the tool:
hatch build
pip install dist/eclipse_care-*.whl

Usage

Once installed, you can use the eclipse-care command:

eclipse-care technology.dash

Arguments: * project_id: The Eclipse project ID to assess (e.g., technology.dash).

Options: * -c, --conf: path to an .ini file containing GitHub/GitLab authentication tokens. * -m, --modules: Specify which modules to run (e.g., care.legal.recommended_files). * -v, --verbose: Display more verbose information during execution. * -V, --version: Show the version and exit.

Authentication

Some checks require an authentication token on GitHub or on Eclipse's GitLab.

Obtaining a token:

On GitHub, go to your personal Settings > Developer Settings > Personal access tokens > Tokens (classic). Click on Generate new token. Select All public repositories.

On GitLab, go to your personal Preferences > Access token. Click on Add new token. Select read_api as the selected scope.

Authentication data can be provided in different ways, in order of precedence:

  1. From environment variables: GH_AUTH_TOKEN or GL_AUTH_TOKEN.
  2. From a custom configuration file provided on command line, with the -c|--conf option.

The format expected for the configuration file is a classic .ini syntax, e.g.

[GitHub]
gh_token = ghp_xxxxxxxxxxxxxxxxxxxxx

[GitLab]
gl_token = xxxxxxxxxxxxxxxxxxxxx

If no authentication is provided, the script will use unauthenticated access. This should work, but rate-limiting constraints will be applied, especially with GitHub.