Skip to content

Commit

Permalink
Merge pull request #188 from csunibo/del-config-submodule
Browse files Browse the repository at this point in the history
del: config submodule inside parser
  • Loading branch information
samuelemusiani authored Jun 25, 2024
2 parents aa1b8ff + 2a08b5e commit 3c401e8
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 18 deletions.
6 changes: 0 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,3 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "gitsubmodule"
directory: "/"
allow:
- dependency-name: "json/config"
schedule:
interval: "daily"
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/csunibo/informabot

go 1.22.3
go 1.22.4

require (
github.com/csunibo/unibo-go v0.0.10
Expand All @@ -10,4 +10,6 @@ require (
golang.org/x/text v0.16.0
)

require github.com/csunibo/config-parser-go v0.0.3-0.20240605210600-7adafb400cbf
require github.com/csunibo/config-parser-go v0.1.0

require github.com/csunibo/config v0.1.0 // indirect
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
github.com/csunibo/config v0.1.0 h1:3BMloeZ4rMIGnZHtjidrnxHt+VtwF2nWNavuf2AmJiw=
github.com/csunibo/config v0.1.0/go.mod h1:DnpQhVGqGH3ccu+Mdkmg/NdMAcEYv/BEXVTO/lGU+so=
github.com/csunibo/config-parser-go v0.0.3-0.20240605210600-7adafb400cbf h1:KGJHNxAn9ysnmAaD4TcdGNuS1elygT4pvCgdliMfXG4=
github.com/csunibo/config-parser-go v0.0.3-0.20240605210600-7adafb400cbf/go.mod h1:dwZfvG8VAisAae8r8kZ1wzY4KkRivXpPuco9WQy+PW4=
github.com/csunibo/config-parser-go v0.1.0 h1:1O8yWY+CL64PSQqJPLAYjxONURvKK4yB2RfK98KFLQE=
github.com/csunibo/config-parser-go v0.1.0/go.mod h1:Uh8k31CrCJdReDgo2ew2+Z6XeIWkl0MTg09P4oW+EdM=
github.com/csunibo/unibo-go v0.0.10 h1:UwFIvTpXMKZCOVoX564RmqQttXTTs5Xz5hCAjun8NFk=
github.com/csunibo/unibo-go v0.0.10/go.mod h1:h2+xnccHa7x48RNB6d07bpHQ01ozw4oihgDOlvVrJ9U=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
Expand Down
1 change: 0 additions & 1 deletion json/config
Submodule config deleted from a257d0
11 changes: 5 additions & 6 deletions model/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"io"
"os"
"path"
"path/filepath"
"strings"

Expand Down Expand Up @@ -57,7 +56,7 @@ func commandNameFromDegree(d cparser.Degree) string {

func ParseTeachings() (teachings map[string]cparser.Teaching, err error) {

teachingsArray, err := cparser.ParseTeachings(filepath.Join(jsonPath, configSubpath))
teachingsArray, err := cparser.ParseTeachings()
if err != nil {
return nil, fmt.Errorf("error parsing Teachings: %w", err)
}
Expand All @@ -69,7 +68,7 @@ func ParseTeachings() (teachings map[string]cparser.Teaching, err error) {
}

func ParseDegrees() (degrees map[string]cparser.Degree, err error) {
degreesArray, err := cparser.ParseDegrees(filepath.Join(jsonPath, configSubpath))
degreesArray, err := cparser.ParseDegrees()
if err != nil {
return nil, fmt.Errorf("error parsing Degrees: %w", err)
}
Expand Down Expand Up @@ -189,7 +188,7 @@ func SaveGroups(groups GroupsStruct) error {
}

func ParseTimetables() (timetables map[string]cparser.Timetable, err error) {
timetables, err = cparser.ParseTimetables(filepath.Join(jsonPath, configSubpath))
timetables, err = cparser.ParseTimetables()

if err != nil {
return nil, fmt.Errorf("error parsing Timetables: %w", err)
Expand All @@ -198,9 +197,9 @@ func ParseTimetables() (timetables map[string]cparser.Timetable, err error) {
}

func ParseMaintainers() (maintainer []cparser.Maintainer, err error) {
return cparser.ParseMaintainers(path.Join(jsonPath, configSubpath))
return cparser.ParseMaintainers()
}

func ParseRepresentatives() (map[string]cparser.Representative, error) {
return cparser.ParseRepresentatives(path.Join(jsonPath, configSubpath))
return cparser.ParseRepresentatives()
}

0 comments on commit 3c401e8

Please sign in to comment.