Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imcf/imcf-fiji-mocks
Python mocks 🧌 providing dummy imports e.g. for testing the IMCF Fiji Python packages.
https://github.com/imcf/imcf-fiji-mocks
Last synced: about 2 months ago
JSON representation
Python mocks 🧌 providing dummy imports e.g. for testing the IMCF Fiji Python packages.
- Host: GitHub
- URL: https://github.com/imcf/imcf-fiji-mocks
- Owner: imcf
- Created: 2023-02-22T14:06:34.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-30T10:01:05.000Z (2 months ago)
- Last Synced: 2024-10-30T11:17:15.438Z (2 months ago)
- Language: Python
- Homepage: https://imcf.one/apidocs/
- Size: 16.6 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Python mocks 🧌 package for `Fiji` related code
Initially created for enabling [pdoc][2] to generate [IMCF Fiji Python packages
API docs][1]. Now also used to run [pytest][4] on e.g. the [python-imcflibs][5]
package.The goal of this repo is to provide mocks that can be used to build a fake
(thin) `pip install`able Python package that will allow tools like *pdoc* or
*pytest* to build up the AST (abstract syntax tree) by using the mocked objects
while performing the imports.## Building artifacts
You'll need [poetry][3] installed locally, then using fish run:
```fish
rm -r dist/
poetry build -vv
```## Using release artifacts from GitHub
To create a virtualenv you may use artifacts attached to a public release on
Github, for example using the `0.1.0` release:```fish
set REL "0.1.0"
set URL_PFX "https://github.com/imcf/imcf-fiji-mocks/releases/download/v$REL"pip install --upgrade \
$URL_PFX/imcf_fiji_mocks-$REL-py3-none-any.whl \
$URL_PFX/micrometa-15.2.2-py3-none-any.whl \
$URL_PFX/sjlogging-0.1.0-py3-none-any.whl \
pdoc \
olefile \
pip
```[1]: https://imcf.one/apidocs/
[2]: https://pdoc.dev
[3]: https://python-poetry.org
[4]: http://pytest.org/
[5]: https://github.com/imcf/python-imcflibs/