GithubHelp home page GithubHelp logo

brettkromkamp / contextualise Goto Github PK

View Code? Open in Web Editor NEW
1.0K 25.0 45.0 13.37 MB

Contextualise is an effective tool particularly suited for organising information-heavy projects and activities consisting of unstructured and widely diverse data and information resources

Home Page: https://contextualise.dev/

License: MIT License

Python 84.80% CSS 5.26% JavaScript 9.95%
knowledge-graph flask-application python3 vuejs metamodel sqlite-database python semantic-web cms-backend content-management-system

contextualise's Introduction

PyPI Python 3.x GitHub open issues GitHub closed issues License

Contextualise: Structured Knowledge

Contextualise is an effective tool particularly suited for organising information-heavy projects and activities consisting of unstructured and widely diverse data and information resources — think of investigative journalism, personal and professional research projects, world building (for books, movies or computer games) and many kinds of hobbies.

Contextualise's main dependency is TopicDB, an open source topic maps-based graph store. Topic maps provide a way to describe complex relationships between abstract concepts and real-world (information) resources.

Check out the Awesome Knowledge Management resource, a curated list of amazingly awesome articles, people, projects, applications, software libraries and projects related to the knowledge management space. Alternatively, if you are interested in reading more in-depth articles in relation to knowledge management in general and Contextualise in particular, then check out my blog.

Contextualise's "My maps" view

Contextualise's "My maps" view

Contextualise's topic view

Contextualise's topic view

Contextualise's navigable network graph view

Contextualise's navigable network graph view

Contextualise's interactive 3D viewer

Contextualise's interactive 3D viewer

Why?

I built and published my first (topic maps-based) knowledge documentation tool in 2006 which I was still using until quite recently, almost unmodified, fourteen years later. If I remember correctly, it was built with PHP version 5.2.5! Fourteen years is an eternity in software terms. Nowadays, my preferred choice for web development is Python together with the Flask web development framework.

After fourteen years of using my own and other knowledge management tools, I have several improvements in mind for the next version (many of which are simplifications, for that matter). And perhaps one of the most important reasons for building a new tool like this is that I want it to be open source: both Contextualise (the web application) and TopicDB (the actual topic maps engine on top of which Contextualise is built — also developed by me) are licensed with the permissive open source MIT license.

Feature Support

The following provides an overview of Contextualise's existing (and planned) feature set:

Existing Features

  • Support for multiple (self-contained) topic maps
  • Support for both private and public topic maps (the latter of which is not available to non-admin users until support to deal with inappropriate content is in place)
  • Extensive support for notes including the ability to attach a note to an existing topic and convert a note into a topic
  • Markdown-based text editor for topic text and notes
  • The ability to attach files (including images, PDFs, and so forth) to topics
  • The ability to attach (glTF-based) 3D scenes to topics with an accompanying interactive 3D scene viewer
  • Powerful (semantic) associations with the ability to create typed associations with role-based members
  • Flexible filtering of base names, topic occurrences and associations by scope (that is, context)
  • Navigable network graph visualisation of related topics
  • Auto-complete on all form fields that expect a topic reference
  • Google Docs-like collaboration; that is, being able to share topic maps with other Contextualise users for the purpose of collaboration in one of three ways: 1) can view, 2) can comment or 3) can edit
  • Support for user-defined knowledge paths
  • In place topic creation
  • Quick association creation for frictionless topic-linking and knowledge discovery
  • Associative tagging
  • Augmented Reality (AR) support for 3D occurrences
  • Syntax highlighing for numerous programming languages based on Pygments

Post Version 1.0 Features

  • Network graph visualisation filtering by association types
  • Full-text search
  • Google Maps support to see a topic within its geographical context on one hand and to be able to navigate between topics by means of a (geographic) map, on the other hand
  • Timeline support allowing for the navigation between topics using a visual timeline component
  • WikiMedia API integration to automatically enhance existing topics with relevant information from Wikipedia

For a more exhaustive list of planned features take a look at Contextualise's list of issues.

Installation

Contextualise can be installed using pip:

$ pip install --upgrade contextualise

Contextualise requires Python 3.7 or higher.

Basic Usage

Create a file with the following content:

DATABASE_FILE = "contextualise.db"

Save the file in, for example, your home directory with the file name settings.cfg. Once you have saved the file, open a terminal and export the following environment variable:

$ export CONTEXTUALISE_SETTINGS=$HOME/settings.cfg

