Skip to content

Commit

Permalink
Upload repository mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
cpes-sentinel committed Mar 27, 2024
0 parents commit 335a389
Show file tree
Hide file tree
Showing 53 changed files with 3,908 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
ignore = E501
exclude =
21 changes: 21 additions & 0 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Deploy Docs

on:
push:
branches: [main] # branch to trigger deployment

jobs:
pages:
runs-on: ubuntu-20.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- id: deployment
uses: sphinx-notes/pages@v3
with:
documentation_path: './docs/source'
requirements_path: './requirements.txt'
125 changes: 125 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
files/*
examples/*
!examples/files/artifacts/default.json
!examples/files/contracts/default.json
# IDE
.idea/
.vscode/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

poetry.toml
35 changes: 35 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
stages:
- lint
- deploy

ruff:
image:
name: python:3.9-slim-bookworm
entrypoint: [ "/usr/bin/env" ]
stage: lint
before_script:
- pip install poetry
- poetry install
- source "$(poetry env info --path)/bin/activate" || exit 1
script:
- ruff check .

mirror_to_github:
stage: deploy
image: docker
variables:
GIT_STRATEGY: clone
only:
- main
script:
- apk add --no-cache git
- cd $CI_PROJECT_DIR # Navigate to the project directory
- git checkout main
- git config user.email "[email protected]"
- git config user.name "cpes-sentinel"
- git reset $(git commit-tree HEAD^{tree} -m "Upload repository mirror")
- git add -A
- git remote add github https://github.com/CPES-Power-and-Energy-Systems/tsg-client
- git push --force
"https://oauth2:${GITHUB_TOKEN}@github.com/CPES-Power-and-Energy-Systems/tsg-client.git"
main
Loading

0 comments on commit 335a389

Please sign in to comment.