You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Amazing to hear that you're interested in contributing to Lucid Evolution!
3
+
👋 Welcome to the Lucid Evolution community!
4
4
5
-
This document outlines how you can contribute to make Lucid Evolution better than it was before. Lucid Evolution is a monorepo, make sure you're working in the correct package when making changes. Maintain backwards compatibility unless explicitly discussed and agreed upon for a major version change and when possible be mindful of performance implications, especially for core functionality
5
+
This guide will help you get started with contributing to Lucid Evolution. Our goal is to make the contribution process transparent and collaborative for everyone involved.
6
+
7
+
Lucid Evolution is structured as a monorepo with multiple packages. Each package serves a specific purpose, so please make sure you're working in the appropriate package when making changes. While we encourage innovation, we also value stability for our users, so please:
8
+
9
+
- Maintain backward compatibility unless a breaking change is explicitly agreed upon for a major version release
10
+
- Consider performance implications when modifying core functionality
11
+
- Follow the existing coding patterns and practices
12
+
13
+
Let's build amazing Cardano tools together!
6
14
7
15
## Ways to Contribute
8
16
@@ -14,59 +22,92 @@ This document outlines how you can contribute to make Lucid Evolution better tha
14
22
15
23
## Development Process
16
24
17
-
We use GitHub to host code, track issues and feature requests, and accept pull requests
25
+
We use GitHub to host code, track issues and feature requests, and accept pull requests.
18
26
19
27
### Pull Requests
20
28
21
29
Pull requests are the best way to propose changes. Write clear, concise commit messages. Following the conventional commits specification is a valuable best practice, we actively welcome your pull requests:
22
30
23
-
1. Fork the repo and create your branch. Naming your branches with a prefix indicating the type of change (e.g., feature/, bugfix/, docs/) followed by a brief description greatly helps the maintainers
31
+
1. Fork the repo and create your branch. Naming your branches with a prefix indicating the type of change (e.g., `feature/`, `bugfix/`, `docs/`) followed by a brief description greatly helps the maintainers
24
32
2. If you've added code that should be tested, add tests
25
33
3. If you've changed APIs, update the documentation
26
34
4. Write and update tests for your changes. Run `pnpm test` to ensure all tests pass
27
35
5. Make sure your code lints
28
36
6. Ensure your changes pass all CI checks before requesting a review
29
-
7. Issue your suggestion
37
+
7. Issue your pull request
30
38
31
39
### Coding Style
32
40
33
-
- Follow the existing coding style in the project
34
41
- Adhere to the ESLint configuration provided in the repository
35
-
- Run `pnpm run lint` / `pnpm list` to ensure your code follows our style guidelines
36
-
- Run `pnpm format` (with Prettier) / `pnpm format-check` to format your code
42
+
- Run `pnpm lint` to ensure your code follows our style guidelines
43
+
- Run `pnpm format` (with Prettier) or `pnpm format-check` to format your code
44
+
45
+
## Local Testing
37
46
38
-
### Local Testing
47
+
Lucid Evolution uses Vitest for testing. There are two main types of tests:
39
48
40
-
Before running tests locally, you need to ensure that specific environment variables are correctly set. These variables are needed for interacting with the necessary APIs (Kupo / Ogmios) during testing. Follow the steps below to configure your environment:
49
+
1.**Unit and emulator tests** - These can run without external dependencies
50
+
2.**On-chain integration tests** - These require API keys and network access
41
51
42
-
- Create the .env files:
52
+
### Setting Up Test Environment
43
53
44
-
Under packages/lucid, create an .env file with the following variables:
54
+
For full test coverage, including on-chain tests, you need to set up environment variables:
55
+
56
+
#### Step 1: Create `.env` files
57
+
58
+
Under `packages/lucid`, create an `.env` file with the following variables:
Under packages/provider, create an .env file with the following variables:
70
+
Under `packages/provider`, create an `.env` file with the following variables:
57
71
58
72
```
59
-
VITE_KUPO_KEY="your_kupo_key_here"
60
-
VITE_OGMIOS_KEY="your_ogmios_key_here"
73
+
VITE_KUPO_URL="your_kupo_endpoint_url"
74
+
VITE_OGMIOS_URL="your_ogmios_endpoint_url"
61
75
```
62
76
63
-
You will not be using API keys directly but `Authenticated HTTP Endpoint URL` (`https://dmtr_ogmios......`)
77
+
#### Step 2: Obtain Required Keys
78
+
79
+
-**Blockfrost**: Register at [blockfrost.io](https://blockfrost.io) to get API keys for both Preprod and Mainnet
80
+
-**Maestro**: Get an API key from [gomaestro.org](https://www.gomaestro.org)
81
+
-**Kupo & Ogmios**: For these services, you'll need the full authenticated HTTP endpoint URLs, not just API keys. You can run these services locally or use a provider that offers them.
82
+
-**Test Wallet**: Create a test wallet with funds on the Preprod network for on-chain tests
83
+
84
+
### Running Tests
85
+
86
+
```bash
87
+
# Run all tests across packages
88
+
pnpm test
89
+
90
+
# Run tests for a specific package
91
+
pnpm --filter @lucid-evolution/lucid test
92
+
93
+
# Run a specific test file
94
+
pnpm --filter @lucid-evolution/lucid test -- path/to/test/file.test.ts
95
+
96
+
# Run tests in watch mode
97
+
pnpm --filter @lucid-evolution/lucid test -- --watch
98
+
```
99
+
100
+
### Testing Without API Keys
101
+
102
+
Many unit tests and emulator-based tests will run without external API keys. The test suite is designed to skip on-chain tests if the required environment variables are not present. This allows you to:
64
103
65
-
If you encounter any issues while running the tests, double-check that all the environment variables are correctly set and that the keys are valid. Also, ensure that your local setup mirrors the environment in which the tests are expected to run
104
+
1. Develop and test core functionality without requiring external resources
105
+
2. Run the CI pipeline without exposing sensitive API keys
106
+
3. Focus on specific test suites during development
66
107
67
108
## Reporting Bugs
68
109
69
-
We use GitHub issues to track bugs. Report a bug by [opening a new issue](https://github.com/Anastasia-Labs/lucid-evolution/issues/new)
110
+
We use GitHub issues to track bugs. Report a bug by [opening a new issue](https://github.com/Anastasia-Labs/lucid-evolution/issues/new).
70
111
71
112
### Bug Report Guidelines
72
113
@@ -82,20 +123,20 @@ A good bug report should include:
82
123
83
124
## Suggesting Enhancements
84
125
85
-
We welcome suggestions for enhancements. Please create an issue to discuss your idea before making significant changes
126
+
We welcome suggestions for enhancements. Please create an issue to discuss your idea before making significant changes.
86
127
87
128
## Documentation
88
129
89
-
Improving documentation is a great way to contribute. This includes both inline code comments and our external documentation. Update the documentation in the `docs` folder for any user-facing changes. Using changesets to document your changes help both you and the mainters to have a better overview for the idea you are contributing with
130
+
Improving documentation is a great way to contribute. This includes both inline code comments and our external documentation. Update the documentation in the `docs` folder for any user-facing changes. Using changesets to document your changes helps both you and the maintainers to have a better overview of the idea you are contributing.
90
131
91
-
(Run `pnpm changeset` to create a new changeset this is required for CI)
132
+
Run `pnpm changeset` to create a new changeset (this is required for CI).
92
133
93
134
## License
94
135
95
-
By contributing to Lucid Evolution, you agree that your contributions will be licensed under its MIT License
136
+
By contributing to Lucid Evolution, you agree that your contributions will be licensed under its MIT License.
96
137
97
138
## Questions?
98
139
99
-
Don't hesitate to ask. You can open an issue or reach out to the maintainers directly. Anastasia Labs team and community actively discuss our opinions in our [discord](https://discord.gg/s89P9gpEff)
140
+
Don't hesitate to ask. You can open an issue or reach out to the maintainers directly. Anastasia Labs team and community actively discuss our opinions in our [Discord](https://discord.gg/s89P9gpEff).
0 commit comments