From 4540fb8625d82144d66c5ca260089789f46a47a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20L=C3=B6sche?= Date: Mon, 26 Feb 2024 21:45:15 +0100 Subject: [PATCH] Rename Resoto -> Fix Inventory --- .github/CODEOWNERS | 2 +- .github/ISSUE_TEMPLATE/bug.yml | 4 ++-- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/ISSUE_TEMPLATE/enhancement.yml | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 4 ++-- .../{resotodata.yml => fixinventorydata.yml} | 12 ++++++------ .gitignore | 2 -- MANIFEST.in | 2 +- README.md | 4 ++-- fixinventorydata/__init__.py | 14 ++++++++++++++ {resotodata => fixinventorydata}/__main__.py | 12 ++++++------ {resotodata => fixinventorydata}/cloud.py | 2 +- fixinventorydata/co2.py | 4 ++++ fixinventorydata/colors.py | 4 ++++ .../data/ccfdataset.json | 0 .../data/colors.json | 2 +- .../data/instances.json | 0 .../data/regions.json | 0 {resotodata => fixinventorydata}/utils.py | 2 +- resotodata/__init__.py | 14 -------------- resotodata/co2.py | 4 ---- resotodata/colors.py | 4 ---- setup.py | 18 +++++++++--------- test/test_args.py | 2 +- tox.ini | 2 +- 25 files changed, 58 insertions(+), 60 deletions(-) rename .github/workflows/{resotodata.yml => fixinventorydata.yml} (85%) create mode 100644 fixinventorydata/__init__.py rename {resotodata => fixinventorydata}/__main__.py (97%) rename {resotodata => fixinventorydata}/cloud.py (98%) create mode 100644 fixinventorydata/co2.py create mode 100644 fixinventorydata/colors.py rename {resotodata => fixinventorydata}/data/ccfdataset.json (100%) rename {resotodata => fixinventorydata}/data/colors.json (98%) rename {resotodata => fixinventorydata}/data/instances.json (100%) rename {resotodata => fixinventorydata}/data/regions.json (100%) rename {resotodata => fixinventorydata}/utils.py (98%) delete mode 100644 resotodata/__init__.py delete mode 100644 resotodata/co2.py delete mode 100644 resotodata/colors.py diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 739ee15..97fb425 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @lloesche @aquamatthias @meln1k @anjafr +* @lloesche @aquamatthias @meln1k diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 9778ad9..f9ca5d3 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -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 @@ -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). diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 460177c..10babd3 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -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 diff --git a/.github/ISSUE_TEMPLATE/enhancement.yml b/.github/ISSUE_TEMPLATE/enhancement.yml index 2d309e8..cce7b06 100644 --- a/.github/ISSUE_TEMPLATE/enhancement.yml +++ b/.github/ISSUE_TEMPLATE/enhancement.yml @@ -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). diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0a70b90..2b9ca82 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -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 @@ -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). diff --git a/.github/workflows/resotodata.yml b/.github/workflows/fixinventorydata.yml similarity index 85% rename from .github/workflows/resotodata.yml rename to .github/workflows/fixinventorydata.yml index 83768cc..6428cdb 100644 --- a/.github/workflows/resotodata.yml +++ b/.github/workflows/fixinventorydata.yml @@ -1,4 +1,4 @@ -name: resotodata +name: fixinventorydata on: push: tags: @@ -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 @@ -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 @@ -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/ diff --git a/.gitignore b/.gitignore index 796bde8..2e110d2 100644 --- a/.gitignore +++ b/.gitignore @@ -27,8 +27,6 @@ docs/_build/ .DS_Store .coverage .dccache -resotoshell/backup_* -resotocore/tools/Assets out/ *.iml **/.hypothesis/ diff --git a/MANIFEST.in b/MANIFEST.in index 85ce626..8fca9b6 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include resotodata/data/* +include fixinventorydata/data/* diff --git a/README.md b/README.md index 00a05a8..f77d037 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/fixinventorydata/__init__.py b/fixinventorydata/__init__.py new file mode 100644 index 0000000..f1d263d --- /dev/null +++ b/fixinventorydata/__init__.py @@ -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" diff --git a/resotodata/__main__.py b/fixinventorydata/__main__.py similarity index 97% rename from resotodata/__main__.py rename to fixinventorydata/__main__.py index 2e503aa..3df8795 100644 --- a/resotodata/__main__.py +++ b/fixinventorydata/__main__.py @@ -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) @@ -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 @@ -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], @@ -215,7 +215,7 @@ 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) @@ -223,7 +223,7 @@ def write_colors() -> None: 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) @@ -231,7 +231,7 @@ def write_ccfdataset(ccfdataset: dict) -> None: 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) diff --git a/resotodata/cloud.py b/fixinventorydata/cloud.py similarity index 98% rename from resotodata/cloud.py rename to fixinventorydata/cloud.py index 1b19d87..4dad927 100644 --- a/resotodata/cloud.py +++ b/fixinventorydata/cloud.py @@ -1,4 +1,4 @@ -from resotodata.utils import LazyLoadedDict +from fixinventorydata.utils import LazyLoadedDict regions = LazyLoadedDict("regions.json") diff --git a/fixinventorydata/co2.py b/fixinventorydata/co2.py new file mode 100644 index 0000000..9fb4e35 --- /dev/null +++ b/fixinventorydata/co2.py @@ -0,0 +1,4 @@ +from fixinventorydata.utils import LazyLoadedDict + + +ccfdataset = LazyLoadedDict("ccfdataset.json") diff --git a/fixinventorydata/colors.py b/fixinventorydata/colors.py new file mode 100644 index 0000000..afb787d --- /dev/null +++ b/fixinventorydata/colors.py @@ -0,0 +1,4 @@ +from fixinventorydata.utils import LazyLoadedDict + + +colors = LazyLoadedDict("colors.json") diff --git a/resotodata/data/ccfdataset.json b/fixinventorydata/data/ccfdataset.json similarity index 100% rename from resotodata/data/ccfdataset.json rename to fixinventorydata/data/ccfdataset.json diff --git a/resotodata/data/colors.json b/fixinventorydata/data/colors.json similarity index 98% rename from resotodata/data/colors.json rename to fixinventorydata/data/colors.json index 869a2b0..951b028 100644 --- a/resotodata/data/colors.json +++ b/fixinventorydata/data/colors.json @@ -1,5 +1,5 @@ { - "resoto": { + "fixinventory": { "light": { "main": [ 7744983, diff --git a/resotodata/data/instances.json b/fixinventorydata/data/instances.json similarity index 100% rename from resotodata/data/instances.json rename to fixinventorydata/data/instances.json diff --git a/resotodata/data/regions.json b/fixinventorydata/data/regions.json similarity index 100% rename from resotodata/data/regions.json rename to fixinventorydata/data/regions.json diff --git a/resotodata/utils.py b/fixinventorydata/utils.py similarity index 98% rename from resotodata/utils.py rename to fixinventorydata/utils.py index f1f962a..b744a2a 100644 --- a/resotodata/utils.py +++ b/fixinventorydata/utils.py @@ -4,7 +4,7 @@ class LazyLoadedDict(dict): - BASE_PACKAGE = "resotodata" + BASE_PACKAGE = "fixinventorydata" DATA_DIR = "data" def __init__(self, filename): diff --git a/resotodata/__init__.py b/resotodata/__init__.py deleted file mode 100644 index 2c04dc7..0000000 --- a/resotodata/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -""" -Miscellaneous Resoto Data -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Miscellaneous Resoto data. -:copyright: © 2023 Some Engineering Inc. -:license: Apache 2.0, see LICENSE for more details. -""" - -__title__ = "resotodata" -__description__ = "Miscellaneous Resoto data." -__author__ = "Some Engineering Inc." -__license__ = "Apache 2.0" -__copyright__ = "Copyright © 2023 Some Engineering Inc." -__version__ = "0.2.3" diff --git a/resotodata/co2.py b/resotodata/co2.py deleted file mode 100644 index 3c0f506..0000000 --- a/resotodata/co2.py +++ /dev/null @@ -1,4 +0,0 @@ -from resotodata.utils import LazyLoadedDict - - -ccfdataset = LazyLoadedDict("ccfdataset.json") diff --git a/resotodata/colors.py b/resotodata/colors.py deleted file mode 100644 index 054cb79..0000000 --- a/resotodata/colors.py +++ /dev/null @@ -1,4 +0,0 @@ -from resotodata.utils import LazyLoadedDict - - -colors = LazyLoadedDict("colors.json") diff --git a/setup.py b/setup.py index a922c11..01b8220 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -import resotodata +import fixinventorydata from setuptools import setup, find_packages @@ -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, diff --git a/test/test_args.py b/test/test_args.py index 0379bdc..8b8a944 100644 --- a/test/test_args.py +++ b/test/test_args.py @@ -1,4 +1,4 @@ -from resotodata.cloud import regions +from fixinventorydata.cloud import regions def test_data(): diff --git a/tox.ini b/tox.ini index 2d5ac49..dae3a44 100644 --- a/tox.ini +++ b/tox.ini @@ -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]