Skip to content

Commit

Permalink
Chore: Rearrange Source Directory (#215)
Browse files Browse the repository at this point in the history
* Chore: Rearrange Source Directory

* Chore: update file paths in MANIFEST.in and setup.py

* Fix: update author email and project description in setup.py

* Chore: clean up setup.py by removing unused functions and comments
  • Loading branch information
NripeshN authored Dec 18, 2024
1 parent f99d8cb commit 0aefe89
Show file tree
Hide file tree
Showing 58 changed files with 63 additions and 69 deletions.
12 changes: 6 additions & 6 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
include README.md
include LICENSE
include src/backend/DirectX/*.py
include src/backend/Metal/*.py
include src/backend/Opengl/*.py
include src/translator/*.py
include src/translator/codegen/*.py
include backend/DirectX/*.py
include backend/Metal/*.py
include backend/Opengl/*.py
include translator/*.py
include translator/codegen/*.py
include crosstl.py
include crosstl
include corsstl/src/
include corsstl/
18 changes: 9 additions & 9 deletions crosstl/_crosstl.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from .src import translator
from .src.translator.lexer import Lexer
from .src.translator.parser import Parser
from .src.translator.codegen import directx_codegen, metal_codegen, opengl_codegen
from .src.translator.ast import ASTNode
from .src.backend.DirectX import *
from .src.backend.Metal import *
from .src.backend.Opengl import *
from .src.backend.slang import *
from . import translator
from .translator.lexer import Lexer
from .translator.parser import Parser
from .translator.codegen import directx_codegen, metal_codegen, opengl_codegen
from .translator.ast import ASTNode
from .backend.DirectX import *
from .backend.Metal import *
from .backend.Opengl import *
from .backend.slang import *


def translate(file_path: str, backend: str = "cgl", save_shader: str = None) -> str:
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.
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
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.
24 changes: 9 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
from setuptools import setup, find_packages


def prep(line):
return line.split(" ")[0].split("#")[0].split(",")[0]
from setuptools import setup


setup(
name="crosstl",
packages=[
"crosstl",
"crosstl/src",
"crosstl/src/translator/",
"crosstl/src/translator/codegen/",
"crosstl/src/backend",
"crosstl/src/backend/DirectX",
"crosstl/src/backend/Metal/",
"crosstl/src/backend/Opengl/",
"crosstl/translator/",
"crosstl/translator/codegen/",
"crosstl/backend",
"crosstl/backend/DirectX",
"crosstl/backend/Metal/",
"crosstl/backend/Opengl/",
],
version="0.0.1.3",
author="CrossGL team",
author_email="vaatsalya@crossgl.net",
description="CrossGL: Revolutionizing Shader Development",
author_email="nripesh@crossgl.net",
description="CrossTL: Revolutionizing Shader Development",
long_description=open("README.md", "r", -1, "UTF8").read(),
long_description_content_type="text/markdown",
url="https://crossgl.net/",
project_urls={"Documentation": "https://crossgl.github.io/index.html"},
include_package_dats=True,
# packages=find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
Expand Down
6 changes: 3 additions & 3 deletions tests/test_backend/test_directx/test_codegen.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from crosstl.src.backend.DirectX import DirectxCrossGLCodeGen
from crosstl.src.backend.DirectX.DirectxLexer import HLSLLexer
from crosstl.src.backend.DirectX.DirectxParser import HLSLParser
from crosstl.backend.DirectX import DirectxCrossGLCodeGen
from crosstl.backend.DirectX.DirectxLexer import HLSLLexer
from crosstl.backend.DirectX.DirectxParser import HLSLParser
import pytest
from typing import List

Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_directx/test_lexer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from typing import List
from crosstl.src.backend.DirectX.DirectxLexer import HLSLLexer
from crosstl.backend.DirectX.DirectxLexer import HLSLLexer


def tokenize_code(code: str) -> List:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_backend/test_directx/test_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
from typing import List
from crosstl.src.backend.DirectX.DirectxLexer import HLSLLexer
from crosstl.src.backend.DirectX.DirectxParser import HLSLParser
from crosstl.backend.DirectX.DirectxLexer import HLSLLexer
from crosstl.backend.DirectX.DirectxParser import HLSLParser


def parse_code(tokens: List):
Expand Down
6 changes: 3 additions & 3 deletions tests/test_backend/test_metal/test_codegen.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pytest
from typing import List
from crosstl.src.backend.Metal.MetalLexer import MetalLexer
from crosstl.src.backend.Metal.MetalParser import MetalParser
from crosstl.src.backend.Metal.MetalCrossGLCodeGen import MetalToCrossGLConverter
from crosstl.backend.Metal.MetalLexer import MetalLexer
from crosstl.backend.Metal.MetalParser import MetalParser
from crosstl.backend.Metal.MetalCrossGLCodeGen import MetalToCrossGLConverter


def tokenize_code(code: str) -> List:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_metal/test_lexer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from typing import List
from crosstl.src.backend.Metal.MetalLexer import MetalLexer
from crosstl.backend.Metal.MetalLexer import MetalLexer


def tokenize_code(code: str) -> List:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_backend/test_metal/test_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
from typing import List
from crosstl.src.backend.Metal.MetalLexer import MetalLexer
from crosstl.src.backend.Metal.MetalParser import MetalParser
from crosstl.backend.Metal.MetalLexer import MetalLexer
from crosstl.backend.Metal.MetalParser import MetalParser


def tokenize_code(code: str) -> List:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_backend/test_opengl/test_codegen.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from crosstl.src.backend.Opengl.OpenglLexer import GLSLLexer
from crosstl.backend.Opengl.OpenglLexer import GLSLLexer
import pytest
from typing import List
from crosstl.src.backend.Opengl.OpenglParser import GLSLParser
from crosstl.src.backend.Opengl.openglCrossglCodegen import GLSLToCrossGLConverter
from crosstl.backend.Opengl.OpenglParser import GLSLParser
from crosstl.backend.Opengl.openglCrossglCodegen import GLSLToCrossGLConverter


def tokenize_code(code: str) -> List:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_opengl/test_lexer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from crosstl.src.backend.Opengl.OpenglLexer import GLSLLexer
from crosstl.backend.Opengl.OpenglLexer import GLSLLexer
import pytest
from typing import List

Expand Down
4 changes: 2 additions & 2 deletions tests/test_backend/test_opengl/test_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from crosstl.src.backend.Opengl.OpenglLexer import GLSLLexer
from crosstl.backend.Opengl.OpenglLexer import GLSLLexer
import pytest
from typing import List
from crosstl.src.backend.Opengl.OpenglParser import GLSLParser
from crosstl.backend.Opengl.OpenglParser import GLSLParser


def tokenize_code(code: str) -> List:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_backend/test_slang/test_codegen.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from crosstl.src.backend.slang import SlangCrossGLCodeGen
from crosstl.src.backend.slang import SlangLexer
from crosstl.src.backend.slang import SlangParser
from crosstl.backend.slang import SlangCrossGLCodeGen
from crosstl.backend.slang import SlangLexer
from crosstl.backend.slang import SlangParser
import pytest
from typing import List

Expand Down
2 changes: 1 addition & 1 deletion tests/test_backend/test_slang/test_lexer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest
from typing import List
from crosstl.src.backend.slang.SlangLexer import SlangLexer
from crosstl.backend.slang.SlangLexer import SlangLexer


def tokenize_code(code: str) -> List:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_backend/test_slang/test_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
from typing import List
from crosstl.src.backend.slang import SlangLexer
from crosstl.src.backend.slang import SlangParser
from crosstl.backend.slang import SlangLexer
from crosstl.backend.slang import SlangParser


def parse_code(tokens: List):
Expand Down
6 changes: 3 additions & 3 deletions tests/test_translator/test_codegen/test_directx_codegen.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from crosstl.src.translator.lexer import Lexer
from crosstl.translator.lexer import Lexer
import pytest
from typing import List
from crosstl.src.translator.parser import Parser
from crosstl.src.translator.codegen.directx_codegen import HLSLCodeGen
from crosstl.translator.parser import Parser
from crosstl.translator.codegen.directx_codegen import HLSLCodeGen


def tokenize_code(code: str) -> List:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_translator/test_codegen/test_metal_codegen.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from crosstl.src.translator.lexer import Lexer
from crosstl.translator.lexer import Lexer
import pytest
from typing import List
from crosstl.src.translator.parser import Parser
from crosstl.src.translator.codegen.metal_codegen import MetalCodeGen
from crosstl.translator.parser import Parser
from crosstl.translator.codegen.metal_codegen import MetalCodeGen


def tokenize_code(code: str) -> List:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_translator/test_codegen/test_opengl_codegen.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from crosstl.src.translator.lexer import Lexer
from crosstl.translator.lexer import Lexer
import pytest
from typing import List
from crosstl.src.translator.parser import Parser
from crosstl.src.translator.codegen.opengl_codegen import GLSLCodeGen
from crosstl.translator.parser import Parser
from crosstl.translator.codegen.opengl_codegen import GLSLCodeGen


def tokenize_code(code: str) -> List:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_translator/test_codegen/test_slang_codegen.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from crosstl.src.translator.lexer import Lexer
from crosstl.translator.lexer import Lexer
import pytest
from typing import List
from crosstl.src.translator.parser import Parser
from crosstl.src.translator.codegen.slang_codegen import SlangCodeGen
from crosstl.translator.parser import Parser
from crosstl.translator.codegen.slang_codegen import SlangCodeGen


def tokenize_code(code: str) -> List:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_translator/test_lexer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from crosstl.src.translator.lexer import Lexer
from crosstl.translator.lexer import Lexer
import pytest
from typing import List

Expand Down
4 changes: 2 additions & 2 deletions tests/test_translator/test_parser.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from crosstl.src.translator.lexer import Lexer
from crosstl.translator.lexer import Lexer
import pytest
from typing import List
from crosstl.src.translator.parser import Parser
from crosstl.translator.parser import Parser


def tokenize_code(code: str) -> List:
Expand Down

0 comments on commit 0aefe89

Please sign in to comment.