Skip to content

Commit

Permalink
Add contributing and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielguarisa committed Feb 15, 2023
1 parent 8577765 commit bb96c66
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 2 deletions.
45 changes: 45 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Contributing

## Development

### Setting up a development environment

If you don't have a local development environment, you can follow these steps to set one up.

First, if you have not already, install [poetry](https://python-poetry.org/).

Now, initialize the project:

```bash
make init
```

### Running tests

You can run the tests with:

```bash
make tests
```

This will run the tests with [pytest](https://docs.pytest.org/en/latest/) and show information about the coverage.

### Formatting the code

To format the code, you can use the command:

```bash
make formatting
```

This will run the [isort](https://github.com/PyCQA/isort) and [black](https://github.com/psf/black) commands.

### Releasing a new version

To release a new version, you need to follow these steps:

1. Update the version with `poetry version <version>` and commit the changes. This project follows [Semantic Versioning](http://semver.org/), so the version number should follow the format `<major>.<minor>.<patch>`. Alternatively, you can also use the version as `major` or `minor` or `patch`, and the version number will be automatically incremented.

2. Create a Github release with the new version number.

3. (Optional) Publish the new version to PyPI with `poetry publish --build`.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ runner(data)

A rule is a set of conditions and actions that are executed when the conditions are met. The conditions are evaluated using the data passed to the runner. The actions are executed when the conditions are met.

Each rule is composed of many nodes. To see each node type, check the [nodes](https://github.com/gabrielguarisa/retrack/tree/main/retrack/nodes) folder. To see some examples, check the [examples](https://github.com/gabrielguarisa/retrack/tree/main/examples) folder.
Each rule is composed of many nodes. To see each node type, check the [nodes](https://github.com/gabrielguarisa/retrack/tree/main/retrack/nodes) folder.

To create a rule, you need to create a JSON file with the following structure:

Expand All @@ -55,7 +55,7 @@ To create a rule, you need to create a JSON file with the following structure:
"outputs": {},
"name": "node name",
},
... more nodes
// ... more nodes
}
}
```
Expand All @@ -67,3 +67,15 @@ The `nodes` key is a dictionary of nodes. Each node has the following properties
- `inputs`: The node inputs. This is used to reference the node inputs.
- `outputs`: The node outputs. This is used to reference the node outputs.
- `name`: The node name. This is used to define the node type.

The `inputs` and `outputs` properties are dictionaries of node connections. Each connection has the following properties:

- `node`: The node id that is connected to the current node.
- `input`: The input name of the connection that is connected to the current node. This is only used in the `inputs` property.
- `output`: The output name of the connection that is connected to the current node. This is only used in the `outputs` property.

To see some examples, check the [examples](https://github.com/gabrielguarisa/retrack/tree/main/examples) folder.

## Contributing

Contributions are welcome! Please read the [contributing guidelines](https://github.com/gabrielguarisa/retrack/tree/main/CONTRIBUTING.md) first.

0 comments on commit bb96c66

Please sign in to comment.