TOMToolkit / tom_base

The base Django project for a Target and Observation Manager
https://tom-toolkit.readthedocs.io
GNU General Public License v3.0
26 stars 46 forks source link

Review of new TOM creation process and documentation #767

Closed rachel3834 closed 3 weeks ago

rachel3834 commented 11 months ago

The purpose of this issue is to review the creation of a basic TOM following the documentation, to identify any broken features or missing documentation. Items that have been checked off have been tested and found to work.

For reference, this testing was done on a Macbook Pro running OS/X Sonoma, using Python 3.11 in a new virtual environment.

Documentation

Functionality

Target Import

TargetListPage

TargetDetailPage

LCO Observation Request Form

Alerts

Observations

Users

rachel3834 commented 11 months ago

Also:

jchate6 commented 11 months ago

"After a target is ingested, and the TOM is displaying the TargetPage, clicking on the Target pulldown menu in the navbar doesn't work." is actually fixed in the most recent TOM release: tomtoolkit 2.15.13 from issue #761

jchate6 commented 11 months ago

Warning installing tom_fink

... Attempting uninstall: django-bootstrap4 Found existing installation: django-bootstrap4 23.2 Uninstalling django-bootstrap4-23.2: Successfully uninstalled django-bootstrap4-23.2 Attempting uninstall: tomtoolkit Found existing installation: tomtoolkit 2.15.12 Uninstalling tomtoolkit-2.15.12: Successfully uninstalled tomtoolkit-2.15.12 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. crispy-bootstrap4 2023.1 requires django-crispy-forms>=2.0, but you have django-crispy-forms 1.14.0 which is incompatible. Successfully installed django-bootstrap4-22.3 django-crispy-forms-1.14.0 django-filter-22.1 elasticsearch-7.17.9 elasticsearch-dsl-7.4.1 pillow-9.5.0 tom-fink-0.4.5 tomtoolkit-2.12.1 urllib3-1.26.18 SUBSEQUENT ERROR: When I subsequently attempt to runserver following this warning, the TOM crashes: Watching for file changes with StatReloader Watching for file changes with StatReloader Performing system checks... registering new views: args: ('groups', , 'groups'), kwargs: {} registering new views: args: ('targets', , 'targets'), kwargs: {} registering new views: args: ('targetextra', , 'targetextra'), kwargs: {} registering new views: args: ('targetname', , 'targetname'), kwargs: {} Exception in thread django-main-thread: Traceback (most recent call last): File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/utils.py", line 69, in __getitem__ return self._engines[alias] ~~~~~~~~~~~~~^^^^^^^ KeyError: 'django' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 1038, in _bootstrap_inner self.run() File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/threading.py", line 975, in run self._target(*self._args, **self._kwargs) File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/utils/autoreload.py", line 64, in wrapper fn(*args, **kwargs) File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/core/management/commands/runserver.py", line 133, in inner_run self.check(display_num_errors=True) File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/core/management/base.py", line 485, in check all_issues = checks.run_checks( ^^^^^^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/core/checks/registry.py", line 88, in run_checks new_errors = check(app_configs=app_configs, databases=databases) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/contrib/admin/checks.py", line 78, in check_dependencies for engine in engines.all(): ^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/utils.py", line 94, in all return [self[alias] for alias in self] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/utils.py", line 94, in return [self[alias] for alias in self] ~~~~^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/utils.py", line 85, in __getitem__ engine = engine_cls(params) ^^^^^^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/backends/django.py", line 24, in __init__ options["libraries"] = self.get_templatetag_libraries(libraries) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/backends/django.py", line 42, in get_templatetag_libraries libraries = get_installed_libraries() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/backends/django.py", line 116, in get_installed_libraries return { ^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/backends/django.py", line 116, in return { ^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/backends/django.py", line 105, in get_template_tag_modules for name in get_package_libraries(pkg): File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/backends/django.py", line 128, in get_package_libraries module = import_module(entry[1]) ^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/tom_dataproducts/templatetags/dataproduct_extras.py", line 19, in from tom_dataproducts.forms import DataProductUploadForm, DataShareForm File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/tom_dataproducts/forms.py", line 48, in class DataProductUploadForm(forms.Form): File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/tom_dataproducts/forms.py", line 60, in DataProductUploadForm widget=forms.ClearableFileInput( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/forms/widgets.py", line 427, in __init__ raise ValueError( ValueError: ClearableFileInput doesn't support uploading multiple files. Traceback (most recent call last): File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/utils.py", line 69, in __getitem__ return self._engines[alias] ~~~~~~~~~~~~~^^^^^^^ KeyError: 'django' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/rstreet1/software/tom_demo/./manage.py", line 22, in main() File "/Users/rstreet1/software/tom_demo/./manage.py", line 18, in main execute_from_command_line(sys.argv) File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line utility.execute() File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv self.execute(*args, **cmd_options) File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/core/management/commands/runserver.py", line 74, in execute super().execute(*args, **options) File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute output = self.handle(*args, **options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/core/management/commands/runserver.py", line 111, in handle self.run(**options) File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/core/management/commands/runserver.py", line 118, in run autoreload.run_with_reloader(self.inner_run, **options) File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/utils/autoreload.py", line 671, in run_with_reloader start_django(reloader, main_func, *args, **kwargs) File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/utils/autoreload.py", line 660, in start_django reloader.run(django_main_thread) File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/utils/autoreload.py", line 343, in run autoreload_started.send(sender=self) File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/dispatch/dispatcher.py", line 176, in send return [ ^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/dispatch/dispatcher.py", line 177, in (receiver, receiver(signal=self, sender=sender, **named)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/autoreload.py", line 43, in watch_for_template_changes for directory in get_template_directories(): ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/autoreload.py", line 16, in get_template_directories for backend in engines.all(): ^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/utils.py", line 94, in all return [self[alias] for alias in self] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/utils.py", line 94, in return [self[alias] for alias in self] ~~~~^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/utils.py", line 85, in __getitem__ engine = engine_cls(params) ^^^^^^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/backends/django.py", line 24, in __init__ options["libraries"] = self.get_templatetag_libraries(libraries) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/backends/django.py", line 42, in get_templatetag_libraries libraries = get_installed_libraries() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/backends/django.py", line 116, in get_installed_libraries return { ^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/backends/django.py", line 116, in return { ^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/backends/django.py", line 105, in get_template_tag_modules for name in get_package_libraries(pkg): File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/template/backends/django.py", line 128, in get_package_libraries module = import_module(entry[1]) ^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/tom_dataproducts/templatetags/dataproduct_extras.py", line 19, in from tom_dataproducts.forms import DataProductUploadForm, DataShareForm File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/tom_dataproducts/forms.py", line 48, in class DataProductUploadForm(forms.Form): File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/tom_dataproducts/forms.py", line 60, in DataProductUploadForm widget=forms.ClearableFileInput( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rstreet1/software/tom_demo_venv/lib/python3.11/site-packages/django/forms/widgets.py", line 427, in __init__ raise ValueError( ValueError: ClearableFileInput doesn't support uploading multiple files.
jchate6 commented 11 months ago

Error installing tom_antares

... In file included from /private/var/folders/4z/rk7n9jss74g3shm9z6msmyvh0000gp/T/pip-install-clvss3og/confluent-kafka_c4be6e80a1524b3fa91b9ab93fbddaef/src/confluent_kafka/src/Admin.c:17: /private/var/folders/4z/rk7n9jss74g3shm9z6msmyvh0000gp/T/pip-install-clvss3og/confluent-kafka_c4be6e80a1524b3fa91b9ab93fbddaef/src/confluent_kafka/src/confluent_kafka.h:23:10: fatal error: 'librdkafka/rdkafka.h' file not found #include ^~~~~~~~~~~~~~~~~~~~~~ 1 error generated. error: command '/usr/bin/clang' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for confluent-kafka Building wheel for bson (pyproject.toml) ... done Created wheel for bson: filename=bson-0.5.10-py3-none-any.whl size=11978 sha256=73ee958cf4ecfbf0aea6c7899974ae9f835ebc5035d1db7924f3529bee33a6ea Stored in directory: /Users/rstreet1/Library/Caches/pip/wheels/cb/f3/45/c859e83339943dfe2f43e1c9aaebdc00db321191a6fe120947 Successfully built antares-client bson Failed to build confluent-kafka ERROR: Could not build wheels for confluent-kafka, which is required to install pyproject.toml-based projects