diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 52437b8b..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,20 +0,0 @@ -build image: - image: docker:20.10.17 - services: - - docker:20.10.17-dind - rules: - - if: $CI_PIPELINE_SOURCE == "schedule" - script: - - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - - docker build -t $CI_REGISTRY_IMAGE . - - docker push $CI_REGISTRY_IMAGE - -run test: - image: $CI_REGISTRY_IMAGE - rules: - - if: $CI_PIPELINE_SOURCE != "schedule" - before_script: - - python --version - - pip install . - script: - - pytest ./dptb/tests diff --git a/.workflow/branch-pipeline.yml b/.workflow/branch-pipeline.yml deleted file mode 100644 index 5f45c174..00000000 --- a/.workflow/branch-pipeline.yml +++ /dev/null @@ -1,52 +0,0 @@ -version: '1.0' -name: branch-pipeline -displayName: BranchPipeline -stages: - - stage: - name: compile - displayName: 编译 - steps: - - step: build@python - name: build_python - displayName: Python 构建 - pythonVersion: '3.9' - # 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除 - artifacts: - # 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址 - - name: BUILD_ARTIFACT - # 构建产物获取路径,是指代码编译完毕之后构建物的所在路径 - path: - - ./ - commands: - - python3 -m pip install --upgrade pip - - pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple - - pip3 install -r requirements.txt - - python3 ./main.py - - step: publish@general_artifacts - name: publish_general_artifacts - displayName: 上传制品 - # 上游构建任务定义的产物名,默认BUILD_ARTIFACT - dependArtifact: BUILD_ARTIFACT - # 上传到制品库时的制品命名,默认output - artifactName: output - dependsOn: build_python - - stage: - name: release - displayName: 发布 - steps: - - step: publish@release_artifacts - name: publish_release_artifacts - displayName: '发布' - # 上游上传制品任务的产出 - dependArtifact: output - # 发布制品版本号 - version: '1.0.0.0' - # 是否开启版本号自增,默认开启 - autoIncrement: true -triggers: - push: - branches: - exclude: - - master - include: - - .* diff --git a/.workflow/master-pipeline.yml b/.workflow/master-pipeline.yml deleted file mode 100644 index 69cf0367..00000000 --- a/.workflow/master-pipeline.yml +++ /dev/null @@ -1,50 +0,0 @@ -version: '1.0' -name: master-pipeline -displayName: MasterPipeline -stages: - - stage: - name: compile - displayName: 编译 - steps: - - step: build@python - name: build_python - displayName: Python 构建 - pythonVersion: '3.9' - # 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除 - artifacts: - # 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址 - - name: BUILD_ARTIFACT - # 构建产物获取路径,是指代码编译完毕之后构建物的所在路径 - path: - - ./ - commands: - - python3 -m pip install --upgrade pip - - pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple - - pip3 install -r requirements.txt - - python3 ./main.py - - step: publish@general_artifacts - name: publish_general_artifacts - displayName: 上传制品 - # 上游构建任务定义的产物名,默认BUILD_ARTIFACT - dependArtifact: BUILD_ARTIFACT - # 上传到制品库时的制品命名,默认output - artifactName: output - dependsOn: build_python - - stage: - name: release - displayName: 发布 - steps: - - step: publish@release_artifacts - name: publish_release_artifacts - displayName: '发布' - # 上游上传制品任务的产出 - dependArtifact: output - # 发布制品版本号 - version: '1.0.0.0' - # 是否开启版本号自增,默认开启 - autoIncrement: true -triggers: - push: - branches: - include: - - master \ No newline at end of file diff --git a/.workflow/pipeline-20221109.yml b/.workflow/pipeline-20221109.yml deleted file mode 100644 index 7f675cb0..00000000 --- a/.workflow/pipeline-20221109.yml +++ /dev/null @@ -1,51 +0,0 @@ -version: '1.0' -name: pipeline-20221109 -displayName: pipeline-20221109 -triggers: - trigger: auto - push: - branches: - prefix: - - '' - pr: - branches: - prefix: - - '' -stages: - - name: stage-0162597a - displayName: test - strategy: naturally - trigger: auto - executor: - - qqgu_phy - - floatingCat - steps: - - step: build@python - name: build_python - displayName: Python 构建 - pythonVersion: '3.8' - commands: - - pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple - - '# 可以使用pip下载依赖' - - '# pip install --user -r requirements.txt' - - python --version - - pip install wheel - - pip install future - - pip install torch --extra-index-url https://download.pytorch.org/whl/cpu - - '# pip install torchsort==0.1.7' - - pip install numpy scipy spglib matplotlib - - pip install ase - - pip install pytest - - pip install pyyaml - - pip install dargs==0.3.3 - - python setup.py install - - '# Python单元测试默认命令' - - python -m pytest ./dptb/tests - artifacts: - - name: BUILD_ARTIFACT - path: - - ./ - caches: [] - notify: [] - strategy: - retry: '0' diff --git a/.workflow/pr-pipeline.yml b/.workflow/pr-pipeline.yml deleted file mode 100644 index e61e401c..00000000 --- a/.workflow/pr-pipeline.yml +++ /dev/null @@ -1,37 +0,0 @@ -version: '1.0' -name: pr-pipeline -displayName: PRPipeline -stages: - - stage: - name: compile - displayName: 编译 - steps: - - step: build@python - name: build_python - displayName: Python 构建 - pythonVersion: '3.9' - # 非必填字段,开启后表示将构建产物暂存,但不会上传到制品库中,7天后自动清除 - artifacts: - # 构建产物名字,作为产物的唯一标识可向下传递,支持自定义,默认为BUILD_ARTIFACT。在下游可以通过${BUILD_ARTIFACT}方式引用来获取构建物地址 - - name: BUILD_ARTIFACT - # 构建产物获取路径,是指代码编译完毕之后构建物的所在路径 - path: - - ./ - commands: - - python3 -m pip install --upgrade pip - - pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple - - pip3 install -r requirements.txt - - python3 ./main.py - - step: publish@general_artifacts - name: publish_general_artifacts - displayName: 上传制品 - # 上游构建任务定义的产物名,默认BUILD_ARTIFACT - dependArtifact: BUILD_ARTIFACT - # 上传到制品库时的制品命名,默认output - artifactName: output - dependsOn: build_python -triggers: - pr: - branches: - include: - - master diff --git a/Dockerfile.gitlab b/Dockerfile.gitlab deleted file mode 100644 index 2ae85a67..00000000 --- a/Dockerfile.gitlab +++ /dev/null @@ -1,9 +0,0 @@ -FROM python:3.10 -RUN pip install torch -RUN pip install torchsort -RUN pip install numpy scipy spglib matplotlib -RUN pip install ase -RUN pip install pytest -RUN pip install future -RUN pip install pyyaml -RUN pip install dargs==0.3.3 diff --git a/dptb/tests/test_readdata.py b/dptb/tests/test_readdata.py index 671122a1..94290186 100644 --- a/dptb/tests/test_readdata.py +++ b/dptb/tests/test_readdata.py @@ -3,6 +3,7 @@ import pytest from ase.io import read from ase.io.trajectory import Trajectory +import os @pytest.fixture(scope='session', autouse=True) def root_directory(request): @@ -62,10 +63,11 @@ def read2bin(root_directory): kpoints = np.loadtxt(in_dir + '/' + kpoints_file) trajstrs = read(in_dir + '/' + struct_file, format='vasp',index=':') - traj = Trajectory(in_dir + '/' + 'xdat.traj',mode='w') + traj = Trajectory(in_dir + '/' + 'xdat2.traj',mode='w') for i in range(1): traj.write(atoms=trajstrs[i]) traj.close() - np.save(in_dir + '/' + 'eigs.npy',eigvaules) - np.save(in_dir + '/' + 'kpoints.npy',kpoints) \ No newline at end of file + #np.save(in_dir + '/' + 'eigs.npy',eigvaules) + #np.save(in_dir + '/' + 'kpoints.npy',kpoints) + #os.remove(in_dir + '/' + 'xdat.traj')