Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ Other frontend development commands:
* `npm run lint`: Lint the code
* `npm run format`: Format the code

**NB**: If you are getting `index.html` static file not found error, run `npm run build` to create the file. If the errors persist, copy `montage\montage\static\a\index.html` and manually copy and paste it to a new file in the `montage/static/index.html`.

### 5. Use the Makefile to start the backend
* Open a new terminal tab and change directory to root of repo
* Copy and edit `config.dev.yaml` based on `config.default.yaml`
Expand All @@ -88,6 +90,13 @@ This will build the docker image for the montage backend and start the container
* `make logs` : Stream the backend container logs in real-time.
* `make restart` : Restart the backend container

**NB**: if there is a conflict during the installation of the python libraries, do the following:

* Create a virtual environment by running `tox`
* On windows, activate the environment using: `.tox\py311\Scripts\activate`
* On Linux, use `source .tox/py311/bin/activate`
* Then run `make start`.

### 6. Access the Application
* With development server: Open http://localhost:5173 in your browser (frontend)
* With backend serving frontend: Open http://localhost:5001 in your browser
Expand Down
37 changes: 31 additions & 6 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 15 additions & 2 deletions montage/rdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@

from clastic.errors import Forbidden

import logging
logger = logging.getLogger(__name__)

from .utils import (format_date,
basestring,
to_unicode,
Expand Down Expand Up @@ -1554,7 +1557,12 @@ def activate_round(self, round_id):
return

def add_entries_from_cat(self, round_id, cat_name):
rnd = self.user_dao.get_round(round_id)
try:
rnd = self.user_dao.get_round(round_id)
except Exception as e:
logger.error("Round not found: %s", round_id)
raise InvalidAction("Round not found")

if ENV_NAME == 'dev':
source = 'remote'
else:
Expand All @@ -1569,7 +1577,12 @@ def add_entries_from_cat(self, round_id, cat_name):
return entries

def add_entries_by_name(self, round_id, file_names):
rnd = self.user_dao.get_round(round_id)
try:
rnd = self.user_dao.get_round(round_id)
except Exception as e:
logger.error("Round not found: %s", round_id)
raise InvalidAction("Round not found")

if ENV_NAME == 'dev':
source = 'remote'
else:
Expand Down