This is an Arches extension app providing the basis of a Marine Historic Environment inventory system using the Arches cultural heritage inventory software.
Mariner App was initially developed for use by Historic England to provide an inventory for maritime cultural heritage off the coast of England. As such, there are elements of the out-of-the-box Mariner App which reflects this geographic focus.
- Python 3.10+ (Check the Arches python requirements and match your Python version))
- Arches >=7.6.0, <7.7.0
For development purposes, you can treat this app as a standard Arches project. Either use the instructions for developing an Arches project or use the arches-containers configuration included in this repository.
-
For development (standard):
pip install -e '/path/to/mariner_app[dev]'This installs the app in editable mode, allowing you to make changes and see them reflected immediately without needing to reinstall.
-
For development using included arches-container configuration:
arches-containers is a tool developed by Historic England to enable the quick set up of development environments. You can find out more about arches-containers and how to install and use it, please see the arches-containers documentation on PyPI
Please ensure that you clone the mariner-app repository into a directory that uses underscores instead of hyphens, as the arches-containers configuration expects this format. For example, clone it to
mariner_app.git clone https://github.com/HistoricEngland/mariner-app.git mariner_app
This repository includes an
arches-containersproject configuration, so you can import, activate, and start the system as follows:-
Ensure Docker is installed and running.
-
Navigate to your workspace directory (the root where your projects and containers live).
-
Import the arches-container project configuration:
act import -p mariner_app
-
Activate the project:
act activate -p mariner_app
-
Start the system:
act up
-
Once setup and webpack builds are complete, open a browser and navigate to
http://localhost:8002or useact viewin a terminal to open the project in your default browser.
-
While you can use Mariner App as a standalone app, you may wish to use it as part of an Arches Project. The following steps explain how to do this:
Add the following to your pyproject.toml dependencies (in the [project] section):
mariner-app @ git+https://github.com/HistoricEngland/mariner-app.git@release/1.0.0Example:
dependencies = [
"arches==7.6.17",
"mariner-app @ git+https://github.com/HistoricEngland/mariner-app.git@release/1.0.0",
]Add the following to the appropriate locations:
DATATYPE_LOCATIONS.append("mariner_app.datatypes")
FUNCTION_LOCATIONS.append("mariner_app.functions")
SEARCH_COMPONENT_LOCATIONS.append("mariner_app.search.components")Add to INSTALLED_APPS and ARCHES_APPLICATIONS:
INSTALLED_APPS = (
...
"your_project",
"mariner_app",
)
ARCHES_APPLICATIONS = ("mariner_app",)Include the app's URLs (add project URLs before this):
urlpatterns = [
# ... your project urls ...
path("", include("mariner_app.urls")),
]Run the following command to apply any database migrations required by this app:
if using the arches-containers, run this in the application container
python manage.py migrateFrom the directory containing your your_project/package.json:
if using arches-containers, run this in the application container or restart the webpack
npm install
npm run build_developmentpython manage.py runserverTo complete setting up Mariner App, you will need to load the package which contains the graphs, reference data and settings.
Run the following command to load the package files for Mariner App:
if using the arches-containers, run this in the application container
python manage.py packages -o load_package -s '/path/to/mariner_app/mariner_app/pkg/'This project is licensed under the GNU AGPLv3. See the LICENSE file for details.
For more information on deploying your Arches project, see the Arches Deployment Guide.