Skip to content

Latest commit

 

History

History
81 lines (74 loc) · 2.91 KB

File metadata and controls

81 lines (74 loc) · 2.91 KB

Setup.md

  1. Environment Update
sudo apt update #Update Package Lists
sudo apt install -y latexmk texlive texlive-latex-extra texlive-xetex #Install latexmk and TeX Live for Myst
latexmk --version # Latexmk, John Collins, 31 Jan. 2024. Version 4.83
  1. Install UV
pip install uv
  1. Create a virtual environment and then activate it.
uv init # Creates a new or initialize the current directory and generates following files :  pyproject.toml, README.md, .python-version, main.py
#Another example : uv venv --python=3.12 .venv
uv venv # creates a new virtual environment for isolating Python packages and dependencies.
#Activate the venv
source .venv/bin/activate
  1. [Optional] Install the locked requirements
#uv pip sync requirements.txt
#uv sync # run this to install what is present in your lock file exactly 
#uv lock # generated automaticall the first time you run uv add, uv remove or uv sync
#uv.lock file : The lockfile ensures reproducible builds by recording the exact versions of all dependencies that were resolved. 
  1. Install some typical python libraries that are needed.
#pip install pandas ipykernel jupyter matplotlib plotly 
uv add pandas ipykernel jupyter matplotlib seaborn groq
  1. Install Ruff
#pip install ruff
uv tool install ruff
ruff version # ruff 0.12.0
ruff check   # Lint all files in the current directory. or specify a file name to check for that file.
ruff format  # Format all files in the current directory.
# ruff check --fix
  1. Run your Jupyter Notebook

    • Install the following extensions : Python [Microsoft microsoft.com]
    • Install the following extensions : Jupyter [Microsoft microsoft.com]
    • Choose the Python Virtual Environment created ealier.
    • Run the cells and play around with the prompts.
  2. Install MyST

At the terminal type:

#pip install mystmd
uv tool install mystmd
myst --version
myst init
myst start
# ctrl + Z to stop the myst 
# Install a PDF viewer : PDF Viewer [Mathematic Inc]
# to generate the pdf report : myst build 03_publication/01-article.md --pdf --output 03_publication/01-article.pdf
  1. Generate uv.lock file or alternatively Requirements.txt
#pip freeze > requirements.txt
# uv pip freeze > requirements.txt
uv lock
  1. Checkin the code to Github
  2. Make a Release
    • Open the Releases Page
    • Click on "Draft a new release"
    • Choose the appropriate target branch
    • Choose a Tag Version else GitHub will create it.
    • Add a Release Title & Description
    • Click "Publish Release"
  3. Try to upload the Release in Zenodo