The CONTEXTUALISE_SETTINGS environment variable is the path to the settings.cfg file you just created.

Flask's built-in server is not suitable for production purposes. However, it is straightforward to run Contextualise using Gunicorn, a Python WSGI HTTP server. To run Contextualise do:

$ gunicorn -w 2 -b 0.0.0.0:5000 contextualise.wsgi:app

This will start the application — visit http://127.0.0.1:5000/ to access Contextualise.

Several users (with the roles of admin and user, respectively) are created by the application. To log in as the admin user, provide the following credentials: [email protected] (user name) and Passw0rd1 (password). To log in as a non-admin user, provide the following credentials: [email protected] and Passw0rd1.

For further information for properly running a flask application in production, take a look at Flask's own documentation regarding deploying.

Install the Development Version

If you have Git installed on your system, it is possible to install the development version of Contextualise. Do:

$ git clone https://github.com/brettkromkamp/contextualise
$ cd contextualise
$ git checkout develop
$ pip install -e .

The pip install -e . command allows you to follow the development branch as it changes by creating links in the right places and installing the command line scripts to the appropriate locations.

Then, if you want to update Contextualise at any time, in the same directory do:

$ git pull

TopicDB, the topic maps engine on top of which Contextualise is built is regularly updated. However, the version of TopicDB published on PyPI could lag behind. For that reason, it is recommended that you also install TopicDB directly from GitHub:

$ pip uninstall topic-db
$ git clone https://github.com/brettkromkamp/topic-db.git
$ cd topic-db
$ git checkout develop
$ pip install -e .

Then, if you want to update TopicDB at any time, in the same directory do:

$ git pull

Finally, to run the application in development mode you need to change to the project's top-level directory and set two environment variables followed by running the flask command with the run parameter:

$ export FLASK_APP=contextualise
$ export FLASK_ENV=development
$ flask run

This will start the Flask development server on port 5000 — you should see something similar to the following in the terminal:

* Serving Flask app 'contextualise' (lazy loading)
* Environment: development
* Debug mode: on
[2022-02-15 18:45:29,133] INFO in __init__: Contextualise startup
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 122-493-008
[2022-02-15 18:45:29,866] INFO in __init__: Contextualise startup

Opening the browser and navigating to http://127.0.0.1:5000/ should result in showing the application's Welcome page.

The Contextualise Welcome page

The Contextualise Welcome page

Documentation

Work in progress (February 2022).

Tools

JetBrains has kindly provided a license for their full suite of developer tools for Contextualise's development as part of their Licenses for Open Source Development program.

JetBrains logo

Miscellaneous

Currently, I am using Contextualise for, among others, worldbuilding purposes of the Brave Robot fictional universe including its Codex Roboticus.

The Codex Roboticus project

The Codex Roboticus project

How to Contribute

  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
  2. Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).
  3. Write a test which shows that the bug was fixed or that the feature works as expected.
  4. Send a pull request and bug the maintainer until it gets merged and published :)

Final Words

I hope you enjoy using Contextualise as much as I enjoy developing it. What's more, I also genuinely hope that Contextualise can help you to improve how you organize your knowledge. If you have any suggestions, questions or critique with regards to Contextualise, I would love to hear from you.

I will see you again, in the place where no shadows fall. — Ambassador Delenn, Babylon 5

contextualise's People

Contributors

brettkromkamp avatar epilys avatar machawk1 avatar nekroze avatar stratosgear avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

contextualise's Issues

Implement functionality to report and remove inappropriate content

A user can decide to make their topic maps public (accessible without having to log in to the application). The presence of public maps also implies that, at some point, somebody might publish content that is not appropriate. There needs to be a mechanism in place to report and subsequently remove inappropriate content (by the application administrator).

Internal Server Error

I have created a new topic map. When adding a new topic, the following error appears:
————————————————————————————————
Internal Server Error
Something has gone wrong. Get in touch with Support if the problem persists. Find your way back home.

Add UI support for tagging

Adding, removing and visualizing (i.e., tag cloud) tags using the appropriate (topic maps) association types and roles.

Issues installing because of missing pg_config

I am trying to install contextualise on macOS 10.14.6 and Python 3.7.

/tmp
❯ virtualenv c-ize
Using base prefix '/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7'
New python executable in /private/tmp/c-ize/bin/python3.7
Also creating executable in /private/tmp/c-ize/bin/python
Installing setuptools, pip, wheel...
done.

/tmp
❯ source c-ize/bin/activate

