DuniterPy, évolution de la bibliothèque Python

v0.54.1 (9th May 2019)

  • Transaction: add eq() and hash() methods
  • Transaction Unlock parameters: add eq() and hash() methods
  • Transaction: add ‘time’ variable for read and write but not for doc generation
  • output conditions: add eq() and hash() methods
  • test transaction equality at all levels

3 Likes

[EDIT] ATTENTION : cette version publiée est incomplète et non fonctionnelle ! Attendre la 0.55.1 !

v0.55.0 (18th July 2019)

Code

  • Refactor request api.ws2p.heads in api.bma.network.ws2p_heads (BMA command to get ws2p heads)
  • Fix bug in PubSec v1 secret key length check while loading

Checks

Pylint

  • Add Pylint as a dev dependency to check code validity
  • Add pylint command to the Makefile
  • #91, !65: Apply Pylint on the code

Black

  • #54: Add Black as dev dependency to format the code (not PEP8 compliant)
  • Add format and check-format commands to the MakeFile
  • !63: Format the code with Black

Other

  • Makefile: check command for mypy, pylint, and check-format checks
  • #94: Apply Mypy, Pylint and Black on tests and examples folders

CI

  • Add MyPy, Black, and Pylint jobs
  • Rename mypy job to check which run make check: mypy, pylint, check-format
  • Add check-format job at the first stage

Build

  • Add build command to the Makefile
  • Install build dependencies separately via a requirements_deploy.txt file
  • #98, !72: Do not include tests folder in the wheel package for PyPi distribution

CD

  • Add deploy and deploy_test commands to the Makefile
  • #99, !74: Add job for PyPi test deployment
  • !73: Trigger PyPi release job only on tag
  • Move github-sync stage in release stage as an after-script step
  • #100, !75: Use extends instead of Yaml anchors in .gitlab-ci.yml (requires GitLab v12+)
  • Also trigger the pipeline when the Makefile changes

Project

  • #96, !70: Add support for PEP 561 for DuniterPy type hints to be recognized by mypy when imported
  • Remove not used coveralls dependency

Thanks @Moul, @vtexier.

Nouvelle mouture de Duniterpy.

Seule nouveauté côté API, la commande BMA api.bma.network.ws2p_heads pour obtenir la branche majoritaire sur le réseau.

Le reste est un gros travail sur l’environnement de développement et l’intégration continue dans Gitlab.

4 Likes

En installant via pip (3.7), je n’ai pas tout, il manque les dossiers api, documents, grammars, key. C’est un que chez moi ou c’est le paquet qui a un problème ?

Merci du retour ! Effectivement il y a un gros problème sur le build dans gitlab :

Le build seul fonctionne en local sur mon dépôt, je vais tester le build du déploiement de test cette après midi.

En attendant NE PAS UTILISER CETTE VERSION, attendre la 0.55.1.

2 Likes

La version 0.55.1 est disponible ! La version 0.55.0 a été supprimé du dépôt officiel Pypi car non fonctionnelle.

Le changelog reste inchangé et se trouve plus haut.

v0.55.1 (19th July 2019)

  • #102: wheel build does not longer include duniterpy sub-folders
  • Trigger release only on master not on tag as protected environment variables are not shared with pipelines started on a tag
  • Fix Makefile: rebuild not working
4 Likes

Un message a été scindé en un nouveau sujet : Utilisation des conditions dans DuniterPy

DuniterPy version 0.56.0 est sortie !

La grande nouveauté est le support de WS2P !
Vous allez pouvoir vous connecter à un serveur Duniter en WS2P comme ci vous étiez un véritable nœud Duniter ! De quoi faire des automates en Python basés sur les événements WS2P…

Attention : la connexion par websocket a changée ! Reportez-vous aux exemples du dossier examples pour voir comment on se connecte en BMA et en WS2P en websocket.

La documentation automatique que personne ne lit est ici…

v0.56.0 (20th January 2020)

Code

  • #58, !84: Introduce WS2P API support: BREAK BACKWARD COMPATIBILITY:
    • bma.ws: now websocket connections use the special WSConnection class and async, check examples.
    • Add two examples, a helper to retrieve the WS2P API from BMA.
  • #113, !89: Blocks signature verification is correctly handled now, differently from other documents.
  • #112, !88: fix Unlock.from_inline() error on a newly created Unlock
  • !87: Typos in Block: noonce −> nonce, hash
  • !82: Use sys.exit() instead of exit()
  • !79:
    • Move tools out of the helper folder
    • Dedicate the helper folder to helpers
    • Introduce output_available() helper to check if an output is available

Dependencies

  • !91: fix the attrs/attr dependency

Build

  • #107, !81: Enhance version definition in setup.py

CI/CD

  • !78: Release on PyPI only on tags

Documentation

  • #101, !80: Publish auto-documentation on GitLab Pages
  • #106, !83: Migrate the README back to markdown, reword and update it.
  • !77: Improve v0.55.0 and add v0.55.1 changelog
  • !92: Add v0.56.0 changelog

8 Likes

Ouuuuh c’est nice ça :slight_smile: Super boulot vit !!

2 messages ont été scindés en un nouveau sujet : Requêtes tx sur WS2P avec DuniterPy

DuniterPy 0.57.0 est sortie !

