morcus.net
Source code for morcus.net, a collection of digital tools for Latin.
First Time Setup
- Run
npm install
to set up your environment forTypescript
code. - Set up a Python
venv
and install therequirements.txt
.
Specific steps for:
Python ML Code
- Run
npm run setup-alatius
to set up the macronizer for local use. - To run NLP models, you may also need to install
stanza
andcltk
frompip
.
morcus.net Server and Client
- Clone https://github.com/nkprasad12/lexica
- Create a
.env
file in the root directory (see the next section for contents). - 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
- File an issue (or accept an existing one) for tracking purposes
- Make sure to write unit tests verifying your change, if applicable
- Run
npm run pre-commit
to run all formatting checks, tests, and builds. - 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.