/tmp
c-ize ❯ pip3 freeze

/tmp
c-ize ❯ git clone https://github.com/brettkromkamp/contextualise
Cloning into 'contextualise'...
remote: Enumerating objects: 155, done.
remote: Counting objects: 100% (155/155), done.
remote: Compressing objects: 100% (108/108), done.
remote: Total 1133 (delta 101), reused 87 (delta 45), pack-reused 978
Receiving objects: 100% (1133/1133), 769.37 KiB | 9.05 MiB/s, done.
Resolving deltas: 100% (833/833), done.

/tmp
c-ize ❯ cd contextualise

/tmp/contextualise master
c-ize ❯ pip3 install -e .
Obtaining file:///private/tmp/contextualise
Collecting flask (from contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/9b/93/628509b8d5dc749656a9641f4caf13540e2cdec85276964ff8f43bbb1d3b/Flask-1.1.1-py2.py3-none-any.whl
Collecting flask-security (from contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/88/47/4908a5040120768ff4fb2465c7eeafeb9239c27d2919bd67c4ccc1b43e14/Flask_Security-3.0.0-py2.py3-none-any.whl
Collecting flask-sqlalchemy (from contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/1e/65/226d95466c75e34e291a76890ed0e27af2e46ab913002847856f11d4d59d/Flask_SQLAlchemy-2.4.1-py2.py3-none-any.whl
Collecting sqlalchemy (from contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/fc/49/82d64d705ced344ba458197dadab30cfa745f9650ee22260ac2b275d288c/SQLAlchemy-1.3.8.tar.gz
Collecting bcrypt (from contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/62/20/4c94f3f8dfc6b8720c8bc903ce2951ec6397ad864e3a64b4abdced014514/bcrypt-3.1.7-cp34-abi3-macosx_10_6_intel.whl
Collecting topic-db (from contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/91/e9/1a3068a8326f5dbe0bc0669b7ae5989e1e80c5bee2951aad32788bafdf8c/topic_db-1.0.0-py3-none-any.whl
Collecting maya (from contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/1d/56/789ebf410acc1491bf4078ef57a7a277b42c0b18f43e17007bfb6c1caaf3/maya-0.6.1-py2.py3-none-any.whl
Collecting mistune (from contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/09/ec/4b43dae793655b7d8a25f76119624350b4d65eb663459eb9603d7f1f0345/mistune-0.8.4-py2.py3-none-any.whl
Collecting python-slugify (from contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/f5/ef/c868a9ac657405f051a8a501ac5633e769c54228716b8db7f8d717977e57/python-slugify-3.0.4.tar.gz
Collecting click>=5.1 (from flask->contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Collecting itsdangerous>=0.24 (from flask->contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl
Collecting Jinja2>=2.10.1 (from flask->contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/1d/e7/fd8b501e7a6dfe492a433deb7b9d833d39ca74916fa8bc63dd1a4947a671/Jinja2-2.10.1-py2.py3-none-any.whl
Collecting Werkzeug>=0.15 (from flask->contextualise==0.3.0)
  Downloading https://files.pythonhosted.org/packages/ce/42/3aeda98f96e85fd26180534d36570e4d18108d62ae36f87694b476b83d6f/Werkzeug-0.16.0-py2.py3-none-any.whl (327kB)
     |████████████████████████████████| 327kB 3.2MB/s
Collecting Flask-WTF>=0.13.1 (from flask-security->contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/60/3a/58c629472d10539ae5167dc7c1fecfa95dd7d0b7864623931e3776438a24/Flask_WTF-0.14.2-py2.py3-none-any.whl
Collecting passlib>=1.7 (from flask-security->contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/ee/a7/d6d238d927df355d4e4e000670342ca4705a72f0bf694027cf67d9bcf5af/passlib-1.7.1-py2.py3-none-any.whl
Collecting Flask-BabelEx>=0.9.3 (from flask-security->contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/80/ad/cc2b0becd98050eed775ca85d6e5fa784547acff69f968183098df8a52b3/Flask-BabelEx-0.9.3.tar.gz
Collecting Flask-Principal>=0.3.3 (from flask-security->contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/14/c7/2531aca6ab7baa3774fde2dfc9c9dd6d5a42576a1013a93701bfdc402fdd/Flask-Principal-0.4.0.tar.gz
Collecting Flask-Mail>=0.7.3 (from flask-security->contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/05/2f/6a545452040c2556559779db87148d2a85e78a26f90326647b51dc5e81e9/Flask-Mail-0.9.1.tar.gz
Collecting Flask-Login>=0.3.0 (from flask-security->contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/c1/ff/bd9a4d2d81bf0c07d9e53e8cd3d675c56553719bbefd372df69bf1b3c1e4/Flask-Login-0.4.1.tar.gz
Collecting cffi>=1.1 (from bcrypt->contextualise==0.3.0)
  Downloading https://files.pythonhosted.org/packages/f0/48/5aa4ea664eba26dd5142558d04762f5065c02220b4665b3f7eecb9bb614e/cffi-1.12.3-cp37-cp37m-macosx_10_9_x86_64.whl (169kB)
     |████████████████████████████████| 174kB 7.6MB/s
Collecting six>=1.4.1 (from bcrypt->contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting typed-tree (from topic-db->contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/12/15/5b406f42408bccd063c31465d111513f2ef25a992f58fdfcfb079ded12d7/typed_tree-1.0.3-py3-none-any.whl
Collecting psycopg2 (from topic-db->contextualise==0.3.0)
  Using cached https://files.pythonhosted.org/packages/5c/1c/6997288da181277a0c29bc39a5f9143ff20b8c99f2a7d059cfb55163e165/psycopg2-2.8.3.tar.gz
    ERROR: Command errored out with exit status 1:
     command: /private/tmp/c-ize/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/k_/0fg5752j3vl3b814h2qyml_00000gn/T/pip-install-k4m2p3te/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/k_/0fg5752j3vl3b814h2qyml_00000gn/T/pip-install-k4m2p3te/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /private/var/folders/k_/0fg5752j3vl3b814h2qyml_00000gn/T/pip-install-k4m2p3te/psycopg2/
    Complete output (23 lines):
    running egg_info
    creating pip-egg-info/psycopg2.egg-info
    writing pip-egg-info/psycopg2.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'

    Error: pg_config executable not found.

    pg_config is required to build psycopg2 from source.  Please add the directory
    containing pg_config to the $PATH or specify the full executable path with the
    option:

        python setup.py build_ext --pg-config /path/to/pg_config build ...

    or with the pg_config option in 'setup.cfg'.

    If you prefer to avoid building psycopg2 from source, please install the PyPI
    'psycopg2-binary' package instead.

    For further information please check the 'doc/src/install.rst' file (also at
    <http://initd.org/psycopg/docs/install.html>).

    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

/tmp/contextualise master 8s
c-ize ❯

/tmp/contextualise master
c-ize ❯ git log
commit 1f97b45ad58de358772dafd313ce04367b2fbdd7 (HEAD -> master, origin/master, origin/develop, origin/HEAD)
Author: Brett Kromkamp <[email protected]>
Date:   Mon Sep 23 18:44:09 2019 +0200

    Updated README.rst file.

Running pip3 install psycopg2-binary and trying the above command again does not seem to resolve the issue.

Python error in install

Hi, This looks really interesting. I keep getting the following error while attempting to install the development version.

ERROR: Command errored out with exit status 1: command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sjgw80/topic-db/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sjgw80/topic-db/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info cwd: /tmp/pip-install-sjgw80/topic-db/ Complete output (5 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-sjgw80/topic-db/setup.py", line 13, in <module> with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f: TypeError: 'encoding' is an invalid keyword argument for this function ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I'm on Ubuntu 19.94 . Any ideas? Thanks in advance!

Failed to open the home page due to an error in running Flask

flask.cli.NoAppException
flask.cli.NoAppException: While importing "contextualise", an ImportError was raised:

Traceback (most recent call last):
File "d:\python\lib\site-packages\flask\cli.py", line 240, in locate_app
import(module_name)
File "D:\contextualise\contextualise_init_.py", line 13, in
from flask_mail import Mail
ModuleNotFoundError: No module named 'flask_mail'

Traceback (most recent call last)
File "D:\contextualise\contextualise_init_.py", line 13, in
from flask_mail import Mail
During handling of the above exception, another exception occurred:
File "D:\python\Lib\site-packages\flask\cli.py", line 343, in call
rv = self._load_unlocked()
File "D:\python\Lib\site-packages\flask\cli.py", line 330, in _load_unlocked
self._app = rv = self.loader()
File "D:\python\Lib\site-packages\flask\cli.py", line 388, in load_app
app = locate_app(self, import_name, name)
File "D:\python\Lib\site-packages\flask\cli.py", line 245, in locate_app
raise NoAppException(
flask.cli.NoAppException: While importing "contextualise", an ImportError was raised:

Traceback (most recent call last):
File "d:\python\lib\site-packages\flask\cli.py", line 240, in locate_app
import(module_name)
File "D:\contextualise\contextualise_init_.py", line 13, in
from flask_mail import Mail
ModuleNotFoundError: No module named 'flask_mail'
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object

Contextualise feedback

@machawk1 Hi Mat, not sure if you have actually taken a look at Contextualise yet. But, if you have, I would love to hear what you think of it. What works? What really doesn't? Thanks in advance.

Add Google Maps support

Add Google Maps support allowing the user to set a geographic coordinate for subsequent visualization in Google Maps for a topic.

How to set the coordinates using Google Maps is explained in the Google Maps documentation.

Remove Google KnowledgeGraph feature

At some point, Google KnowledgeGraph support was added to Contextualise. Nonetheless, the Google KnowledgeGraph API provides for a poor experience. Removing the Google KnowledgeGraph support would be the first step in replacing it with perhaps something like the Wikidata API.

First installation feedback: unexpected keyword argument 'scope'

Hi Brett,

first and foremost, thanks for opensourcing Contextualise!

I am giving it a try, and I incurred in an error when trying to open my first map. Here's how to reproduce it:

  • logged in as admin@ as per readme
  • created new map with title, description and image (form won't save without an image)
  • went to http://127.0.0.1:5000/topics/view/1/home and I got the following:
Traceback (most recent call last):
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/fradeve/.pyenv/versions/3.7.3/envs/contextualise/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/fradeve/contextualise/contextualise/topic.py", line 68, in view
    resolve_attributes=RetrievalMode.RESOLVE_ATTRIBUTES,
TypeError: get_topic() got an unexpected keyword argument 'scope'

Any idea of what might have gone wrong?

Thank you very much again!

Tabs/menus user interface refactor

Currently, to switch between the different “parts” of the application (for example, the topic view, the associations view) you have to click twice (first click to open the drop-down menu, second click to select the ‘view’ item in the menu). This, in practice, is a bit cumbersome and a different approach is needed.

Network graph must take context/scope filtering into account

Currently, the network graph is always filtered by scope (which could be the default "Universal" scope); nonetheless, it should be possible to display the network graph without any scope filtering since this feature has been added to Contextualise: #24

graph-view

Windows

Would love to see this on windows as a standalone app, but it looks like you might be going another direction.

Handle non-existent topic

Currently, if a user navigates to a non-existent topic a 404 (Not found) page is displayed. Ideally, the user should be presented with the topic creation form with the relevant topic identifier already filled-out.

OSX installation

I have attempted to install on my mac from scratch with the following steps:

brew install python
brew install postgresql
git clone https://github.com/brettkromkamp/topic-db.git
cd topic-db
pip install -e .
cd ../
git clone https://github.com/brettkromkamp/contextualise
cd contextualise
pip install -e .
cd ../

All good!

Then created a directory for the 'project' ie somewhere to place a settings.ini (and a topicmap-definition.sql):

mkdir first
cd first

Then edited settings.ini to:

[DATABASE]
Username = testuser
Password = password
Database = testname
Host = localhost
Port = 5432

Then create a test database.

psql postgres
CREATE USER testuser WITH PASSWORD 'password';
CREATE DATABASE testname OWNER testuser;
\q
psql -h localhost -U testuser -d testname -a -f topicmap-definition.sql

All looked good!

Then run flask:

export FLASK_APP=contextualise
export FLASK_ENV=development
flask run

And it looked like the readme example.

But then, when I open http://127.0.0.1:5000/ I get a KeyError, specifically for database_username = config["DATABASE"]["Username"].

I have never used postgres before, but am guessing I may need to log on as that user?

Any help appreciated, I feel close to a successful install!

Micro service-based Docker setup

Contextualise’s Docker support is still under development. What’s more, its current monolithic Docker setup should be refactored into a micro service-based setup for components such as PostgreSQL (database), Nginx (web-server), and so forth.

I really need help with this :)

Refactor scope filtering to also include no filtering at all

Currently, scope filtering is always "active", that is, the topic view is always rendered with occurrences and associations filtered by scope (by default, occurrences and associations have "Universal" (*) scope). It makes sense to be able to disable scope filtering (which is obviously something distinct than filtering by the default Universal scope) to see all the topic's occurrences and associations regardless of their scope.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.