An exercise in adding Dependency-Documented Reproducibility in a Pyxel App
This contains a game called "Tic Tac Toe", also known as "Naughts and Crosses".
(Instructions Here)
Run the app directly with a
python tictactoe.py
In GitHub, click the "Fork" Button in the upper-right corner of the GitHub Window:
Command | Description |
---|---|
git clone <url> tictactoe |
Clone the project into a folder called "tictactoe" |
cd tictactoe |
Change the working directory to the tictactoe folder. |
code . |
Launch VSCode in the Current Folder |
Choose a Package Manager: Either Conda or Pixi.
If Using Conda:
Command | Description |
---|---|
conda create -p ./venv |
Setup Environment |
conda activate ./venv |
Activate Environment |
conda install python=3.12 |
Install Conda Dep |
pip install numpy |
Install Python Dep with Pip (note: Python must be installed first) |
If Using Pixi:
Command | Description |
---|---|
pixi init |
Setup Environment |
pixi shell |
Activate Environment |
pixi add python=3.12 |
Install Conda Dep |
pixi add --pypi numpy |
Install Python Dep with Pip (note: Python must be installed first) |
If using Conda:
Command | Description |
---|---|
conda env export -f environment.yaml |
Make environment file |
If using Pixi, the pixi.toml
should already be made--nothing to do!
If using Conda:
Command | Description |
---|---|
conda env remove -p ./venv |
Delete the environment. |
conda env create -p ./venv -f environment.yaml |
Create a new environment from the environment.yaml file. |
If using Pixi:
Command | Description |
---|---|
rmdir ./venv |
Delete the environment directory (doens't use Pixi, just deletes the folder) |
pixi install |
Create a new environment from the pixi.toml file. |
If using Git for the first time, you'll need to add your name and email first for signing your commits:
Command | Description |
---|---|
git config --global user.name "My Name" |
Add your name to commits. Usually this is your real name, not a GitHub username, but it doesn't matter what you use. |
git config --global user.email "[email protected]" |
Add your email to commits. Note: doesn't have to be the same email you used with GitHub, but it is helpful if it is a real email address (because it helps your portfolio throuhg GitHub) |
Only add the environment.yaml
or pixi.toml
file, not any of the files in the venv/
folder.
Command | Description |
---|---|
git status |
See what Git is noticing as changes. |
git add myfile |
Start tracking "myfile" |
git commit -am "message" |
Commit all changes to the tracked files with the note "message" |
git log |
See what the recent commits were. May need to press the q key to exit the log. |
Write the required steps for installing the dependencies for this code in the "Setup" section of this Readme file, then commit the updated Readme file.
Command | Description |
---|---|
git remote -v |
See the name and urls of all remote repositories |
git remote add <name> <url> |
Add a new git remote, if needed. Name can be anything, URL should be a github repo. |
git remote remove <name> |
Remove a git remote, if needed. |
git branch |
See the names or all branches. The one with a star next to it is the active branch. |
git push origin main |
Push the branch called "main" to the remote called "origin" |
Step 9: On the GitHub website Make a Pull Request to the main repository, requesting that your changes be added!
- Click on the Pull Request Tab:
- Click New Pull Request:
- Fill out the form and send the request!
Done! Now a more-reproduc