Skip to main content

Keep your Python dependencies fresh

Project description

fresh-deps

PyPI Python Version

Installation

$ pip3 install fresh-deps

Usage

$ fresh-deps requirements.in --gitlab-project-id=<id> --gitlab-private-token=<token>

or via docker

$ docker run -v `pwd`:/workdir 2gistestlabs/fresh-deps fresh-deps requirements.in \
    --gitlab-project-id=<id> \
    --gitlab-private-token=<token>

GitLab CI

Add job and create scheduled pipeline

stages:
  - update_dependencies

fresh_deps:
  stage: update_dependencies
  image: 2gistestlabs/fresh-deps:1.0.0
  variables:
    CI_PRIVATE_TOKEN: $GITLAB_PRIVATE_TOKEN
  script:
    - fresh-deps requirements.in
  only:
    - schedules

Docs

usage: fresh-deps [-h] [--output-file [OUTPUT_FILE]]
                  [--pypi-index-url PYPI_INDEX_URL]
                  [--gitlab-url GITLAB_URL]
                  [--gitlab-project-id GITLAB_PROJECT_ID]
                  [--gitlab-default-branch GITLAB_DEFAULT_BRANCH]
                  [--gitlab-private-token GITLAB_PRIVATE_TOKEN]
                  [--gitlab-assignee GITLAB_ASSIGNEE]
                  [--gitlab-allow-multiple-mrs]
                  requirements_in

positional arguments:
  requirements_in       Path to requirements.in

options:
  -h, --help            show this help message and exit
  --output-file [OUTPUT_FILE]
                        Path to requirements.txt
  --pypi-index-url PYPI_INDEX_URL
                        PyPI index URL (default: {default_pypi_index})
  --gitlab-url GITLAB_URL
                        GitLab server URL (default: $CI_SERVER_URL or 'https://gitlab.com')
  --gitlab-project-id GITLAB_PROJECT_ID
                        GitLab project ID (defaulT: $CI_PROJECT_ID)
  --gitlab-default-branch GITLAB_DEFAULT_BRANCH
                        GitLab default branch (default: $CI_DEFAULT_BRANCH or 'main')
  --gitlab-private-token GITLAB_PRIVATE_TOKEN
                        GitLab private token (default: $CI_PRIVATE_TOKEN), documentation
                        https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html
  --gitlab-assignee GITLAB_ASSIGNEE
                        GitLab assignee username (example: 'root')
  --gitlab-allow-multiple-mrs
                        Allow multiple opened merge requests

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

fresh-deps-1.0.0.tar.gz (9.5 kB view hashes)

Uploaded Source

Built Distribution

fresh_deps-1.0.0-py3-none-any.whl (11.2 kB view hashes)

Uploaded Python 3

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