Skip to main content

A terminal UI dashboard to view python dependencies across Github repositories.

Project description

Merged

Tests pypi versions

Simplify managing dependencies within an all-in-one TUI dashboard.

How to use merged

You will need to create a GITHUB_TOKEN with permissions via Github > Settings > Developer Settings with the repo permissions to read public/private repositories and and admin:org for read:org if you wish to access an organisation that is not public.

pip install merged

# your github username
export GITHUB_USER="user"
# an individual or an organisation in which the repository exists
export GITHUB_ORG="org"
# a comma separated list of repositories
export GITHUB_REPOSITORY="repo_1,repo_2"
# your personal github token
export GITHUB_TOKEN="secret"

merged check

Configuration

Merged supports both .ini and .env files. Merged always searches for configuration in this order:

  • Environment variables;
  • Repository: ini or .env file;
  • Configuration Path
  • Review Defaults

The following steps are used to provide the configuration using a .env or .ini file. The configuration can be read from within the module/repository (default location set by decouple) using the .env file or via a location specified by an environmental variable that points to a .ini file located in the root of the project or in a location specified by PATH_TO_CONFIG.

Using an .env file within the repository

cd /home/<your-user>/workspace/apoclyps/merged
touch .env

echo "GITHUB_ORG=apoclyps" >> .env
echo "GITHUB_REPOSITORY=micropython-by-example" >> .env
echo "GIT_BRANCH=main" >> .env
python -m merged config

Using an .ini file within the repository

cd /home/<your-user>/workspace/apoclyps/merged
touch settings.ini
echo "[settings]\nGITHUB_ORG=apoclyps\nGITHUB_REPOSITORY=micropython-by-example\nGIT_BRANCH=main" >> settings.ini

python -m merged config

Providing a configuration path

If you wish to set the configuration path to use an ini or .env file when running the application, you can use the configuration of a specific file by supplying the path to the configuration like so:

cd /home/apoclyps/
touch settings.ini
echo "[settings]\nGITHUB_ORG=apoclyps\nGITHUB_REPOSITORY=micropython-by-example\nGIT_BRANCH=main" >> settings.ini

cd /home/<your-user>/workspace/apoclyps/merged
export MERGED_PATH_TO_CONFIG=/home/<your-user>/

python -m merged config

If at any time, you want to confirm your configuration reflects the file you have provided, you can use merged config to view what current configuration of Merged.

Configuring Layout

Getting started with local development

To build and run the CLI on your host, you will need Python 3.9 or greater, pip, and virtualenv to build and run merged. If you wish to publish a PR with your changes, first create a fork on Github and clone that code.

$ gh repo clone apoclyps/merged
$ cd merged
$ python3 -m venv env
$ source env/bin/activate
(env)$ pip install -r requirements_dev.txt
(env)$ pip install -r requirements.txt
(env)$ python -m merged check

If you wish to keep a copy of Merged on your host system, you can install and run it using:

python -m venv env
source env/bin/activate
python -m pip install -e .
merged -h

You can run the Merged within Docker:

docker-compose build cli && docker-compose run --rm cli python -m merged check

To build an image and run that image with all of the necessary dependencies using the following commands:

docker-compose build cli
docker-compose run --rm cli python -m merged check

Testing

A test suite has been included to ensure Merged functions correctly.

To run the entire test suite with verbose output, run the following:

make test

Linting

To run individual linting steps:

make lint

You can also set up pre-commit to run the linting steps automatically during the commit phase, the pre-commit pipeline can be set up by running the following command on the project root:

pre-commit install

To run all checks manually:

pre-commit run --all

Contributions

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

merged-0.1.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

merged-0.1.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file merged-0.1.0.tar.gz.

File metadata

  • Download URL: merged-0.1.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for merged-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c5a30f11ad3fd0a6b35a005e716a76e55739615a6ea5fc243d09d1cc84be8b6a
MD5 69ecaf33cf23820352ab2c0a1f58d12a
BLAKE2b-256 0896a45c2e1ade050c9c042e6b43bff11eb9aa1b574afb7875f7d29f86ae0ff0

See more details on using hashes here.

File details

Details for the file merged-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: merged-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for merged-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35ff2919271c5f90a13013ff1322948cd40528cef0c0a7f24428f050a2bbea32
MD5 bad80643ef9f98271412a3799b8ef086
BLAKE2b-256 ea0e786d3d51f9c03f7546a809c057646fb70cdffe9f18c38dd8be50ea1588b5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page