Skip to content

Commit

Permalink
Merge branch 'cc-docker'
Browse files Browse the repository at this point in the history
  • Loading branch information
zgornel committed Sep 10, 2024
2 parents 193bc87 + 7f28256 commit 0ced281
Show file tree
Hide file tree
Showing 30 changed files with 69 additions and 63 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ _*
_*/
Manifest.toml
data/
data
VUBLinter.jl/docs/build
docs/build
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion README.md

This file was deleted.

28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# VUBLinter.jl

A data linter written in Julia at the Vrije Universiteit Brussel.

[![License](http://img.shields.io/badge/license-GPL-brightgreen.svg?style=flat)](LICENSE.md)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://zgornel.github.io/VUBLinter/dev)


## Installation

The installation can be done by manually by cloning the repository or installing it through the julia `REPL`.


## License

This code has an GPL license and therefore it is free as beer.


## Reporting Bugs

Please [file an issue](https://github.com/zgornel/VUBLinter.jl/issues/new) to report a bug or request a feature.


## References

[1] https://en.wikipedia.org/wiki/Lint_(software)

For other interesting data linting solutions, check out also [this work](https://github.com/brain-research/data-linter) from Google brain research.
File renamed without changes.
28 changes: 0 additions & 28 deletions VUBLinter.jl/README.md

This file was deleted.

17 changes: 0 additions & 17 deletions VUBLinter.jl/lintfast

This file was deleted.

8 changes: 8 additions & 0 deletions apps/vublinter/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name = "vublinter"
uuid = "1c60c992-bb9d-4404-95b0-08c73534b203"
authors = ["Corneliu Cofaru <[email protected]>"]
version = "0.1.0"

[deps]
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
4 changes: 4 additions & 0 deletions apps/vublinter/precompile.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
using vublinter

push!(ARGS, "arg")
vublinter.julia_main()
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#
module vublinter

Base.set_active_project(abspath(joinpath(dirname(@__FILE__), "Project.toml")))
using Pkg
project_root_path = abspath(joinpath(splitpath(@__FILE__)[1:end-4]...))
Pkg.activate(project_root_path)

using Logging
using ArgParse
Expand Down
5 changes: 2 additions & 3 deletions docker/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ RUN mkdir -p /workspace

# Copy binaries
WORKDIR /
COPY ./VUBLinter.jl ./VUBLinter.jl
COPY ./ ./


# Prime dependencies for top level script
WORKDIR /VUBLinter.jl
RUN julia -e 'using Pkg; Pkg.activate("."); Pkg.test()'
WORKDIR /
11 changes: 1 addition & 10 deletions docker/Dockerfile.manjaro
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
# ArchLinux based commands
FROM manjarolinux/base:20240804
RUN pacman -Syyu --noconfirm && \
pacman -S --noconfirm julia && \
pacman -S --noconfirm curl && \
pacman -Scc --noconfirm && \
rm -f /var/cache/pacman/pkg/*

# make directories
RUN mkdir -p /tmp
RUN mkdir -p /output
RUN mkdir -p /workspace

# Copy binaries
WORKDIR /
COPY ./VUBLinter.jl ./VUBLinter.jl


# Prime dependencies for top level script
WORKDIR /VUBLinter.jl
RUN julia -e 'using Pkg; Pkg.activate("."); Pkg.test()'
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ for (srow, drow) in duplicates
end
code = "apply_some_classifier" # some sample code, will activate only the missing rule

kbpath = expanduser("~/vub/code/vublinter/VUBLinter.jl/knowledge/linting.toml")
kbpath = joinpath(dirname(@__FILE__), "..", "knowledge", "linting.toml")
kb = VUBLinter.kb_load(kbpath)

# First case, print to stdout linting on data
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions vublinterw.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module vublinterw

# The actual entrypoint is apps/vublinter/src/vublinter.jl
const VUBLINTERPATH = abspath(joinpath(@__DIR__, "apps", "vublinter", "src", "vublinter.jl"))
include(VUBLINTERPATH) # adds module vublinter

import Pkg, UUIDs
prj = Pkg.project()
if prj.name != "VUBLinter" || prj.uuid != UUIDs.UUID("7795ac26-99bd-44b7-aa9b-4d57ee2553a8")
@warn "Something is off, vublinter should have already activated the project environment."
Pkg.activate(@__DIR__) # activates current directory (VUBLinter project directory) only if not already activated by vublinter
Pkg.instantiate()
end

main_script_file = abspath(PROGRAM_FILE)

if occursin("debugger", main_script_file) || main_script_file == @__FILE__
vublinter.real_main()
end

end # module
File renamed without changes.

0 comments on commit 0ced281

Please sign in to comment.