https://github.com/nuccitheboss/cleantest
A testing framework that brings up clean environments and mini-clusters for developers in a hurry
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.3%) to scientific vocabulary
Keywords
Repository
A testing framework that brings up clean environments and mini-clusters for developers in a hurry
Basic Info
- Host: GitHub
- Owner: NucciTheBoss
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://nuccitheboss.github.io/cleantest/
- Size: 3.78 MB
Statistics
- Stars: 11
- Watchers: 3
- Forks: 2
- Open Issues: 5
- Releases: 2
Topics
Metadata Files
README.md
cleantest
A testing framework for developers who need clean environments in a hurry
Explore cleantest docs »
About
cleantest is a testing framework for quickly bringing up testing environments using the test authors hypervisor of choice. It was created out of NucciTheBoss's desire to efficiently test snap packages, Python code, and Juju charms without needing to make potentially system breaking modifications to the underlying host operating system.
Below is an outline of currently supported operating systems, Python versions, and hypervisors:
|||
| :--- | :---: |
| Supported operating systems |
|
| Supported python versions |
|
| Supported hypervisors |
|
Getting started
Installing cleantest
The recommended way to install cleantest is by downloading the published package on PyPI:
commandline
pip install cleantest
For those who wish to use the latest, bleeding-edge, and potentially unstable version cleantest of cleantest, the following command can be used to install cleantest from the main branch of this repository:
commandline
git clone https://github.com/NucciTheBoss/cleantest.git
cd cleantest
python3 -m pip install .
Configuring a test environment provider
Before you can start using cleantest to run tests, you need to set up a test environment provider. Currently, the only supported environment provider is LXD. You can set LXD up on your system using the following commands:
commandline
sudo snap install lxd
lxd init --auto
Run your first test
You can use any testing framework of your choice with cleantest, but this example will use pytest:
pip install pytest
Here is a test written using cleantest that you can download:
:clipboard: test.py
```python
#!/usr/bin/env python3
"""A basic test"""
from cleantest.provider import lxd
@lxd(preserve=False)
def do_something():
import sys
try:
import urllib
sys.exit(0)
except ImportError:
sys.exit(1)
class TestSuite:
def test_do_something(self) -> None:
for name, result in do_something():
assert result.exit_code == 0
```
With the test file downloaded, run the test using pytest:
commandline
pytest test.py
Where to next?
Please the see the documentation for more information on all that you can do with cleantest.
Contributing
Please read through the contributing guidelines if you are interested in contributing to cleantest. Included are guidelines for opening issues, code formatting standards, and how to submit contributions to cleantest.
License
Code and documentation copyright © 2023 Jason C. Nucciarone. Please see the Apache-2.0 license for more details.
Roadmap
Here are my (NucciTheBoss's) goals to get cleantest to release version 1.0.0:
We are sort of the way there on fully support multiple Linux distributions. The big hang-up now is just ensuring that the current macros and utilities are compatible with the new distributions and writing integration tests to ensure that the distributions actually work with cleantest.
Note: cleantest can boot these new distributions but support might be slightly flaky.
- ~~Add support for injecting tests into LXD~~
- ~~Add support for multiple distros:~~
- ~~Ubuntu~~
- ~~Debian~~
- ~~CentOS~~
- ~~Rocky~~
- ~~Fedora~~
- ~~Arch~~
- ~~Enable support for running parallel tests with LXD~~
- Better test logging capabilities
- Support for a select few popular packaging formats:
- ~~Snap~~
- ~~Pip~~
- ~~Charm libraries~~
- Debs, Rpms, Pacs, etc.
- ~~Apptainer~~
- Robust hook mechanism -> i.e. an actual specification for hooks.
- Comprehensive documentation
Owner
- Name: Jason Nucciarone
- Login: NucciTheBoss
- Kind: user
- Location: Pittsburgh, PA, USA
- Company: @canonical
- Repositories: 68
- Profile: https://github.com/NucciTheBoss
HPC software engineer @canonical and @ubuntu member | I like to create open-source high-performance computing infrastructure and user-space tooling
GitHub Events
Total
Last Year
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 258
- Total Committers: 3
- Avg Commits per committer: 86.0
- Development Distribution Score (DDS): 0.182
Top Committers
| Name | Commits | |
|---|---|---|
| NucciTheBoss | j****e@c****m | 211 |
| NucciTheBoss | n****g@g****m | 46 |
| Jason Nucciarone | 4****s@u****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 32
- Total pull requests: 21
- Average time to close issues: 26 days
- Average time to close pull requests: about 1 hour
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 1.06
- Average comments per pull request: 0.14
- Merged pull requests: 21
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- NucciTheBoss (32)
Pull Request Authors
- NucciTheBoss (20)
- barrettj12 (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 29 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 6
- Total maintainers: 1
pypi.org: cleantest
Clean tests for developers in a hurry
- Homepage: https://github.com/NucciTheBoss/cleantest
- Documentation: https://cleantest.readthedocs.io/
- License: Apache-2.0
-
Latest release: 0.3.0
published about 3 years ago
Rankings
Maintainers (1)
Dependencies
- pydantic ==1.9.2
- pylxd ==2.3.1
- pydantic *
- pylxd *
- actions/checkout v3 composite
- canonical/setup-lxd v0.1.1 composite
- get-woke/woke-action v0 composite
- tabulate ==0.8.10 test