Skip to content

threefoldtech/js-ng

Repository files navigation

js-ng

Binder https://pypi.python.org/pypi/js-ng Actions Status [https://codecov.io/gh/threefoldtech/js-ng]

config management/automation framework

Principles

  • pip installable
  • facilities exposed under loader object: j
  • pluggable
  • docs and tests are as important as code

Contribution

  • Clean code (pep-8)
  • Documentation
  • Tests

Development environment

  • install poetry
  • clone this repository, then
    • poetry install

Accessing the virtualenv

To access the virtual env poetry shell

Interacting with js-ng Environment

if you are out of the virtualenv shell, make sure to prefix all of your commands with poetry run

Accessing jsng (custom shell)

just type jsng.

if you have any problems related to setuptools, just try to upgrade it before starting jsng.

python3 -m pip install setuptools -U

Running tests

  • make tests

Generating docs

  • make docs

Generate tests docs

  • make testdocs

building dists

  • poetry build

releasing & publishing

  • Create a branch development_VERSION
  • Generate documentation make docs
  • Update js-ng version in pyproject.toml to the branch version
  • Create a pull request against the development branch
  • Merge the pull request into development
  • Create a pull request from development against the master branch
  • Merge the pull request into master
  • make sure to call poetry build
  • enter your api token poetry config pypi-token.pypi your-api-token
  • then publish to pypi using poetry publish (note that this requires to be on the publisher account)
  • now a release can be added with a tag on master branch.

API Docs

browsable at https://threefoldtech.github.io/js-ng/api/jumpscale/

Wiki

We already prepared a docsify wiki website

Contribution

Pre-commit

We use pre-commit to enforce certain coding style and checks while contributing to js-ng repository. Please make sure to install

Installation

It's as easy as python3 -m pip install pre-commit

Installing pre-commit hooks in the repository

Execute pre-commit install