Skip to content

Commit fe7ea8c

Browse files
authored
Merge pull request #366 from fedora-infra/meta
MetaSource (or MDAPI v4.0.0) is here
2 parents 1e6ec04 + cdda9ae commit fe7ea8c

File tree

122 files changed

+16195
-4963
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+16195
-4963
lines changed

.coveragerc

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

.github/workflows/qlty.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Checking overall codebase quality
3+
4+
on: [push, pull_request]
5+
6+
jobs:
7+
ci-qlty:
8+
runs-on: ubuntu-latest
9+
container: fedora:latest
10+
strategy:
11+
fail-fast: false
12+
steps:
13+
- name: Checkout the codebase current state
14+
uses: actions/checkout@v4
15+
- name: Establish the containerized Golang development environment
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: "1.24.5"
19+
- name: Install the system dependencies
20+
run: dnf install go git createrepo_c-devel --setopt=install_weak_deps=False --assumeyes
21+
- name: Analyze codebase for potential issues and suspicious constructs
22+
run: go vet ./...
23+
- name: Ensure codebase adherence with standard Golang formatting style
24+
run: go fmt ./...
25+
- name: Install the base dependencies for staticcheck
26+
run: go install honnef.co/go/tools/cmd/staticcheck@latest
27+
- name: Evaluate codebase for deeper inefficiencies and potential bugs
28+
run: staticcheck ./...
29+
- name: Install the base dependencies for staticcheck
30+
run: go install github.com/securego/gosec/v2/cmd/gosec@latest
31+
- name: Inspect codebase for potential security vulnerabilities
32+
run: gosec -exclude-generated ./...

.gitignore

Lines changed: 18 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -1,132 +1,25 @@
1-
# Byte-compiled / optimized / DLL files
2-
__pycache__/
3-
*.py[cod]
4-
*$py.class
5-
6-
# C extensions
1+
# If you prefer the allow list template instead of the deny list, see community template:
2+
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
3+
#
4+
# Binaries for programs and plugins
5+
*.exe
6+
*.exe~
7+
*.dll
78
*.so
9+
*.dylib
810

9-
# Distribution / packaging
10-
.Python
11-
build/
12-
develop-eggs/
13-
dist/
14-
downloads/
15-
eggs/
16-
.eggs/
17-
lib/
18-
lib64/
19-
parts/
20-
sdist/
21-
var/
22-
wheels/
23-
pip-wheel-metadata/
24-
share/python-wheels/
25-
*.egg-info/
26-
.installed.cfg
27-
*.egg
28-
MANIFEST
29-
30-
# PyInstaller
31-
# Usually these files are written by a python script from a template
32-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33-
*.manifest
34-
*.spec
35-
36-
# Installer logs
37-
pip-log.txt
38-
pip-delete-this-directory.txt
39-
40-
# Unit test / coverage reports
41-
htmlcov/
42-
.tox/
43-
.nox/
44-
.coverage
45-
.coverage.*
46-
.cache
47-
nosetests.xml
48-
coverage.xml
49-
*.cover
50-
*.py,cover
51-
.hypothesis/
52-
.pytest_cache/
53-
54-
# Translations
55-
*.mo
56-
*.pot
57-
58-
# Django stuff:
59-
*.log
60-
local_settings.py
61-
db.sqlite3
62-
db.sqlite3-journal
63-
64-
# Flask stuff:
65-
instance/
66-
.webassets-cache
67-
68-
# Scrapy stuff:
69-
.scrapy
70-
71-
# Sphinx documentation
72-
docs/_build/
73-
74-
# PyBuilder
75-
target/
11+
# Test binary, built with `go test -c`
12+
*.test
7613

77-
# Jupyter Notebook
78-
.ipynb_checkpoints
14+
# Output of the go coverage tool, specifically when used with LiteIDE
15+
*.out
7916

80-
# IPython
81-
profile_default/
82-
ipython_config.py
17+
# Dependency directories (remove the comment below to include it)
18+
# vendor/
8319

84-
# pyenv
85-
.python-version
20+
# Go workspace file
21+
go.work
22+
go.work.sum
8623

87-
# pipenv
88-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91-
# install all needed dependencies.
92-
#Pipfile.lock
93-
94-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95-
__pypackages__/
96-
97-
# Celery stuff
98-
celerybeat-schedule
99-
celerybeat.pid
100-
101-
# SageMath parsed files
102-
*.sage.py
103-
104-
# Environments
24+
# env file
10525
.env
106-
.venv
107-
env/
108-
venv/
109-
ENV/
110-
env.bak/
111-
venv.bak/
112-
113-
# Spyder project settings
114-
.spyderproject
115-
.spyproject
116-
117-
# Rope project settings
118-
.ropeproject
119-
120-
# mkdocs documentation
121-
/site
122-
123-
# mypy
124-
.mypy_cache/
125-
.dmypy.json
126-
dmypy.json
127-
128-
# Pyre type checker
129-
.pyre/
130-
131-
# JetBrains configuration files
132-
.idea/

Containerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
LABEL maintainer "Akashdeep Dhar <[email protected]>"
2+
3+
# Builder image
4+
5+
FROM registry.fedoraproject.org/fedora-minimal:42 AS builder
6+
7+
RUN dnf update --assumeyes && dnf install wget createrepo_c-devel gcc tar gzip golang git --assumeyes --setopt=install_weak_deps=False && dnf clean all
8+
9+
WORKDIR /metasource
10+
11+
COPY . .
12+
13+
ENV CGO_ENABLED=1 GOOS=linux
14+
15+
RUN go mod download && go build -o meta
16+
17+
# Runtime image
18+
19+
FROM registry.fedoraproject.org/fedora-minimal:42 as runtime
20+
21+
RUN dnf update --assumeyes && dnf install createrepo_c-devel --assumeyes --setopt=install_weak_deps=False && dnf clean all && mkdir --parents /db
22+
23+
VOLUME ["/db"]
24+
25+
COPY --from=builder /metasource/meta /metasource/meta
26+
27+
EXPOSE 8080
28+
29+
ENTRYPOINT ["/metasource/meta"]

Dockerfile

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)