diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 704824e..3ddb7af 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -94,7 +94,7 @@ repos:
language: system
pass_filenames: false
always_run: true
- args: [--branch, main, --branch, staging, --branch, dev]
+ args: [--branch, master, --branch, staging, --branch, dev]
- id: trailing-whitespace
name: trim trailing whitespace
description: trims trailing whitespace.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..7562375
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023 Opentensor
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
index 35b40d9..ad58612 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,10 @@
| | |
| :-: | :-: |
-Badges here?
+| **Status** |
|
+| **Activity** |
|
+| **Compatibility** |
|
+| **Social** | |
@@ -20,8 +23,8 @@ Badges here?
- [Running a Miner](#running-a-miner)
- [Running a Validator](#running-a-validator)
- [About the Rewards Mechanism](#about-the-rewards-mechanism)
-- [Compute Requirements](#compute-requirements)
- [Roadmap](#roadmap)
+- [Compute Requirements](#compute-requirements)
- [License](#license)
---
@@ -56,7 +59,7 @@ cd precog
Create and source a python virtual environment:
```
-python3 -m venv
+python3 -m venv
source .venv/bin/activate
```
@@ -75,23 +78,23 @@ Start by editing the Makefile with you wallet and network information.
### Running a Miner
TODO: write this \
-Base miner:
+Base miner:
1. Run the command:
- ```
- make miner
+ ```
+ make miner
```
Custom miner:
-1. Write a custom forward function stored in precog/miners/your_function.py
+1. Write a custom forward function stored in precog/miners/your_function.py
- This function should handle how the miner responds to requests from the validator
- Within the function, synapse.predictions and synapse.interval should be set.
- - See [forward.py](https://github.com/coinmetrics/precog/blob/master/precog/miners/forward.py) for an example
+ - See [forward.py](https://github.com/coinmetrics/precog/blob/master/precog/miners/forward.py) for an example
2. Add a command to Makefile.
- copy the miner command and rename it (e.g. miner_custom) in Makefile
- replace the --forward_function argument with your_function
3. Run the Command:
- ```
- make miner_custom
+ ```
+ make miner_custom
```
@@ -119,7 +122,7 @@ TODO: update these
This repository is licensed under the MIT License.
```text
# The MIT License (MIT)
-# Copyright © 2024 Foundry Digital LLC
+# Copyright © 2024 CoinMetrics LLC
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the “Software”), to deal in the Software without restriction, including without limitation
diff --git a/docs/Release Notes.md b/docs/Release Notes.md
new file mode 100644
index 0000000..439a8fc
--- /dev/null
+++ b/docs/Release Notes.md
@@ -0,0 +1,8 @@
+Release Notes
+=============
+
+1.0.0
+-----
+Release on
+- ...
+- ...
diff --git a/precog/__init__.py b/precog/__init__.py
index 29e2dca..e51a7ec 100644
--- a/precog/__init__.py
+++ b/precog/__init__.py
@@ -1,5 +1,5 @@
-import json
+import importlib.metadata
-__version__ = "0.0.0"
+__version__ = importlib.metadata.version(__name__ or __package__)
version_split = __version__.split(".")
__spec_version__ = (1000 * int(version_split[0])) + (10 * int(version_split[1])) + (1 * int(version_split[2]))
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/test_package.py b/tests/test_package.py
new file mode 100644
index 0000000..e3e55f8
--- /dev/null
+++ b/tests/test_package.py
@@ -0,0 +1,14 @@
+import unittest
+
+from precog import __version__
+
+
+class TestPackage(unittest.TestCase):
+
+ def setUp(self):
+ pass
+
+ def test_package_version(self):
+ # Check that version is as expected
+ # Must update to increment package version successfully
+ self.assertEqual(__version__, "0.1.0")