Skip to content

plutonheaven/prx-practical-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prx-practical-lab

Python environment creation

This repo uses the uv tool to manage the python virtual environment. Here are the steps to get started:

This will create a .venv folder containing the python virtual environment.

Running python scripts

To run a python script using the virtual environment, use the command

uv run script.py

Notebook cleaning before git-pushing

Run the following command nbstripout --install --attributes=.gitattributes

This will install nbstripout (github), a tool that automatically clear all outputs from notebook before committing.

Use git-filter-repo to create a clean repository without solution

The following command lines will clone the current local repository and keep only the files stored in the file keep.txt:

# move to the parent folder of the local prx_notebook folder
cd ..
# copy folder to a different folder named prx_notebook_students
git clone prx_notebook prx_notebook_students
cd prx_notebook_students
# filter repo keeping files defined in keep.txt
uvx git-filter-repo --paths-from-file keep.txt --force
# add remote public repo
git remote add student-repo https://github.com/plutonheaven/prx-practical-lab.git
# push main branch to public repo
git push student-repo main

Note that the use of git-filter-repo is destructive, so use the original local repository (or remote) as back up.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •