UCL-COMP0233-2023-2024 / RSE-Classwork

3 stars 65 forks source link

Creating a 🐍📦 #37

Open dpshelio opened 11 months ago

dpshelio commented 11 months ago

Help Charlene to create her repository into a package (remember to commit after each step).

  1. Choose who in your team is writing now! (make sure you've got a fork and a local copy of Charlene's repository)

  2. Add a .gitignore file to the repository to avoid adding artefacts created by python or your text editor. You can use gitignore.io to generate a file for your needs.

  3. Modify the repository directory structure to make sagittal_average as an installable package (don't forget to add empty __init__.py files[^1], but there is no need to add the .md files (yet!)).

[^1]: Strictly speaking, python doesn't need empty __init__.py files anymore, but we will need them if we want to use relative imports in our package.

  1. Choose between adding a pyproject.toml file with the information needed. If you want to use setup.cfg instead, you'll need to set the correct key values. There's no need anymore to use setup.py, so avoid it if you can.

  2. Try to install it by running pip install -e . from the command line, in the filesystem location where the pyproject.toml (or setup.cfg) is.

  3. Share your solution as a pull request to Charlene's repository mentioning this issue (by including the text Addresses UCL-COMP0233-23-24/RSE-Classwork#37 in the pull request description), remember to mention your team members too! (with @github_username)

  4. 🎉 Congratulations, you've created a Python package! Now, let's see what can be improved about it in the subsequent issues!