Pour l’installer, c’est simple :

pip3 install --user --upgrade

Ou modifiez votre fichier requirements.txt pour pip:

duniterpy==0.57.*

Nouveautés

  • Authentification à partir d’un fichier Scuttlebutt .ssb/secret
  • Authentification à partir d’un fichier d’identifiants
  • Nouvelle commande BMA : client(bma.wot.requirements_of_pending, minsig)
  • La classe HeadV2 hérite maintenant des classes précédentes (contient les propriétés de toutes les versions précédentes Head, HeadV0, HeadV1). Attention, cela brise la compatibilité avec l’ancienne classe !

Correctifs

  • Correctif bug sur le champ software_version des messages WS2Pv1 pas accepté si un mot clé suivait la version (1.7.21-beta est maintenant accepté)
  • Correctif bug de bma.blockhain.revoked qui appellait l’url /blockchain/with/excluded

CHANGELOG

v0.57.0 (2nd April 2020)

Code

Enhancements

  • #123 Implement authentication from Scuttlebutt .ssb/secret file
  • #77 Implement authentication from credentials file
  • #122, !99 Implement /wot/requirements-of-pending command support in BMA api
  • #120, !98 HeadV2, HeadV1, HeadV0 and Head classes now each inherit from previous class BREAK BACKWARD COMPATIBILITY

Fixes

  • #119, !96 software_version field in WS2Pv1 messages now accept a string after patch number (1.7.21-beta accepted)
  • #114, !100 Fix bma.blockhain.revoked command class calling /blockchain/with/excluded url

Documentation

  • #104 add CONTRIBUTE.md file with release workflow

CI/CD

  • #66, !93 Migrate to Poetry (build and development environment)

  • Thanks @vit, @Moul

4 Likes

T’as implémenté scuttlebutt ?? Génial ! Je te fais un don illico !

Super @vit !!
@Moul , est-ce que la mise à jour se propage à silkaj?

Je suppose que cela change quelque chose à astroport/natools.py at master - astroport - P2Git @tuxmain ?

Venez en parler sur ScuttleButt,

Vous recevrez sûrement des LOVE par mon Journal :wink:

Je modifie natools.py pour qu’il accepte tous les formats autorisés par DuniterPy.

2 Likes

Il y a une raison technique derrière ce choix ?

La raison a été discutée entre le développeur de Sakia qui avait un besoin et le développeur de Duniterpy qui lui a demandé la même chose. Les deux personnes étant les mêmes, une synergie s’est naturellement créée. :wink:

3 Likes

Et quel était ce besoin ? ^^

Sortie de DuniterPy v0.58.0

Annonce (fr)

Il s’agit de la dernière version majeur avec le support de Python v3.5.
Pas de bénéfice direct pour l’utilisateur final. Contient principalement des améliorations sur l’environnement de développement, la CI/CD, des mises à jour de dépendances, l’amélioration des examples.

Announcement (en)

Last major release with Python 3.5 support
No profit for the end-user. Contains mostly DevEnv, CI/CD, dependencies updates, examples improvements.

Changelog

v0.58.0 (10th September 2020)

Note: This is the last major release with Python v3.5 support.
As Python 3.5 security fixes are dropped on September 13th of 2020.

CI/CD

  • #127: Change deprecated keyword in .gitlab-ci.yml
  • #124: Fix publish_doc job not working

Dependencies

  • !107: Fix pylint v2.6.0 new checks
  • Update black to v20.8b1, format code
  • !102: Update base58 to v2
  • !102: Update Sphinx to v3

Examples

  • !104: Rework send membership and identity documents examples

Documentation

  • !102: Add Repology’s packaging status to the Readme
  • !103: Rename file to CONTRIBUTING.md to be recognised by GitLab

3 Likes

v0.60.0 (26th September 2020)

  • #60, !106: Drop Python v3.5 support
  • #86, !106: Scrypt: migrate from pylibscrypt to hashlib.scrypt from the standard Python 3.6 lib
  • #111, !111: Clearly define the copyright and license statements
  • #68, !106: Package in Debian Bullseye v11

4 Likes

DuniterPy supporte maintenant GVA et GVASUB !

Un exemple est fourni :

v0.61.0 (30th November 2020)

  • #59 add GVA query support and example
  • #137 add GVAEndpoint and GVASUBEndpoint classes
  • fix bug in API.reverse_url
  • Readme: Update dependencies list
  • Upgrade to Poetry v1.1.x
  • Fix regex to update the documentation version
  • fix bug in pylint on examples
  • Add v0.58.1 and v0.60.1 changelogs

7 Likes

Yes j’ai vue ça !

Moi je continue mon micro-client GVA tout en apprenant python, je me demandais justement si je devais passer des choses en async en comparant avec duniterpy, puis j’ai vue ton dernier post à ce sujet ^^

Je vais continuer mes tests isolés mais si je suis satisfait de ce que j’ai fait et que ce n’est toujours pas le cas d’ici là, je veux bien tenter d’intégrer ça dans duniterpy sur une nouvelle branche, maintenant que la mécanique est simplifié.

Faudrait que je compare avec ce qui a été fait en BMA pour bien cerner comment ça doit être intégré.
Sinon je continue mon truc dans mon coin, ça me dérange pas ça m’occupe ^^

2 Likes