- MacOSx
- If you have windows, install Linux with WSL2
- If you still want to use Windows, please don't and set up WSL2 :)
- From the terminal, install Xcode Command Line Tools:
xcode-select --install- Confirm installation with
xcode-select -p - You should see: /Library/Developer/CommandLineTools
- Confirm installation with
- Install the package manager Homebrew: Homebrew installation instructions
- Install UV. It handles everything for you Python related.
brew install uv- Tip: If brew wants to do a massive update for itself and its not the first time you're using it, you can skip this by running
HOMEBREW_NO_AUTO_UPDATE=1 brew install uv
- Install Python with uv
- You can get the exact version you want
uv python 3.12or request the latest version with:uv python install --preview
- CRITICAL: Make sure virtualization is enabled first
- Go to task manager
- Check the processor (CPU) and you should see "Virtualization: enabled"
- You may need to bypass your BIOS and change the Intel VT-d in the options as available for virtualization (See steps: WSL2 on Windows 10
- Download Windows Subsystem for Linux 2
- Open command prompt / terminal or powershell as an Administrator
- Paste in the command prompt terminal,
wsl --installand press enter - Restart your computer (mandatory!)
- Ubuntu will be installed by default. To access, type in the command prompt terminal
wsl -d ubuntu - Verify with
wsl --list --verbose
You have to use a Personal Access Token (PAT) instead of a password. If you skip this step you will get error "Password authentication is not supported for Git operations" and can't send anything to the repository.
-
Go to your GitHub account settings: https://github.com/settings/profile
-
Developer Settings → Personal Access Tokens → Fine Grained Personal Access Tokens
- Developer Settings are waaaaaaaaaaaaaaaay at the bottom of the list on the leftmost side with this icon: <>
- Personal Access Tokens have a key icon
Why do you need this token? These are repository-scoped tokens for using Git over HTTPS This slices and dices access permissions as opposed to a broad brush "access all the things" This is a standard zero trust approach and avoids giving too many privileges widely.
-
Set up permissions
- Select one repository: Stealthmed
-
Generate a new token and copy it
- The token starts with
ghp_) - Save in a secure password manager. I recommend Bitwarden :)
- Tip: If its your first time doing this, keep the window open. The token won't disappear. But then close it when you've successfully saved it somewhere secure AND successfully pushed to Github
- If you lose it you will have to regenerate a new token. Its not the end of the world but its annoying.
- The token starts with
-
Next time Git asks for a password, use your GitHub username and paste the PAT in place of the password.
- Tip: If its your first time setting up Git and pushing to github, you need to configure your email and user name that are associated with your Github account
- git config --global user.email "[email protected]"
- git config --global user.name "Your Name"
- Tip: Look for the blue button that says Code <> for the URL
- You only need to do this the first time :)
- You only need to do this the first time :)
You must run the git pull command every time.
- From the terminal, open the folder
cd StealthMed
- Make sure you're up to date: SUPER CRITICAL
git pull origin main
- You will likely get this message: branch main -> FETCH_HEAD Already up to date.
- git checkout -b branchname
- git checkout -b fix_deprecation
- Tip: Give it a relevant name
- Tip: Don't skip this step
Before you stage your changes (Step 4) you must sync/update your Python packages, then check your work by running the app locally
- Update the python packages contained in the Stealthmed folder
uv sync - Run streamlit with uv
uv run streamlit run app.pyHosted URL: https://stealthmedeye.streamlit.app/ Paste this address in your local machine: http://localhost:8501/
git add specificfilename.filetype
- git add poc/app.py pyproject.toml uv.lock
git commit -m "What I did"
- git commit -m "Made changes and stuff"
git remote set-url upstream https://YOURGITHUBNAME:[email protected]/YOURGITHUBNAME/StealthMed.git
- This part is really finicky but its why you needed to fork the repo as a contributor
git push upstream your-feature-branch
- git push upstream uvmigration
You're not done after you push to Github, one more step with writing the Pull request
- Add "Fixes" at the top of the description box (not the title) of the Pull Request
- When you type "Fixes" you will see a drop-down menu with the issues numbered. Select the relevant one.
- Then it should be automatically linked to the issue
- After submitting PR will be reviewed!
- git pull origin main
- git checkout -b descriptive name
uv sync→ edit →uv run streamlit run app.pygit addfilename.filetypegit commit -m "whatidid_keepitshort"- git push upstream descriptive name
- GitHub Pull Request → in the top of the description link the Issue with "Fixes #..."