marp | theme | paginate | backgroundImage | style |
---|---|---|---|---|
true |
uncover |
true |
radial-gradient(circle 100vh at bottom 100px right 100px in hsl, var(--color-accent) 0%, transparent 100%) |
:root {
--color-highlight: #0097a7;
--color-accent: rgb(161, 186, 182);
}
a:any-link {
--color-foreground: var(--color-highlight);
}
.columns {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem;
}
|
Follow along: scverse.org/ cookiecutter-scverse-presentation
- Publish papers and get citations for academic success
- High quality software helps a lot with both
- Be part of the scverse ecosystem: ensure you meet minimum requirements for maximal impact
- Get reviewed by PyOpenSci?
- Workshop goal: path to high quality software dev
- Set of packages built around the scverse core packages
- Featured on the scverse ecosystem website
- Metadata: name, description, OSI-approved license, ...
- Versioned releases installable from PyPI &/or Conda
- Tests automated via continuous integration (CI)
- Docs for API and use-cases
- Scverse datastructures used where appropriate
Instructions to add your package are on the scverse ecosystem repository
- Submit existing package, or
- Easiest way: scverse cookiecutter template
- Project template for scverse packages¹
- Best practice structure
- Many features such as continuous integration, documentation setup, …
- Automatically ticks all scverse ecosystem requirements
¹Much is applicable elsewhere
- Set up global environment to create project
- Create project using scverse cookiecutter template
- Set up project specific development environment
- Develop your package
- Submit to scverse ecosystem
-
Install using a package manager or installer:
-
Install using a package manager,
pipx
, oruv
:-
cruft
&pre-commit
$ pipx install cruft pre-commit # or $ uv tool install cruft pre-commit
-
$ cruft create https://github.com/scverse/cookiecutter-scverse
project_name (project-name): myproj
[…]
$ code myproj
Hatch envs basic usage:
$ hatch run [env:]command [...args] # e.g. `… docs:build -T`
$ hatch test [...args]
$ hatch env remove <name> # or `hatch env prune` for all
$ hatch env find hatch-test
~/.local/share/hatch/env/virtual/myproj/FsejNibV/hatch-test.py3.12
[…]
Make sure it exists, then tell VS Code:
⌘|^+⇑+P → Python: Select Interpreter
$ hatch test --help
[…]
Options:
-r, --randomize
-p, --parallel
-c, --cover
-a, --all
-py, --python=X.Y
-i, --include=VAR=VAL
-x, --exclude=VAR=VAL
-s, --show
…otherwise same as `pytest`
$ hatch run docs:build
$ hatch run docs:open
$ hatch run docs:clean
See pyproject.toml:
[tools.hatch.envs.docs]
scripts.build = "..."
...
VS Code:
{
"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": { ... },
}, ...
}
CLI: pre-commit
(or hatch run pre-commit
)
$ pre-commit install # `git commit` hook
$ pre-commit run --all-files
-
Simple project
- Instantiate template
- Replace src/* directory with your package
- Edit
[project]
table in pyproject.toml
-
Complex project
- Step by step PRs: formatter, …
- We can help!
- Use PRs, don’t push to
main
- Set up pre-commit.ci, codecov.io on github.com/<you>/<yourpackage>/settings/installations
- Set up readthedocs.org and its PR previews:
- Follow the instructions
- Submit a pull request
- Maybe get reviewed by PyOpenSci