Skip to content

Creating a 🐍📦 with an entry point #27

@dpshelio

Description

@dpshelio

Help Charlene run a command in her latest package (#26) from anywhere. You can do so by adding an entry point following the instructions below.

  1. Choose who in your team is writing now! (make sure you've pulled from your colleague's fork!) And create a new branch.

  2. Move the if __name__ == "__main__": block to its own file (e.g., command.py) and add it as entry point to pyproject.toml called sagittal_average_run.

  3. Add the dependencies of this library as requirements to pyproject.toml.

  4. Try to install it by running pip install -e . where the pyproject.toml is.

  5. Go to a different directory, run python -c "import sagittal_average" and see whether the installation worked.

  6. Check you can use the entry point from anywhere, by calling either sagittal_average_run --help or sagittal_average_run <path/to/input/csv> from the different directory.

  7. Share your solution as a pull request to Charlene's repository mentioning this issue (by including the text Addresses UCL-ARC-RSEworkshop-summer-25/RSE-Classwork#27 in the pull request description), remember to mention your team members too! (with @github_username)


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions