Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apollo-roboto/apolloroboto.constants
Utility library containing a collection of constants
https://github.com/apollo-roboto/apolloroboto.constants
constants csharp generated-code math mathematics numbers python space
Last synced: about 1 month ago
JSON representation
Utility library containing a collection of constants
- Host: GitHub
- URL: https://github.com/apollo-roboto/apolloroboto.constants
- Owner: Apollo-Roboto
- License: mit
- Created: 2022-06-06T20:44:05.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-08-31T23:30:15.000Z (over 2 years ago)
- Last Synced: 2024-11-20T04:29:34.087Z (about 1 month ago)
- Topics: constants, csharp, generated-code, math, mathematics, numbers, python, space
- Language: Python
- Homepage:
- Size: 50.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ApolloRoboto.Constants
This is a utility library containing a collection of constant numbers making them easy to access and
explore. This repository aims at generating source codes to multiple languages and publish them.It's a learning project, my main motivation was to explore the chalenges of code generation and
publishing them to multiple code repotitory.## Currently Supported Language:
- C# - [Nuget](https://www.nuget.org/packages/ApolloRoboto.Constants)
- Python - [PyPI](https://pypi.org/project/arconstants/)## C# Example Usage:
```c#
using System;
using static ApolloRoboto.Constants.Math;public class Program
{
public void Main(string[] args)
{
Console.WriteLine(PI * GOLDEN_RATIO)
}
}
```## Python example usage:
```python
from ARConstants.Math import *print(PI * GOLDEN_RATIO)
```## Contributing
Workflows are configured to regenerate and publish code at each changes.
All constant numbers are declared in the `constants.yaml` file.
To generate the code locally, use the `generate.py` script
```bash
python ./generate.py
```If you make a pull request, please increment the version number in `meta.yaml` by `0.0.1`