Skip to content

Commit

Permalink
Merge pull request #8 from someengineering/lloesche/rename
Browse files Browse the repository at this point in the history
Rename Resoto -> Fix Inventory
  • Loading branch information
lloesche authored Feb 26, 2024
2 parents 2a68fa8 + 4540fb8 commit a018859
Show file tree
Hide file tree
Showing 25 changed files with 58 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @lloesche @aquamatthias @meln1k @anjafr
* @lloesche @aquamatthias @meln1k
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ body:
id: version
attributes:
label: Version
description: What version of Resoto are you running?
description: What version of Fix Inventory are you running?
validations:
required: true
- type: input
Expand Down Expand Up @@ -52,4 +52,4 @@ body:
- type: markdown
attributes:
value: |
By submitting this bug report, I agree to follow the [code of conduct](https://resoto.com/code-of-conduct).
By submitting this bug report, I agree to follow the [code of conduct](https://inventory.fix.security/code-of-conduct).
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ contact_links:
url: https://discord.gg/someengineering
about: Chat with other users and the development team
- name: 📄 Documentation
url: https://resoto.com/docs
url: https://inventory.fix.security/docs
about: Read and search documentation
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ body:
- type: markdown
attributes:
value: |
By submitting this feature request, I agree to follow the [code of conduct](https://resoto.com/code-of-conduct).
By submitting this feature request, I agree to follow the [code of conduct](https://inventory.fix.security/code-of-conduct).
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

- [ ] Add test coverage for new or updated functionality
- [ ] Lint and test with `tox`
- [ ] Document new or updated functionality (someengineering/resoto.com#XXXX)
- [ ] Document new or updated functionality (someengineering/inventory.fix.security#XXXX)

# Issues Fixed

Expand All @@ -21,4 +21,4 @@

# Code of Conduct

By submitting this pull request, I agree to follow the [code of conduct](https://resoto.com/code-of-conduct).
By submitting this pull request, I agree to follow the [code of conduct](https://inventory.fix.security/code-of-conduct).
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: resotodata
name: fixinventorydata
on:
push:
tags:
Expand All @@ -7,12 +7,12 @@ on:
- main
pull_request:
paths:
- 'resotodata/**'
- 'fixinventorydata/**'
- '.github/**'

jobs:
resotodata:
name: "resotodata"
fixinventorydata:
name: "fixinventorydata"
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -21,7 +21,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: '3.11'
architecture: 'x64'

- name: Restore dependency cache
Expand Down Expand Up @@ -53,5 +53,5 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_RESOTODATA }}
password: ${{ secrets.PYPI_FIXINVENTORYDATA }}
packages_dir: ./dist/
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ docs/_build/
.DS_Store
.coverage
.dccache
resotoshell/backup_*
resotocore/tools/Assets
out/
*.iml
**/.hypothesis/
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include resotodata/data/*
include fixinventorydata/data/*
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# `resotodata`
Public Resoto Cloud Data
# `fixinventorydata`
Public Fix Inventory Cloud Data

Location data is open data, licensed under the [Open Data Commons Open Database License (ODbL)](https://opendatacommons.org/licenses/odbl/) by the [OpenStreetMap Foundation (OSMF)](https://wiki.osmfoundation.org/wiki/Main_Page).

Expand Down
14 changes: 14 additions & 0 deletions fixinventorydata/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
Miscellaneous Fix Inventory Data
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Miscellaneous Fix Inventory data.
:copyright: © 2024 Some Engineering Inc.
:license: Apache 2.0, see LICENSE for more details.
"""

__title__ = "fixinventorydata"
__description__ = "Miscellaneous Fix Inventory data."
__author__ = "Some Engineering Inc."
__license__ = "Apache 2.0"
__copyright__ = "Copyright © 2024 Some Engineering Inc."
__version__ = "0.2.4"
12 changes: 6 additions & 6 deletions resotodata/__main__.py → fixinventorydata/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def gen_aws_regions() -> dict:


def write_regions(regions: dict) -> None:
regions_file = resource_filename("resotodata", "data/regions.json")
regions_file = resource_filename("fixinventorydata", "data/regions.json")
print(f"Writing regions to {regions_file}")
with open(regions_file, "w") as f:
json.dump(regions, f, indent=4)
Expand Down Expand Up @@ -179,7 +179,7 @@ def aws_regions() -> dict:
def lookup_location(short_region: str, long_region: str) -> Optional[Location]:
try:
print(f"Looking up {short_region} {long_region}")
geolocator = Nominatim(user_agent="ResotoMisc")
geolocator = Nominatim(user_agent="FixInventoryMisc")
loc = geolocator.geocode(long_region)
print(f"Found {loc}")
return loc
Expand All @@ -189,7 +189,7 @@ def lookup_location(short_region: str, long_region: str) -> Optional[Location]:

def write_colors() -> None:
colors = {
"resoto": {
"fixinventory": {
"light": {
"main": [0x762DD7, 0x0A253F, 0xAF62F1],
"contrast": [0xFFAF37, 0xE59010, 0xB86200],
Expand All @@ -215,23 +215,23 @@ def write_colors() -> None:
},
}

colors_file = resource_filename("resotodata", "data/colors.json")
colors_file = resource_filename("fixinventorydata", "data/colors.json")
print(f"Writing colors to {colors_file}")
with open(colors_file, "w") as f:
json.dump(colors, f, indent=4)
f.write("\n")


def write_ccfdataset(ccfdataset: dict) -> None:
ccfdataset_file = resource_filename("resotodata", "data/ccfdataset.json")
ccfdataset_file = resource_filename("fixinventorydata", "data/ccfdataset.json")
print(f"Writing CCF dataset to {ccfdataset_file}")
with open(ccfdataset_file, "w") as f:
json.dump(ccfdataset, f, indent=4)
f.write("\n")


def write_instances(instances: dict) -> None:
instances_file = resource_filename("resotodata", "data/instances.json")
instances_file = resource_filename("fixinventorydata", "data/instances.json")
print(f"Writing instances dataset to {instances_file}")
with open(instances_file, "w") as f:
json.dump(instances, f, indent=4)
Expand Down
2 changes: 1 addition & 1 deletion resotodata/cloud.py → fixinventorydata/cloud.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from resotodata.utils import LazyLoadedDict
from fixinventorydata.utils import LazyLoadedDict


regions = LazyLoadedDict("regions.json")
Expand Down
4 changes: 4 additions & 0 deletions fixinventorydata/co2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from fixinventorydata.utils import LazyLoadedDict


ccfdataset = LazyLoadedDict("ccfdataset.json")
4 changes: 4 additions & 0 deletions fixinventorydata/colors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from fixinventorydata.utils import LazyLoadedDict


colors = LazyLoadedDict("colors.json")
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"resoto": {
"fixinventory": {
"light": {
"main": [
7744983,
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion resotodata/utils.py → fixinventorydata/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class LazyLoadedDict(dict):
BASE_PACKAGE = "resotodata"
BASE_PACKAGE = "fixinventorydata"
DATA_DIR = "data"

def __init__(self, filename):
Expand Down
14 changes: 0 additions & 14 deletions resotodata/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions resotodata/co2.py

This file was deleted.

4 changes: 0 additions & 4 deletions resotodata/colors.py

This file was deleted.

18 changes: 9 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import resotodata
import fixinventorydata
from setuptools import setup, find_packages


Expand All @@ -16,19 +16,19 @@


setup(
name=resotodata.__title__,
version=resotodata.__version__,
description=resotodata.__description__,
license=resotodata.__license__,
name=fixinventorydata.__title__,
version=fixinventorydata.__version__,
description=fixinventorydata.__description__,
license=fixinventorydata.__license__,
packages=find_packages(),
long_description=readme,
long_description_content_type="text/markdown",
entry_points={
"console_scripts": [
"resotodata-update-regions = resotodata.__main__:update_regions",
"resotodata-update-colors = resotodata.__main__:update_colors",
"resotodata-update-ccfdataset = resotodata.__main__:update_ccfdataset",
"resotodata-update-instances = resotodata.__main__:update_instances",
"fixinventorydata-update-regions = fixinventorydata.__main__:update_regions",
"fixinventorydata-update-colors = fixinventorydata.__main__:update_colors",
"fixinventorydata-update-ccfdataset = fixinventorydata.__main__:update_ccfdataset",
"fixinventorydata-update-instances = fixinventorydata.__main__:update_instances",
]
},
include_package_data=True,
Expand Down
2 changes: 1 addition & 1 deletion test/test_args.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from resotodata.cloud import regions
from fixinventorydata.cloud import regions


def test_data():
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exclude = .git,.tox,__pycache__,.idea,.pytest_cache,venv
ignore=F403, F405, E722, N806, N813, E266, W503, E203

[pytest]
addopts= -rs -vv --cov=resotodata --cov-report html
addopts= -rs -vv --cov=fixinventorydata --cov-report html
testpaths= test

[testenv]
Expand Down

0 comments on commit a018859

Please sign in to comment.