aa-metenox


Nameaa-metenox JSON
Version 1.1.1 PyPI version JSON
download
home_pageNone
SummaryMetenox app config
upload_time2024-10-24 11:40:01
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Metenox

AA module for Metenox management.

[![release](https://img.shields.io/pypi/v/aa-metenox?label=release)](https://pypi.org/project/aa-metenox/)
[![python](https://img.shields.io/pypi/pyversions/aa-metenox)](https://pypi.org/project/aa-metenox/)
[![django](https://img.shields.io/pypi/djversions/aa-metenox?label=django)](https://pypi.org/project/aa-metenox/)
[![license](https://img.shields.io/badge/license-MIT-green)](https://gitlab.com/r0kym/aa-metenox/-/blob/master/LICENSE)

## Features:

- Imports moon scans from the [aa-moonmining](https://gitlab.com/ErikKalkoken/aa-moonmining) application
- Import Metenoxes from a corporation
  - Displays remaining fuel
  - Displays currently stored moon materials
- Manager overview of corporation displaying their number of Metenoxes and profit

### TODO:

- [ ] Setup notifications when the fuel/reagent levels are low

### What this app won't do:
- Estimate moon price for athanor.
  Use [aa-moonmining](https://gitlab.com/ErikKalkoken/aa-moonmining)
- Ping when metenox are being reffed
  Use [aa-structures](https://gitlab.com/ErikKalkoken/aa-structures)

This module aims to be specific for Metenox management.

### Screenshots

![moon details](images/moon_details.png)
![metenox window](images/metenox_window.png)
![metenox details](images/metenox_details.png)
![corporation window](images/corporation_window.png)

## Installation

### Step 1 - Check prerequisites

1. Metenox is a plugin for Alliance Auth. If you don't have Alliance Auth running already, please install it first before proceeding. (see the official [AA installation guide](https://allianceauth.readthedocs.io/en/latest/installation/auth/allianceauth/) for details)

2. Metenox requires the Alliance Auth module [aa-moonmining](https://gitlab.com/ErikKalkoken/aa-moonmining) to function.
  The moon database and other utilities are imported from this module.

### Step 2 - Install app

Make sure you are in the virtual environment (venv) of your Alliance Auth installation. Then install the newest release from PyPI:

```bash
pip install aa-metenox
```

### Step 3 - Configure Auth settings

Configure your Auth settings (`local.py`) as follows:

- Add `'metenox'` to `INSTALLED_APPS`
- Add below lines to your settings file:

```python
CELERYBEAT_SCHEDULE['metenox_update_prices'] = {
    'task': 'metenox.tasks.update_prices',
    'schedule': crontab(minute='0', hour='*/12'),
}
CELERYBEAT_SCHEDULE['metenox_update_moons_from_moonmining'] = {
    'task': 'metenox.tasks.update_moons_from_moonmining',
    'schedule': crontab(minute='0', hour='*/3'),
}

CELERYBEAT_SCHEDULE['metenox_update_all_holdings'] = {
    'task': 'metenox.tasks.update_all_holdings',
    'schedule': crontab(minute='0', hour='*/1')
}

CELERYBEAT_SCHEDULE['metenox_send_daily_analytics'] = {
  'task': 'metenox.tasks.send_daily_analytics',
  'schedule': crontab(minute='0', hour='5')
}
```


Note: the delay of the `update_moons_from_moonmining` task is intentionally long.
If you know moons will be added in your database often you can reduce it for them to appear faster.
You can even not use this task at all and only update moon scans with the `metenox_update_moons_from_moonmining` [command](#commands).

For the `send_daily_analytics` refer to [analytics](#analytics)

Optional: Alter the application settings.
The list can be found in [Settings](#settings)

### Step 4 - Finalize App installation

Run migrations & copy static files

```bash
python manage.py migrate
python manage.py collectstatic --noinput
```

Restart your supervisor services for Auth.

### Setp 5 - Load Goo from ESI

Run the following management command to load all moon materials from ESI.
This only has to be run once.

```bash
python manage.py metenox_load_eve
```

Wait until the command is finished before continuing.

### Step 5 - Load data

First load the data from the moonmining module using
```bash
python manage.py metenox_update_moons_from_moonmining
```

Once it's done update their prices with

```bash
python manage.py metenox_update_all_prices
```

## Analytics

This application will send anonymous analytic data using Alliance Auth built-in [analytics module](https://allianceauth.readthedocs.io/en/v4.3.1/features/core/analytics.html).
If you wish to disable the analytics for this application you can easily do so by removing the `metenox_send_daily_analytics` task.

The collected analytics are
- number of owners
- number of moons
- number of metenoxes

## Permissions

Permissions overview.

| Name                  | Description                                                                                              |
|-----------------------|----------------------------------------------------------------------------------------------------------|
| `view_moons`          | This permissions allow to see all scanned moons of the database                                          |
| `view_metenoxes`      | This permissions allow to add owners and see all metenoxes from the owners corporations                  |
| `corporation_manager` | This permission allows to add webhooks to corporations and edit when a corporation should get fuel pings |
| `auditor`             | This permission allows to see all metenoxes regardless of having an owner in the corporation             |

Users need to have at least `view_moons` or `view_metenoxes` to be able to have any interactions with the application.
For the permissions `corporation_manager` and `auditor` to work properly the user needs to also have the `view_metenoxes` permission.

## Settings

List of settings that can be modified for the application.
You can alter them by adding them in your `local.py` file.

| Name                                 | Description                                                                                                                                        | Default |
|--------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|---------|
| `METENOX_ADMIN_NOTIFICATIONS_ENABLE` | Whether admins will get notifications about important events like when someone adds a new owner.                                                   | True    |
| `METENOX_MOON_MATERIAL_BAY_CAPACITY` | Volume of the Metenox's Moon material Output Bay. Used to calculate how long a metenox takes before being full.<br/>This value shouldn't be edited | 500_000 |
| `METENOX_HOURLY_HARVEST_VOLUME`      | Hourly volume in m3 that a metenox will harvest.<br/>This value shouldn't be edited                                                                | 30_000  |
| `METENOX_HARVEST_REPROCESS_YIELD`    | Yield at which the metenox reprocess the harvested materials.<br/>This value shouldn't be edited                                                   | 0.40    |
| `METENOX_FUEL_BLOCKS_PER_HOUR`       | How many fuel blocks a running Metenox consumes every hours.<br/>This value shouldn't be edited                                                    | 5       |
| `METENOX_MAGMATIC_GASES_PER_HOUR`    | How many magmatic gases a running Metenox consumes every hours.<br/>This value shouldn't be edited                                                 | 88      |


## Commands

The following commands can be used when running the module:

| Name                                   | Description                                                                   |
|----------------------------------------|-------------------------------------------------------------------------------|
| `metenox_load_eve`                     | Loads up the data from `eveuniverse` this command should only be ran once     |
| `metenox_update_all_holdings`          | Fetches all holdings in the database and updates their metenoxes with the ESI |
| `metenox_update_all_prices`            | Fetches new prices from fuzzwork and update the price of all known moons      |
| `metenox_update_moons_from_moonmining` | Checks the moonmining application and adds all missing moons                  |


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "aa-metenox",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "T'rahk Rokym <trahk.rokym@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/52/e3/a9c966c3949c1707e3980ca23880e9ecc05e963186dcb7dfdf114ac9708b/aa_metenox-1.1.1.tar.gz",
    "platform": null,
    "description": "# Metenox\n\nAA module for Metenox management.\n\n[![release](https://img.shields.io/pypi/v/aa-metenox?label=release)](https://pypi.org/project/aa-metenox/)\n[![python](https://img.shields.io/pypi/pyversions/aa-metenox)](https://pypi.org/project/aa-metenox/)\n[![django](https://img.shields.io/pypi/djversions/aa-metenox?label=django)](https://pypi.org/project/aa-metenox/)\n[![license](https://img.shields.io/badge/license-MIT-green)](https://gitlab.com/r0kym/aa-metenox/-/blob/master/LICENSE)\n\n## Features:\n\n- Imports moon scans from the [aa-moonmining](https://gitlab.com/ErikKalkoken/aa-moonmining) application\n- Import Metenoxes from a corporation\n  - Displays remaining fuel\n  - Displays currently stored moon materials\n- Manager overview of corporation displaying their number of Metenoxes and profit\n\n### TODO:\n\n- [ ] Setup notifications when the fuel/reagent levels are low\n\n### What this app won't do:\n- Estimate moon price for athanor.\n  Use [aa-moonmining](https://gitlab.com/ErikKalkoken/aa-moonmining)\n- Ping when metenox are being reffed\n  Use [aa-structures](https://gitlab.com/ErikKalkoken/aa-structures)\n\nThis module aims to be specific for Metenox management.\n\n### Screenshots\n\n![moon details](images/moon_details.png)\n![metenox window](images/metenox_window.png)\n![metenox details](images/metenox_details.png)\n![corporation window](images/corporation_window.png)\n\n## Installation\n\n### Step 1 - Check prerequisites\n\n1. Metenox is a plugin for Alliance Auth. If you don't have Alliance Auth running already, please install it first before proceeding. (see the official [AA installation guide](https://allianceauth.readthedocs.io/en/latest/installation/auth/allianceauth/) for details)\n\n2. Metenox requires the Alliance Auth module [aa-moonmining](https://gitlab.com/ErikKalkoken/aa-moonmining) to function.\n  The moon database and other utilities are imported from this module.\n\n### Step 2 - Install app\n\nMake sure you are in the virtual environment (venv) of your Alliance Auth installation. Then install the newest release from PyPI:\n\n```bash\npip install aa-metenox\n```\n\n### Step 3 - Configure Auth settings\n\nConfigure your Auth settings (`local.py`) as follows:\n\n- Add `'metenox'` to `INSTALLED_APPS`\n- Add below lines to your settings file:\n\n```python\nCELERYBEAT_SCHEDULE['metenox_update_prices'] = {\n    'task': 'metenox.tasks.update_prices',\n    'schedule': crontab(minute='0', hour='*/12'),\n}\nCELERYBEAT_SCHEDULE['metenox_update_moons_from_moonmining'] = {\n    'task': 'metenox.tasks.update_moons_from_moonmining',\n    'schedule': crontab(minute='0', hour='*/3'),\n}\n\nCELERYBEAT_SCHEDULE['metenox_update_all_holdings'] = {\n    'task': 'metenox.tasks.update_all_holdings',\n    'schedule': crontab(minute='0', hour='*/1')\n}\n\nCELERYBEAT_SCHEDULE['metenox_send_daily_analytics'] = {\n  'task': 'metenox.tasks.send_daily_analytics',\n  'schedule': crontab(minute='0', hour='5')\n}\n```\n\n\nNote: the delay of the `update_moons_from_moonmining` task is intentionally long.\nIf you know moons will be added in your database often you can reduce it for them to appear faster.\nYou can even not use this task at all and only update moon scans with the `metenox_update_moons_from_moonmining` [command](#commands).\n\nFor the `send_daily_analytics` refer to [analytics](#analytics)\n\nOptional: Alter the application settings.\nThe list can be found in [Settings](#settings)\n\n### Step 4 - Finalize App installation\n\nRun migrations & copy static files\n\n```bash\npython manage.py migrate\npython manage.py collectstatic --noinput\n```\n\nRestart your supervisor services for Auth.\n\n### Setp 5 - Load Goo from ESI\n\nRun the following management command to load all moon materials from ESI.\nThis only has to be run once.\n\n```bash\npython manage.py metenox_load_eve\n```\n\nWait until the command is finished before continuing.\n\n### Step 5 - Load data\n\nFirst load the data from the moonmining module using\n```bash\npython manage.py metenox_update_moons_from_moonmining\n```\n\nOnce it's done update their prices with\n\n```bash\npython manage.py metenox_update_all_prices\n```\n\n## Analytics\n\nThis application will send anonymous analytic data using Alliance Auth built-in [analytics module](https://allianceauth.readthedocs.io/en/v4.3.1/features/core/analytics.html).\nIf you wish to disable the analytics for this application you can easily do so by removing the `metenox_send_daily_analytics` task.\n\nThe collected analytics are\n- number of owners\n- number of moons\n- number of metenoxes\n\n## Permissions\n\nPermissions overview.\n\n| Name                  | Description                                                                                              |\n|-----------------------|----------------------------------------------------------------------------------------------------------|\n| `view_moons`          | This permissions allow to see all scanned moons of the database                                          |\n| `view_metenoxes`      | This permissions allow to add owners and see all metenoxes from the owners corporations                  |\n| `corporation_manager` | This permission allows to add webhooks to corporations and edit when a corporation should get fuel pings |\n| `auditor`             | This permission allows to see all metenoxes regardless of having an owner in the corporation             |\n\nUsers need to have at least `view_moons` or `view_metenoxes` to be able to have any interactions with the application.\nFor the permissions `corporation_manager` and `auditor` to work properly the user needs to also have the `view_metenoxes` permission.\n\n## Settings\n\nList of settings that can be modified for the application.\nYou can alter them by adding them in your `local.py` file.\n\n| Name                                 | Description                                                                                                                                        | Default |\n|--------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------|---------|\n| `METENOX_ADMIN_NOTIFICATIONS_ENABLE` | Whether admins will get notifications about important events like when someone adds a new owner.                                                   | True    |\n| `METENOX_MOON_MATERIAL_BAY_CAPACITY` | Volume of the Metenox's Moon material Output Bay. Used to calculate how long a metenox takes before being full.<br/>This value shouldn't be edited | 500_000 |\n| `METENOX_HOURLY_HARVEST_VOLUME`      | Hourly volume in m3 that a metenox will harvest.<br/>This value shouldn't be edited                                                                | 30_000  |\n| `METENOX_HARVEST_REPROCESS_YIELD`    | Yield at which the metenox reprocess the harvested materials.<br/>This value shouldn't be edited                                                   | 0.40    |\n| `METENOX_FUEL_BLOCKS_PER_HOUR`       | How many fuel blocks a running Metenox consumes every hours.<br/>This value shouldn't be edited                                                    | 5       |\n| `METENOX_MAGMATIC_GASES_PER_HOUR`    | How many magmatic gases a running Metenox consumes every hours.<br/>This value shouldn't be edited                                                 | 88      |\n\n\n## Commands\n\nThe following commands can be used when running the module:\n\n| Name                                   | Description                                                                   |\n|----------------------------------------|-------------------------------------------------------------------------------|\n| `metenox_load_eve`                     | Loads up the data from `eveuniverse` this command should only be ran once     |\n| `metenox_update_all_holdings`          | Fetches all holdings in the database and updates their metenoxes with the ESI |\n| `metenox_update_all_prices`            | Fetches new prices from fuzzwork and update the price of all known moons      |\n| `metenox_update_moons_from_moonmining` | Checks the moonmining application and adds all missing moons                  |\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Metenox app config",
    "version": "1.1.1",
    "project_urls": {
        "Changelog": "https://gitlab.com/r0kym/aa-metenox/-/blob/main/CHANGELOG.md",
        "Homepage": "https://gitlab.com/r0kym/aa-metenox",
        "Source": "https://gitlab.com/r0kym/aa-metenox",
        "Tracker": "https://gitlab.com/r0kym/aa-metenox/-/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8a6ffc00e4971a592fb2cdbadd130f32e9868b9a6e91cce3710e40f69a0dd584",
                "md5": "7d85d8709cdea198627c88ae6ad7723f",
                "sha256": "6069084459ccaaba1bcb11ff9a738422cd7853f75ced9b38a74d9f47d7748be9"
            },
            "downloads": -1,
            "filename": "aa_metenox-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7d85d8709cdea198627c88ae6ad7723f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 85008,
            "upload_time": "2024-10-24T11:39:59",
            "upload_time_iso_8601": "2024-10-24T11:39:59.923772Z",
            "url": "https://files.pythonhosted.org/packages/8a/6f/fc00e4971a592fb2cdbadd130f32e9868b9a6e91cce3710e40f69a0dd584/aa_metenox-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "52e3a9c966c3949c1707e3980ca23880e9ecc05e963186dcb7dfdf114ac9708b",
                "md5": "a28f7d2878778c8eef0cd37f190629a7",
                "sha256": "4f82b056dda51fd0a8f1b5f9aab7034f5ae5625b264cf7445e981ed9ebaa34b1"
            },
            "downloads": -1,
            "filename": "aa_metenox-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a28f7d2878778c8eef0cd37f190629a7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 59733,
            "upload_time": "2024-10-24T11:40:01",
            "upload_time_iso_8601": "2024-10-24T11:40:01.724640Z",
            "url": "https://files.pythonhosted.org/packages/52/e3/a9c966c3949c1707e3980ca23880e9ecc05e963186dcb7dfdf114ac9708b/aa_metenox-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-24 11:40:01",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "r0kym",
    "gitlab_project": "aa-metenox",
    "lcname": "aa-metenox"
}
        
Elapsed time: 0.33887s