Skip to content

Comments

Remove _scripts, use new PyPI module instead#853

Open
matthew-brett wants to merge 1 commit intoscipy-lectures:mainfrom
matthew-brett:remove-scripts
Open

Remove _scripts, use new PyPI module instead#853
matthew-brett wants to merge 1 commit intoscipy-lectures:mainfrom
matthew-brett:remove-scripts

Conversation

@matthew-brett
Copy link
Contributor

I've refactored the notebook post-processing into the jljb module.

jarrodmillman

This comment was marked as outdated.

Copy link
Member

@jarrodmillman jarrodmillman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I missed something. Are we still testing on multiple versions of Python?

@matthew-brett
Copy link
Contributor Author

You mean - why did I delete test.yml? Jupyter Book doesn't support the doctesting that a bare Sphinx build does. In a way, that's a boon, because there was some confusing markup that the user sees, in order to satisfy doctest. But in any case, we can't test in the same way.

I did put in some test machinery though, that you can see described in CONTRIBUTING.md - in the form of cells marked remove-cell with asserts in them. These don't appear in the built output or the JupyterLite notebooks, but do get run as part of the book build process.

I've refactored the notebook post-processing into the `jljb` module.
@matthew-brett
Copy link
Contributor Author

@jarrodmillman - I wasn't sure what you were asking for, but I restored the test.yml file - although it only runs one test:

pytest .
==================================================== test session starts ====================================================
platform darwin -- Python 3.12.2, pytest-8.4.2, pluggy-1.6.0
rootdir: /Volumes/zorg/mb312/dev_trees/scientific-python-lectures
configfile: pyproject.toml
plugins: anyio-4.8.0
collected 1 item                                                                                                            

intro/language/solutions/test_dir_sort.py .                                                                           [100%]

===================================================== 1 passed in 1.45s =====================================================

Otherwise, this is a straight refactor of the support code out into its own module, so I can only see a win here, compared to status quo.

@matthew-brett
Copy link
Contributor Author

Another plea for this one.

Also see :#864

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants