Skip to main content

im-course-tools

The im command for the Instructing Machines course: a small, pure-Python CLI that students run from their course folder.

im check                 # is my environment working?
im get iteration         # download a chapter notebook
im get alignmentproject  # download a whole project
im get                   # everything on offer
im update                # refresh the environment from the website

Why it is a package

The course folder students download holds their own work and nothing else. The four commands used to be four Python files copied into that folder, which put code students had no reason to read next to the notebooks they did, and left no way to fix a bug for a hundred people already holding a copy. Here they travel with the environment instead: a fix reaches everyone through a release.

What the commands guarantee

Nothing ever overwrites a student's work.

  • A notebook that already exists is left exactly as it is, and the fresh copy lands beside it as iteration-2.ipynb.
  • A project that already exists stops the command. A project is a folder worked in for a week, and unpacking over it would put the empty starting file back on top of real code.
  • A project zip is checked before it is unpacked: every entry must live inside the project's own folder, so an archive naming ../../somewhere writes nothing.
  • im update downloads both pixi.toml and pixi.lock, checks each is what it claims to be, and keeps a .backup of the old one before writing.

Files land in the course folder, found by walking up from wherever the student happens to be, so im get works two subfolders deep.

Development

pixi run install-dev     # editable install into the pixi environment
pixi run test            # the test suite

The tests run against a fake course website on disk, reached through a file:// URL, so they never touch the real site. IM_COURSE_URL and IM_COURSE_FOLDER are the two overrides they use, and they work by hand too:

IM_COURSE_URL=file:///path/to/_book im get iteration

Release

pixi run release         # bump, tag, and push; CI builds the conda and pip packages

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

im_course_tools-0.1.4.tar.gz (507.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

im_course_tools-0.1.4-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file im_course_tools-0.1.4.tar.gz.

File metadata

  • Download URL: im_course_tools-0.1.4.tar.gz
  • Upload date:
  • Size: 507.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for im_course_tools-0.1.4.tar.gz
Algorithm Hash digest
SHA256 3fb35f86022096aa1a064bd8d3cf9cb36b2bdcaf751f33d284b203d5911792a4
MD5 7f920c5569f73d69a8950e1382033b47
BLAKE2b-256 b048960099a9ad65047b6e50bcd24e8c1606d50772951890adba661bd31bfcbf

See more details on using hashes here.

File details

Details for the file im_course_tools-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for im_course_tools-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 557655d37ef0dd08662b51cc39bf8ca3437167fc7b6f9f262ed8a1a5842935b1
MD5 f87e1003095f7e1669092738c1007019
BLAKE2b-256 b0c7aaac6f101ca1fdd6ff660a534484a6f04733e03bd102208f0b65a4030ed9

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.27

2 files

0.1.26

2 files

0.1.24

2 files

0.1.23

2 files

0.1.21

2 files

0.1.20

2 files

0.1.19

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.5

2 files

This release

0.1.4 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page