Lab 1#
This lab will guide you through creating a Python environment, working with Git and GitHub, and using GitHub features such as issues and discussions.
Exercise 1: Create a New Python Environment#
Create a new vairtual environment named
testusing conda, mamba, or uv.Activate the environment.
Install a Python package of named geospatial.
Run
conda listorpip listto verify the package is installed.Run
python -c "import geospatial; print(geospatial.__version__)"to verify the package is working correctly.Deactivate the environment.
Remove the environment using
conda remove --name test --all.
Exercise 2: Create a New Git Repository#
Create a new GitHub repository named
geog510-testusing the GitHub website.Set the repository to public and initialize it with a README file.
Clone the repository to your local machine using Git.
Create a new file named
test.txtin the repository and add some text to it.Commit the changes and push them to the remote repository.
Create a new branch named
test-branchand switch to it.Make some changes to the
test.txtfile and commit them.Push the new branch to the remote repository.
Create a pull request (PR) on GitHub to merge the changes from
test-branchinto themainbranch.Merge the PR and delete the
test-branchbranch.
Exercise 3: Create a New Markdown File#
Create a new branch named
test-markdownin the localgeog510-testrepository.Create a new file named
test.mdin thetest-markdownbranch.Add a title to the file using the
#symbol.Add various sections to the file using headers (
##,###, etc.).Add various types of content to the file, such as text, lists, links, images, and code blocks.
Commit the changes and push the branch to the remote repository.
Create a PR to merge the changes from
test-markdowninto themainbranch.Merge the PR and delete the
test-markdownbranch.View the rendered Markdown file on GitHub.
Exercise 4: Create a GitHub Issue#
Navigate to your
geog510-testrepository on GitHub.Go to the Issues tab and click New issue.
Provide a title and a detailed description.
Make sure the description includes various types of content, such as text, lists, links, images, and code blocks.
Assign the issue to yourself and add a label.
Submit the issue.
Add a comment to the issue, then close it.
Exercise 5: Use GitHub Discussions#
Enable GitHub Discussions for your
geog510-testrepository.Create a new discussion topic under the Q&A category.
Add a title and description to the discussion.
Make sure the description includes various types of content, such as text, lists, links, images, and code blocks.
Post the discussion and reply to it.
Mark a reply as the accepted answer.
Close the discussion.
What to Submit#
Exercise 1: Write the output of
python -c "import geospatial; print(geospatial.__version__)".Exercise 2: A link to the GitHub pull request.
Exercise 3: A link to the Markdown file on GitHub.
Exercise 4: A link to the GitHub issue.
Exercise 5: A link to the GitHub discussion.