# How to contribute to Signac
The following information provides a set of guidelines for contributing to the Signac repo. Use your best judgment, and, if you see room for improvement, please propose changes to this document.
Contributions come in the form of writing documentation, raising issues, and any other actions that help develop the Standard protocol documentation.
# Just want to ask a question?
Please don't submit a pull request to ask a question. Instead, join us in the following communities, and ask all your questions.
# Want to contribute to the framework?
# First steps
The first step is to find an issue you want to fix. To identify issues we think are good for first-time contributors, we add the good first issue label.
If you find an existing issue that you want to work on or if you have a new issue to create, understand the workflow expected by maintainers of the Signac repository.
# Understand framework structure
Signac consists of a task manager and its nx plugin packages that provides operating functions in nx monorepo project. Nx plugin(nxink) includes generators for setting up a each contract in monorepo and components for developing a dapp in ink! smart contract. Executors include commands that can be executed in nx for each distinct project in the monorepo. Other packages are parts to build a general task manager.
General task manager's entry point is located in core
package. Core package is provided with builtin
commands that are executed as default in each Signac workspace. task
provides a library that developers can make their own deployment or interaction script in a Signac workspace.
Nx plugin located in nxink
packages defines available commands for each distinct contract in Signac workspace. It also defines generators that can create new kind of contract or ccomponent in Signac workspace. Codes in generators
includes file for each contract to initialize on creation, and codes in executors
includes commands that interacts with each contract in the Signac workspace.
# Test framework codebase
To run each package of Signac, look up each directory in the packages
folder of the root directory, then run command:
nx test <directory>
To debug after editing the codebase in each package so that you can get your hands dirty, run ts-node
installed in the package after running yarn
.
For example, assuming the testing package is a command, run in the root directory:
cd packages/core/src
yarn
npx ts-node index.ts
2
3
# Hardhat task vs Signac task
Hardhat's task has made its own domain-specific-language to execute certain task focused only on ethereum. This requires developers to understand its domain specific language to build plugins. Meanwhile, Signac's task is not bound to specific use case of the domain language. It is just a pure javascript extension of commander.js
that implements simple CLI, in which it can be integrated with other libraries easily without going through domain language parser.
# Propose framework changes
Signac requires everyone, without exception, to submit doc-change proposals by using a pull request (PR). PRs enable contributions from the community, easy testing, and straightforward peer review.
To contribute a doc-change proposal, use the following workflow:
Add an upstream (opens new window) so that you can update your fork.
Clone your fork to your computer.
Create a branch and name it appropriately.
Work on only one change in one pull request.
Follow these conventions:
- Make your changes adhering to the Signac Style Guide and the coding conventions described below. Generally, a commit serves a single purpose and differences should be easy to understand. Do not mix formatting fixes or code moves with actual code changes.
- Commit your changes. Write a simple, straightforward commit message. To learn more, see How to Write a Git Commit Message (opens new window).
- Push your changes to your remote fork.
- Create a PR on the Signac repository.
- Identify the type of PR by adding labels to it. For example, if you're still working on the changes, add the work-in-progress label. If you are proposing an enhancement, add the enhancement label.
- Wait for your changes to be reviewed. If you are a maintainer, you can assign your PR to one or more reviewers. If you aren't a maintainer, one of the maintainers will assign a reviewer.
- After you receive feedback from a reviewer, make the requested changes, commit them to your branch, and push them to your remote fork again.
After your PR is approved and validated, and no conflicts exist, it will be merged by a maintainer.