Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/SETUP_COVERAGE_BADGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ For **private repositories**:
If your repository is private:

1. **Get Your Codecov Token**
- Navigate to https://codecov.io/gh/devskill-org/energy-management-system
- Navigate to https://codecov.io/gh/devskill-org/ems
- Click on "Settings" in the left sidebar
- Copy the "Repository Upload Token"

Expand All @@ -46,21 +46,21 @@ If your repository is private:

1. **Commit and push** your changes (if you haven't already)
2. **Wait for workflow** to complete (check the Actions tab)
3. **Visit Codecov** dashboard at https://codecov.io/gh/devskill-org/energy-management-system
3. **Visit Codecov** dashboard at https://codecov.io/gh/devskill-org/ems
4. **Check your README** - the badge should now display the coverage percentage

## Badge Configuration

The coverage badge is already configured in your README.md:

```markdown
[![Coverage](https://codecov.io/gh/devskill-org/energy-management-system/branch/main/graph/badge.svg)](https://codecov.io/gh/devskill-org/energy-management-system)
[![Coverage](https://codecov.io/gh/devskill-org/ems/branch/main/graph/badge.svg)](https://codecov.io/gh/devskill-org/ems)
```

If you use a different default branch (e.g., `master`), update the badge URL:

```markdown
[![Coverage](https://codecov.io/gh/devskill-org/energy-management-system/branch/master/graph/badge.svg)](https://codecov.io/gh/devskill-org/energy-management-system)
[![Coverage](https://codecov.io/gh/devskill-org/ems/branch/master/graph/badge.svg)](https://codecov.io/gh/devskill-org/ems)
```

## Codecov Features
Expand Down Expand Up @@ -95,17 +95,17 @@ You can customize your badge appearance:

### Default Badge
```markdown
[![Coverage](https://codecov.io/gh/devskill-org/energy-management-system/branch/main/graph/badge.svg)](https://codecov.io/gh/devskill-org/energy-management-system)
[![Coverage](https://codecov.io/gh/devskill-org/ems/branch/main/graph/badge.svg)](https://codecov.io/gh/devskill-org/ems)
```

### Flat Style Badge
```markdown
[![Coverage](https://codecov.io/gh/devskill-org/energy-management-system/branch/main/graph/badge.svg?style=flat)](https://codecov.io/gh/devskill-org/energy-management-system)
[![Coverage](https://codecov.io/gh/devskill-org/ems/branch/main/graph/badge.svg?style=flat)](https://codecov.io/gh/devskill-org/ems)
```

### Flat-Square Style Badge
```markdown
[![Coverage](https://codecov.io/gh/devskill-org/energy-management-system/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/devskill-org/energy-management-system)
[![Coverage](https://codecov.io/gh/devskill-org/ems/branch/main/graph/badge.svg?style=flat-square)](https://codecov.io/gh/devskill-org/ems)
```

## Troubleshooting
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,27 +55,27 @@ To get coverage badges and detailed reports at [Codecov](https://codecov.io):
- Value: Your Codecov token

4. **View Coverage Reports**
- After the first workflow run, visit https://codecov.io/gh/devskill-org/energy-management-system
- After the first workflow run, visit https://codecov.io/gh/devskill-org/ems
- View detailed coverage reports, trends, and file-by-file analysis
- The badge in README.md will automatically update

**Badge:**
```markdown
[![Coverage](https://codecov.io/gh/devskill-org/energy-management-system/branch/main/graph/badge.svg)](https://codecov.io/gh/devskill-org/energy-management-system)
[![Coverage](https://codecov.io/gh/devskill-org/ems/branch/main/graph/badge.svg)](https://codecov.io/gh/devskill-org/ems)
```

### Alternative: Simple Test Status Badge

If you don't want to use Codecov, you can use just the test status badge:

```markdown
[![Tests](https://github.com/devskill-org/energy-management-system/actions/workflows/test.yml/badge.svg)](https://github.com/devskill-org/energy-management-system/actions/workflows/test.yml)
[![Tests](https://github.com/devskill-org/ems/actions/workflows/test.yml/badge.svg)](https://github.com/devskill-org/ems/actions/workflows/test.yml)
```

## Viewing Coverage Reports

### In Codecov
1. Visit https://codecov.io/gh/devskill-org/energy-management-system
1. Visit https://codecov.io/gh/devskill-org/ems
2. View coverage percentage, trends, and file-by-file breakdown
3. See coverage changes in pull requests

Expand Down Expand Up @@ -110,9 +110,9 @@ Then open `coverage.html` in your browser.
Add these badges to your README.md:

```markdown
[![Tests](https://github.com/devskill-org/energy-management-system/actions/workflows/test.yml/badge.svg)](https://github.com/devskill-org/energy-management-system/actions/workflows/test.yml)
[![Coverage](https://codecov.io/gh/devskill-org/energy-management-system/branch/main/graph/badge.svg)](https://codecov.io/gh/devskill-org/energy-management-system)
[![Go Report Card](https://goreportcard.com/badge/github.com/devskill-org/energy-management-system)](https://goreportcard.com/report/github.com/devskill-org/energy-management-system)
[![Tests](https://github.com/devskill-org/ems/actions/workflows/test.yml/badge.svg)](https://github.com/devskill-org/ems/actions/workflows/test.yml)
[![Coverage](https://codecov.io/gh/devskill-org/ems/branch/main/graph/badge.svg)](https://codecov.io/gh/devskill-org/ems)
[![Go Report Card](https://goreportcard.com/badge/github.com/devskill-org/ems)](https://goreportcard.com/report/github.com/devskill-org/ems)
```

## Troubleshooting
Expand All @@ -138,4 +138,4 @@ Add these badges to your README.md:
- [GitHub Actions Documentation](https://docs.github.com/en/actions)
- [Go Testing Documentation](https://golang.org/pkg/testing/)
- [Codecov Documentation](https://docs.codecov.com/)
- [golangci-lint Documentation](https://golangci-lint.run/)
- [golangci-lint Documentation](https://golangci-lint.run/)
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Thank you for your interest in contributing to the Energy Management System! Thi
```
3. Add the upstream repository:
```bash
git remote add upstream https://github.com/devskill-org/energy-management-system.git
git remote add upstream https://github.com/devskill-org/ems.git
```

## Development Setup
Expand Down Expand Up @@ -355,4 +355,4 @@ Closes #123

By contributing, you agree that your contributions will be licensed under the same license as the project.

Thank you for contributing! 🎉
Thank you for contributing! 🎉
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Energy Management System (EMS)

[![Tests](https://github.com/devskill-org/energy-management-system/actions/workflows/test.yml/badge.svg)](https://github.com/devskill-org/energy-management-system/actions/workflows/test.yml)
[![Coverage](https://codecov.io/gh/devskill-org/energy-management-system/branch/main/graph/badge.svg)](https://codecov.io/gh/devskill-org/energy-management-system)
[![Go Report Card](https://goreportcard.com/badge/github.com/devskill-org/energy-management-system)](https://goreportcard.com/report/github.com/devskill-org/energy-management-system)
[![Go Version](https://img.shields.io/github/go-mod/go-version/devskill-org/energy-management-system)](https://github.com/devskill-org/energy-management-system/blob/main/go.mod)
[![License](https://img.shields.io/github/license/devskill-org/energy-management-system)](https://github.com/devskill-org/energy-management-system/blob/main/LICENSE)
[![Tests](https://github.com/devskill-org/ems/actions/workflows/test.yml/badge.svg)](https://github.com/devskill-org/ems/actions/workflows/test.yml)
[![Coverage](https://codecov.io/gh/devskill-org/ems/branch/main/graph/badge.svg)](https://codecov.io/gh/devskill-org/ems)
[![Go Report Card](https://goreportcard.com/badge/github.com/devskill-org/ems)](https://goreportcard.com/report/github.com/devskill-org/ems)
[![Go Version](https://img.shields.io/github/go-mod/go-version/devskill-org/ems)](https://github.com/devskill-org/ems/blob/main/go.mod)
[![License](https://img.shields.io/github/license/devskill-org/ems)](https://github.com/devskill-org/ems/blob/main/LICENSE)

A comprehensive Go-based Energy Management System that optimizes energy consumption, production, and storage across multiple sources including solar (PV), battery storage, grid connection, and controllable loads. The system uses real-time electricity price data, weather forecasts, and Model Predictive Control (MPC) to minimize energy costs while maintaining system reliability.

Expand Down Expand Up @@ -143,7 +143,7 @@ The Energy Management System operates on multiple time scales:
### From Source

```bash
git clone https://github.com/devskill-org/energy-management-system.git
git clone https://github.com/devskill-org/ems.git
cd energy-management-system
go build -o ems ./
```
Expand Down Expand Up @@ -525,8 +525,8 @@ This project is licensed under the terms specified in the [LICENSE](LICENSE) fil

## Support

- **Issues**: [GitHub Issues](https://github.com/devskill-org/energy-management-system/issues)
- **Discussions**: [GitHub Discussions](https://github.com/devskill-org/energy-management-system/discussions)
- **Issues**: [GitHub Issues](https://github.com/devskill-org/ems/issues)
- **Discussions**: [GitHub Discussions](https://github.com/devskill-org/ems/discussions)
- **Documentation**: Check the `/docs` folder for detailed guides

## Roadmap
Expand All @@ -537,4 +537,4 @@ This project is licensed under the terms specified in the [LICENSE](LICENSE) fil
- [ ] Mobile app for remote monitoring
- [ ] Multi-site management
- [ ] Enhanced MPC algorithms
- [ ] Integration with home automation systems (Home Assistant, etc.)
- [ ] Integration with home automation systems (Home Assistant, etc.)
2 changes: 1 addition & 1 deletion entsoe/api_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"
"time"

"github.com/devskill-org/energy-management-system/utils"
"github.com/devskill-org/ems/utils"
)

// APIClient represents an HTTP client for the ENTSO-E API
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/devskill-org/energy-management-system
module github.com/devskill-org/ems

go 1.25.1

Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"os/signal"
"syscall"

"github.com/devskill-org/energy-management-system/scheduler"
"github.com/devskill-org/energy-management-system/sigenergy"
"github.com/devskill-org/ems/scheduler"
"github.com/devskill-org/ems/sigenergy"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions meteo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A Go client library for the [MET Norway Location Forecast API](https://api.met.n
## Installation

```bash
go get github.com/devskill-org/energy-management-system/meteo
go get github.com/devskill-org/ems/meteo
```

## Quick Start
Expand All @@ -27,7 +27,7 @@ import (
"fmt"
"log"

"github.com/devskill-org/energy-management-system/meteo"
"github.com/devskill-org/ems/meteo"
)

func main() {
Expand Down Expand Up @@ -284,4 +284,4 @@ https://api.met.no/weatherapi/locationforecast/2.0/documentation

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.
Contributions are welcome! Please feel free to submit a Pull Request.
2 changes: 1 addition & 1 deletion meteo/example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"log"
"time"

"github.com/devskill-org/energy-management-system/meteo"
"github.com/devskill-org/ems/meteo"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion mpc/example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"math"
"time"

"github.com/devskill-org/energy-management-system/mpc"
"github.com/devskill-org/ems/mpc"
)

// Example usage
Expand Down
2 changes: 1 addition & 1 deletion scheduler/miners.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"time"

"github.com/devskill-org/energy-management-system/miners"
"github.com/devskill-org/ems/miners"
)

// discoverMiners discovers Avalon miners on the network and stores them
Expand Down
2 changes: 1 addition & 1 deletion scheduler/miners_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"testing"

"github.com/devskill-org/energy-management-system/miners"
"github.com/devskill-org/ems/miners"
)

// This file contains unit tests for the controlMiner function in miners.go.
Expand Down
6 changes: 3 additions & 3 deletions scheduler/mpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"math"
"time"

"github.com/devskill-org/energy-management-system/meteo"
"github.com/devskill-org/energy-management-system/mpc"
"github.com/devskill-org/energy-management-system/sigenergy"
"github.com/devskill-org/ems/meteo"
"github.com/devskill-org/ems/mpc"
"github.com/devskill-org/ems/sigenergy"
"github.com/sixdouglas/suncalc"
)

Expand Down
2 changes: 1 addition & 1 deletion scheduler/pricing.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"time"

"github.com/devskill-org/energy-management-system/entsoe"
"github.com/devskill-org/ems/entsoe"
)

// GetPricesMarketData returns the cached PublicationMarketData without downloading
Expand Down
4 changes: 2 additions & 2 deletions scheduler/pv.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"sync"
"time"

"github.com/devskill-org/energy-management-system/meteo"
"github.com/devskill-org/energy-management-system/sigenergy"
"github.com/devskill-org/ems/meteo"
"github.com/devskill-org/ems/sigenergy"
)

type WeatherForecastCache struct {
Expand Down
4 changes: 2 additions & 2 deletions scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"sync"
"time"

"github.com/devskill-org/energy-management-system/entsoe"
"github.com/devskill-org/energy-management-system/miners"
"github.com/devskill-org/ems/entsoe"
"github.com/devskill-org/ems/miners"
_ "github.com/lib/pq"
)

Expand Down
4 changes: 2 additions & 2 deletions scheduler/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"testing"
"time"

"github.com/devskill-org/energy-management-system/entsoe"
"github.com/devskill-org/energy-management-system/miners"
"github.com/devskill-org/ems/entsoe"
"github.com/devskill-org/ems/miners"
)

// mockEnergyPricesServer creates a mock HTTP server that returns valid energy prices XML
Expand Down