A simple data resource catalogue supporting a sensible profile of UK Gemini.
Licensed under Open Government Licence v2.
To run the tests, you need to run IIS Express in 64-bit mode. https://ppolyzos.com/2015/12/01/enable-x64-bit-version-of-iis-express/
Install the "Web Compiler" extension. https://marketplace.visualstudio.com/items?itemName=MadsKristensen.WebCompiler This is for design-time support for CoffeeScript (.coffee) and LESS (.less). These are essential if you want to edit the application's Javascript or CSS.
There are no build-time or run-time steps used to compile Coffeescript and LESS - when Topcat was designed, the Visual Studio extensions were simpler. The application just expects the correct .js and .css files to have been design-time generated and they're stored statically in source control alongside the source .coffee and .less files.
There is (allegedly) Resharper support.
Currently best to disable Resharper > Options > Tools > Unit Testing > Javascript Tests >
- Enable QUnit support
- Enable Jasmine support
RavenDB has been upgraded to 4.1.1
There are a couple of workarounds required for the upgrade:
- To run Topcat locally with the in memory RavenDB:
- Build the solution
- Copy the RavenDBServer folder from Catalogue.Data\bin\Debug to the root of Catalogue.Web (this shouldn't be needed in later versions)
- Copy Catalogue.Tests\bin\Debug\RavenDBServer\Catalogue.Data.Analyzers.dll to the new RavenDBServer folder in Catalogue.Web
- Copy Catalogue.Data\bin\Debug\Catalogue.Data.dll to the new RavenDBServer folder in Catalogue.Web
- Run it!
- If it complains about framework versions, change the Catalogue.Web Web.config RavenDbFrameworkVersion appSettings value to whatever you're running
- To recreate the Catalogue.Data.Analyzers.dll:
- Unzip and open the .NET Core project in Catalogue.Data\Analyzers\Analyzers.zip
- Build as release and take the dll.
RavenDB studio can be accessed in development at http://localhost:8090
Topcat runs with no special setup in Visual Studio for local development.
Here's what you need to do to create a production instance:
Run the build/built.targets
MSBuild file (or use build.bat
).
- Use the the Developer Command Prompt for Visual Studio
** You may need to fix up (copy) the
Microsoft.WebApplication.targets
into the necessary place in the MSBuild installation. E.g. I copied the WebApplications folder fromC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\WebApplications
toC:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v15.0
- Make sure Git is available globally (e.g. install GitBash).
- Install NUnit3 Console 3.9.0 from http://nunit.org/download/
This is an corporate / intranet application and user account details and authentication rely on Active Directory and Windows authentication which gives us a great user experience in Chrome and IE.
You need to disable Anonymous Authentication and enable Windows Authentication in the IIS website hosting Topcat.
You can deploy Raven in various ways; the recommended is using the Windows installer:
- Download the correct version from https://ravendb.net/download (see packages folder for the version number currently in use)
- Supply the license file when requested
- Set up as an IIS-hosted application ** Port: 8090 ** Path: C:\topcat\RavenDB
- Browse to http://localhost:8090/ to check the installation succeeded
- In the Create a New Database dialogue, create e.g. Catalogue.Data.Beta with Versioning Bundle
When deploying a new database instance, the Versioning bundle needs to be enabled.
Important The Catalogue.Data.dll must be deployed into Raven/Analyzers folder because RavenDB needs to be able to load the custom Lucene analyzer we use.
RavenDB doesn't support ad-hoc querying very well. We use LinqPad to do ad-hoc querying and basic data visualisation.
http://www.linqpad.net/download.aspx
You need to use the RavenDB LinqPad adaptor. Our RavenDB is not up-to-date, so we need to use an older version of the driver. Browse to it in the /linqpad
directory. Create a connection like RavenDB: Topcat LIVE
, and add the references to the assemblies in the output folder (such as Catalogue.Web/bin
) of your build.
Catalogue.Data.dll
Catalogue.Gemini.dll
You can then write queries like this:
from r in Query<Catalogue.Data.Model.Record>()
where r.Gemini.Title.StartsWith("Sea")
select r
or
from r in Query<Catalogue.Data.Model.Record>()
where r.Gemini.Keywords.Any(k => k.Vocab == "http://vocab.jncc.gov.uk/jncc-category" && k.Value == "Human Activities")
select r