ugrc-swapper


Nameugrc-swapper JSON
Version 1.2.2 PyPI version JSON
download
home_pagehttps://github.com/agrc/swapper
SummaryMove data from one SDE database to another with minimal downtime
upload_time2024-04-11 00:36:44
maintainerNone
docs_urlNone
authorUGRC
requires_pythonNone
licenseMIT
keywords gis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # swapper

## This tool will

1. Take a sgid-internal feature class name (ie SGID.OWNER.FeatureClass) as input.
1. Parse the name to get the corresponding connection files in L:\sgid_to_agol\ConnectionFilesSGID
1. Check if the input sgid-internal connection file exists
1. Check if the output sgid10 connection file exists
1. Check if the sgid-internal input feature class exists
1. Copy the feature class to sgid10 named fc_temp
1. Run a function to delete the table locks on the old sgid10 feature class that's being replaced
1. Delete the sgid10 feature class that's being replaced
1. Rename the new copied feature class from fc_temp to fc
1. Update the privileges for the agrc and SearchAPI users

## Setup

### Production

1. `git clone https://github.com/agrc/swapper`
1. `cd swapper`
1. From within a virtual environment that has python 3.6+ and arcpy: `pip install .\ -U`
1. Set `SWAPPER_*` environment variables as outlined in [.env.sample].

### Development

1. Clone project.
1. Update `.env` file to be the correct path to the share folder.
1. From within a virtual environment that has python 3.6+ and arcpy: `pip install -e .[tests]`
1. `swapper ...`
1. `pytest`

## Usage

### CLI

Run `swapper` for usage information.

### From within other python code

```python
from swapper import swapper

swapper.copy_and_replace('sgid.boundaries.counties')
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/agrc/swapper",
    "name": "ugrc-swapper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "gis",
    "author": "UGRC",
    "author_email": "ugrc-developers@utah.gov",
    "download_url": "https://files.pythonhosted.org/packages/e0/d7/e15b9f5b2033aa34b6c99dd3e40abff633752fde2e90c560f443e3e95dc2/ugrc-swapper-1.2.2.tar.gz",
    "platform": null,
    "description": "# swapper\n\n## This tool will\n\n1. Take a sgid-internal feature class name (ie SGID.OWNER.FeatureClass) as input.\n1. Parse the name to get the corresponding connection files in L:\\sgid_to_agol\\ConnectionFilesSGID\n1. Check if the input sgid-internal connection file exists\n1. Check if the output sgid10 connection file exists\n1. Check if the sgid-internal input feature class exists\n1. Copy the feature class to sgid10 named fc_temp\n1. Run a function to delete the table locks on the old sgid10 feature class that's being replaced\n1. Delete the sgid10 feature class that's being replaced\n1. Rename the new copied feature class from fc_temp to fc\n1. Update the privileges for the agrc and SearchAPI users\n\n## Setup\n\n### Production\n\n1. `git clone https://github.com/agrc/swapper`\n1. `cd swapper`\n1. From within a virtual environment that has python 3.6+ and arcpy: `pip install .\\ -U`\n1. Set `SWAPPER_*` environment variables as outlined in [.env.sample].\n\n### Development\n\n1. Clone project.\n1. Update `.env` file to be the correct path to the share folder.\n1. From within a virtual environment that has python 3.6+ and arcpy: `pip install -e .[tests]`\n1. `swapper ...`\n1. `pytest`\n\n## Usage\n\n### CLI\n\nRun `swapper` for usage information.\n\n### From within other python code\n\n```python\nfrom swapper import swapper\n\nswapper.copy_and_replace('sgid.boundaries.counties')\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Move data from one SDE database to another with minimal downtime",
    "version": "1.2.2",
    "project_urls": {
        "Homepage": "https://github.com/agrc/swapper",
        "Issue Tracker": "https://github.com/agrc/swapper/issues"
    },
    "split_keywords": [
        "gis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "256629dfd9f1058bc0b28127086b2a02dfde73f43b7b9b72e85284c53bb320bd",
                "md5": "387930547a43f803ff3d6bcb548e2704",
                "sha256": "611813e03409f5692150b891a4eb0018a011d764bf6a20edd6fd17279eb5ee7e"
            },
            "downloads": -1,
            "filename": "ugrc_swapper-1.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "387930547a43f803ff3d6bcb548e2704",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7215,
            "upload_time": "2024-04-11T00:36:44",
            "upload_time_iso_8601": "2024-04-11T00:36:44.017214Z",
            "url": "https://files.pythonhosted.org/packages/25/66/29dfd9f1058bc0b28127086b2a02dfde73f43b7b9b72e85284c53bb320bd/ugrc_swapper-1.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e0d7e15b9f5b2033aa34b6c99dd3e40abff633752fde2e90c560f443e3e95dc2",
                "md5": "8f4bc1b63ad0108192236c17e1f529fb",
                "sha256": "ea1f701cc99924a871033a145c3b5985da5779aa8649be219a94f6766e44f762"
            },
            "downloads": -1,
            "filename": "ugrc-swapper-1.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "8f4bc1b63ad0108192236c17e1f529fb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7684,
            "upload_time": "2024-04-11T00:36:44",
            "upload_time_iso_8601": "2024-04-11T00:36:44.984404Z",
            "url": "https://files.pythonhosted.org/packages/e0/d7/e15b9f5b2033aa34b6c99dd3e40abff633752fde2e90c560f443e3e95dc2/ugrc-swapper-1.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-11 00:36:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "agrc",
    "github_project": "swapper",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "ugrc-swapper"
}
        
Elapsed time: 0.28128s