Skip to content

Commit

Permalink
rename project to mozilla-gcp-ar-pkg-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielBusta committed Nov 16, 2023
1 parent 89402f5 commit f33f0d7
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 34 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
[![Task Status](https://firefox-ci-tc.services.mozilla.com/api/github/v1/repository/mozilla-releng/mozilla-deb-pkg-manager/main/badge.svg)](https://firefox-ci-tc.services.mozilla.com/api/github/v1/repository/mozilla-releng/mozilla-deb-pkg-manager/main/latest)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/mozilla-releng/mozilla-deb-pkg-manager/main.svg)](https://results.pre-commit.ci/latest/github/mozilla-releng/mozilla-deb-pkg-manager/main)
[![Code Coverage](https://codecov.io/gh/mozilla-releng/mozilla-deb-pkg-manager/branch/main/graph/badge.svg?token=GJIV52ZQNP)](https://codecov.io/gh/mozilla-releng/mozilla-deb-pkg-manager)
[![Documentation Status](https://readthedocs.org/projects/mozilla-deb-pkg-manager/badge/?version=latest)](https://mozilla-deb-pkg-manager.readthedocs.io/en/latest/?badge=latest)
[![Task Status](https://firefox-ci-tc.services.mozilla.com/api/github/v1/repository/mozilla-releng/mozilla-gcp-ar-pkg-manager/main/badge.svg)](https://firefox-ci-tc.services.mozilla.com/api/github/v1/repository/mozilla-releng/mozilla-gcp-ar-pkg-manager/main/latest)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/mozilla-releng/mozilla-gcp-ar-pkg-manager/main.svg)](https://results.pre-commit.ci/latest/github/mozilla-releng/mozilla-gcp-ar-pkg-manager/main)
[![Code Coverage](https://codecov.io/gh/mozilla-releng/mozilla-gcp-ar-pkg-manager/branch/main/graph/badge.svg?token=GJIV52ZQNP)](https://codecov.io/gh/mozilla-releng/mozilla-gcp-ar-pkg-manager)
[![Documentation Status](https://readthedocs.org/projects/mozilla-gcp-ar-pkg-manager/badge/?version=latest)](https://mozilla-gcp-ar-pkg-manager.readthedocs.io/en/latest/?badge=latest)
[![License](https://img.shields.io/badge/license-MPL%202.0-orange.svg)](http://mozilla.org/MPL/2.0)

# mozilla-deb-pkg-manager
# mozilla-gcp-ar-pkg-manager

`mozilla-releng/mozilla-deb-pkg-manager` is a Python tool for managing Mozilla `.deb` packages. It can be used to clean-up obsolete Firefox Nightly versions from the Mozilla APT repository.
`mozilla-releng/mozilla-gcp-ar-pkg-manager` is a Python tool for managing Mozilla `.deb` packages. It can be used to clean-up obsolete Firefox Nightly versions from the Mozilla APT repository.

## Requirements
- Python 3.11 or higher
- Poetry (for dependency management)

## Installation
1. **Install Poetry**: If not already installed, install Poetry by following the instructions from the [official Poetry website](https://python-poetry.org/docs/).
2. **Clone the Repository**: Clone the `mozilla-deb-pkg-manager` repository using the command `git clone https://github.com/mozilla-releng/mozilla-deb-pkg-manager.git`.
2. **Clone the Repository**: Clone the `mozilla-gcp-ar-pkg-manager` repository using the command `git clone https://github.com/mozilla-releng/mozilla-gcp-ar-pkg-manager.git`.
3. **Install Dependencies**: Navigate to the repository's root directory and run `poetry install` to install the required dependencies.

### Running `mozilla-deb-pkg-manager`
To run `mozilla-deb-pkg-manager`, use Poetry with the following command:
### Running `mozilla-gcp-ar-pkg-manager`
To run `mozilla-gcp-ar-pkg-manager`, use Poetry with the following command:
```bash
poetry run mozilla-deb-pkg-manager clean-up --channel [CHANNEL] --retention-days [DAYS]
poetry run mozilla-gcp-ar-pkg-manager clean-up --channel [CHANNEL] --retention-days [DAYS]
```

### Parameters
Expand All @@ -31,12 +31,12 @@ poetry run mozilla-deb-pkg-manager clean-up --channel [CHANNEL] --retention-days
To clean up nightly packages that are older than 7 days:

```bash
poetry run mozilla-deb-pkg-manager clean-up --channel nightly --retention-days 7
poetry run mozilla-gcp-ar-pkg-manager clean-up --channel nightly --retention-days 7
```

## Building and Installing a Python Wheel

The `mozilla-deb-pkg-manager` package can be packaged into a wheel file for distribution and installation.
The `mozilla-gcp-ar-pkg-manager` package can be packaged into a wheel file for distribution and installation.

### Building the Wheel
1. **Navigate to the Project Directory**: Open your terminal and navigate to the directory where your project is located.
Expand All @@ -50,5 +50,5 @@ The `mozilla-deb-pkg-manager` package can be packaged into a wheel file for dist
After installation, the package can be used from anywhere on your system, provided you are running the Python interpreter where it was installed. For example:

```bash
mozilla-deb-pkg-manager clean-up --channel nightly --retention-days 5
mozilla-gcp-ar-pkg-manager clean-up --channel nightly --retention-days 5
```
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# -- Project information -----------------------------------------------------

project = "mozilla-deb-pkg-manager"
project = "mozilla-gcp-ar-pkg-manager"
copyright = "2023"
author = "Mozilla Release Engineering <[email protected]>"

Expand Down
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mozilla-deb-pkg-manager
mozilla-gcp-ar-pkg-manager
=======================

`mozilla-releng/mozilla-deb-pkg-manager` is a Python tool for managing Mozilla `.deb` packages.
`mozilla-releng/mozilla-gcp-ar-pkg-manager` is a Python tool for managing Mozilla `.deb` packages.


Table of Contents
Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[tool.poetry]
name = "mozilla-deb-pkg-manager"
name = "mozilla-gcp-ar-pkg-manager"
version = "0.1.0"
description = "`mozilla-releng/mozilla-deb-pkg-manager` is a Python tool for managing Mozilla `.deb` packages."
description = "`mozilla-releng/mozilla-gcp-ar-pkg-manager` is a Python tool for managing Mozilla `.deb` packages."
authors = ["Mozilla Release Engineering <[email protected]>"]
license = "MPL-2.0"
readme = "README.md"
packages = [{include = "mozilla_deb_pkg_manager", from = "src"}]
packages = [{include = "mozilla_gcp_ar_pkg_manager", from = "src"}]

[tool.poetry.scripts]
mozilla-deb-pkg-manager = 'mozilla_deb_pkg_manager.cli:main'
mozilla-gcp-ar-pkg-manager = 'mozilla_gcp_ar_pkg_manager.cli:main'

[tool.poetry.dependencies]
python = "^3.11"
Expand Down Expand Up @@ -39,7 +39,7 @@ xfail_strict = true
[tool.coverage.run]
parallel = true
branch = true
source = ["src/mozilla_deb_pkg_manager/"]
source = ["src/mozilla_gcp_ar_pkg_manager/"]

[tool.ruff]
select = [
Expand All @@ -55,7 +55,7 @@ ignore = [
target-version = "py311"

[tool.ruff.isort]
known-first-party = ["mozilla_deb_pkg_manager"]
known-first-party = ["mozilla_gcp_ar_pkg_manager"]

[build-system]
requires = ["poetry-core"]
Expand Down
1 change: 0 additions & 1 deletion src/mozilla_deb_pkg_manager/__init__.py

This file was deleted.

1 change: 1 addition & 0 deletions src/mozilla_gcp_ar_pkg_manager/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import mozilla_gcp_ar_pkg_manager.cli as cli # noqa
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from mozilla_version.gecko import GeckoVersion

logging.basicConfig(
format="%(asctime)s - mozilla-deb-pkg-manager - %(levelname)s - %(message)s",
format="%(asctime)s - mozilla-gcp-ar-pkg-manager - %(levelname)s - %(message)s",
level=logging.INFO,
)

Expand Down Expand Up @@ -84,7 +84,7 @@ async def delete_nightly_versions(retention_days):


def main():
parser = argparse.ArgumentParser(description="mozilla-deb-pkg-manager")
parser = argparse.ArgumentParser(description="mozilla-gcp-ar-pkg-manager")
subparsers = parser.add_subparsers(
dest="command",
required=True,
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/ci/codecov/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ tasks:
env:
MOZ_FETCHES_DIR: /builds/worker/fetches
scopes:
- secrets:get:project/releng/mozilla/mozilla-deb-pkg-manager/build/level-1/ci
- secrets:get:project/releng/mozilla/mozilla-gcp-ar-pkg-manager/build/level-1/ci
dependencies:
test: test-unit
fetches:
Expand Down
6 changes: 3 additions & 3 deletions taskcluster/ci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ trust-domain: "mozilla"
task-priority: low

taskgraph:
cached-task-prefix: "mozilla.v2.mozilla-deb-pkg-manager"
cached-task-prefix: "mozilla.v2.mozilla-gcp-ar-pkg-manager"
repositories:
mozilla-deb-pkg-manager:
name: "mozilla-deb-pkg-manager"
mozilla-gcp-ar-pkg-manager:
name: "mozilla-gcp-ar-pkg-manager"

workers:
aliases:
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/scripts/codecov-upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def fetch_secret(secret_name):
return r.json()["secret"]


token = fetch_secret("project/releng/mozilla/mozilla-deb-pkg-manager/build/level-1/ci")[
token = fetch_secret("project/releng/mozilla/mozilla-gcp-ar-pkg-manager/build/level-1/ci")[
"codecov_api_token"
]
uploader = FETCHES_DIR / "codecov"
Expand Down
8 changes: 4 additions & 4 deletions test/test_mozilla_deb_pkg_manager.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import sys
import types

import mozilla_deb_pkg_manager # noqa
import mozilla_gcp_ar_pkg_manager # noqa


def test_mozilla_deb_pkg_manager():
assert "mozilla_deb_pkg_manager" in sys.modules
def test_mozilla_gcp_ar_pkg_manager():
assert "mozilla_gcp_ar_pkg_manager" in sys.modules


def test_cli():
assert isinstance(mozilla_deb_pkg_manager.cli, types.ModuleType)
assert isinstance(mozilla_gcp_ar_pkg_manager.cli, types.ModuleType)

0 comments on commit f33f0d7

Please sign in to comment.