kyrias / morcus-net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

morcus.net

Source code for morcus.net, a collection of digital tools for Latin.

CI Status Coverage License: AGPL v3


First Time Setup

  1. Run npm install to set up your environment for Typescript code.
  2. Set up a Python venv and install the requirements.txt.

Specific steps for:

Python ML Code

  1. Run npm run setup-alatius to set up the macronizer for local use.
  2. To run NLP models, you may also need to install stanza and cltk from pip.

morcus.net Server and Client

  1. Clone https://github.com/nkprasad12/lexica
  2. Create a .env file in the root directory (see the next section for contents).
  3. Run ./run.py web -p --build_ls. This will build the LS processed data file and start the server.

For common commands, see package.json or run.py.


Environment Variables

Name Content
PORT The port number on which the server will listen. Example: 5757.
LS_PATH The path to the raw Lewis and Short XML file. Example: [PATH_TO_LEXICA_REPO]/CTS_XML_TEI/perseus/pdllex/lat/ls/lat.ls.perseus-eng2.xml
LS_PROCESSED_PATH The path where the processed Lewis and Short file will be. Example: lsp.data
MONGODB_URI MongoDB database URI for metrics.
DB_SOURCE Tag used for metrics written to MongoDB. Example: local.

Contribution Guidelines

  1. File an issue (or accept an existing one) for tracking purposes
  2. Make sure to write unit tests verifying your change, if applicable
  3. Run npm run pre-commit to run all formatting checks, tests, and builds.
  4. Send a Pull Request to merge to dev

License Details

Work in this repository is provided under the terms of the LICENSE file in the root directory. Work in the texts and libs directories are provided under their original licenses.


VS Code - Setting up formatting

After initial setup, run npm install to ensure you have the latest prettier config. Then, install the Prettier VS Code plugin. The project settings are already configured to use prettier as the default formatting for Typescript and Javascript, and black as the default formatter for Python. This will also turn on format on save.

VS Code - Integrating Jest

After initial setup, install the Jest Runner VS Code plugin. This will allow you to run and debug unit tests from within the VS Code UI when browsing a test file.

About

License:GNU Affero General Public License v3.0


Languages

Language:TypeScript 85.1%Language:Python 9.0%Language:HTML 5.4%Language:JavaScript 0.5%Language:Procfile 0.0%