Skip to content

About

Extra CLI commands for managing Arches

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

54 Commits

Folders and files

Repository files navigation

Arches Extensions

Overview

The purpose of this package is unify some custom utilities that I've developed on and off while I work on different Arches projects. It is a work in progress. Maybe some of these will eventually become part of core Arches, and in the meantime I hope others find it helpful.

This package only contains a suite of Django management commands, though more content may be added in the future.

repo -- legiongis/arches-extensions

docs site -- legiongis.github.io/arches-extensions.

get in touch -- Feel free to open a ticket or get in touch directly, adam@legiongis.com. I'd love to collaborate if you see something here that could be better, or if you have ideas for other utilities that should be added. The only requirement is that the content be generic, not implementation-specific.

.. warning:: These commands have been developed alongside Arches 6.x, and may not be compatible with Arches 7+.

Command documentation

See: arches_extensions/management/commands.html.

Installation

For use in Arches

These tools are packaged as a Django app so they can be easily integrated into an existing Arches installation. For this to work, you must install this package into your Arches virtual environment like this:

pip install git+https://github.com/legiongis/arches-extensions.git --no-binary arches-extensions

Now, in your Arches project's settings.py file, add arches_extensions to your INSTALLED_APPS:

INSTALLED_APPS += ('arches_extensions', )

It may be wiser to place this in your project's settings_local.py file, just remember to import INSTALLED_APPS:

from .settings import INSTALLED_APPS
INSTALLED_APPS += ('arches_extensions', )

That's it! You can now start using these management commands and other utilities in your existing Arches project.

To confirm the installation, run

python manage.py --help

and you should see a new section called arches_extensions with a list of new commands.

For development/contribution

To create a development installation, you can fork/clone the repo and then pip install from that clone:

git clone https://github.com/legiongis/arches-extensions
pip install -e arches-extensions[dev]

Now add arches_extensions to your Arches INSTALLED_APPS as described above. Use python manage.py --help to confirm installation.

You can now edit within the local clone of the repo, and your changes will be reflected whenever you run a management command.

Build documentation

Documentation for this project is autogenerated from docstrings within the code using pydoc and published with GitHub pages. Run this script:

python ./generate_pdocs.py

And you should see new HTML content added to the /docs directory within your local clone. Commit and push this content and GitHub pages will be rebuilt.

Uninstall

To uninstall the app, remove arches_extensions from INSTALLED_APPS and then run

pip uninstall arches-extensions

Command structure

The management commands are generally designed like:

python manage.py [topic] [operation] [--extra-options]

Where the topic may be maplayer and an operation may be list (list all map layers).

For help, use

python manage.py [command] --help

to learn more about any specific command.

A brief overview of each command is provided below, but for the real details you should head to management/commands and browse the submodules documentation.

.. warning:: These are all a work-in-progress, some will surely fail right now

.. danger:: Be aware that some of the commands will alter database content (though generally there should be confirmation prompts before this happens). Always work with a backup copy of your database.

About

Extra CLI commands for managing Arches

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages