Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
fb7405b
init pyproject
Nikolai-SE Mar 1, 2023
3814d73
create prototypes of classes
Nikolai-SE Mar 1, 2023
3b6fcd3
Realise context_manager
Nikolai-SE Mar 1, 2023
2f4dc0d
Substituter implementation stub
Nikolai-SE Mar 1, 2023
f441ad1
Implement Lexer
Nikolai-SE Mar 1, 2023
06a3a29
Add CI, fix parsing
Nikolai-SE Mar 1, 2023
0d3d920
Начал делать класс Application
RazerFord Mar 1, 2023
b4879bc
Начал делать класс Application
RazerFord Mar 1, 2023
9a9ec21
Precommit
Nikolai-SE Mar 1, 2023
5f746cf
Add README.md to project
Nikolai-SE Mar 1, 2023
9fa29a2
Добавил main Application
RazerFord Mar 1, 2023
99ab855
Изменил Application
RazerFord Mar 1, 2023
806d5c9
first version of pwd
kgamora Mar 1, 2023
e1305e4
first version of exit
kgamora Mar 1, 2023
4195937
formatted with pre-commit
kgamora Mar 1, 2023
1b73163
first version of echo
kgamora Mar 1, 2023
310d9fd
echo and pwd: second version
kgamora Mar 1, 2023
92ebfe6
style check
kgamora Mar 1, 2023
ef86867
first version of pwd
kgamora Mar 1, 2023
93f49b4
getting ready to merge
kgamora Mar 1, 2023
5b10cde
Merge pull request #6 from kgamora/built-inCommands
kgamora Mar 2, 2023
33fb4c3
Fix executable.py
Nikolai-SE Mar 2, 2023
7fa5c66
Fix executable.py 2
Nikolai-SE Mar 2, 2023
98f484f
Изменил класс Application
RazerFord Mar 2, 2023
bd5df06
Исправил логику класса Application
RazerFord Mar 2, 2023
309d53e
Make constructor.py
Nikolai-SE Mar 2, 2023
6c1b636
Add method construct all to constructor.py
Nikolai-SE Mar 2, 2023
122b4ac
Реализовал Executor
RazerFord Mar 2, 2023
b83451d
Formatting
Nikolai-SE Mar 2, 2023
19ee10d
Изменил класс Application
RazerFord Mar 2, 2023
c803340
Исправил Executor
RazerFord Mar 2, 2023
cc79da3
Add substitute_all
Nikolai-SE Mar 2, 2023
7ee39ff
Fix application.py run
Nikolai-SE Mar 2, 2023
cfea31a
First run
Nikolai-SE Mar 2, 2023
e046cfb
Add assign.py
Nikolai-SE Mar 2, 2023
1944842
Add Substitution of "" and ''
Nikolai-SE Mar 2, 2023
09cecc1
Fix style
Nikolai-SE Mar 2, 2023
2ddef56
Добавил wc
RazerFord Mar 2, 2023
eb71c3d
Изменил wc
RazerFord Mar 2, 2023
da01db2
Fix lexer, add assigner construction
Nikolai-SE Mar 3, 2023
c110a25
Fix Assign import
Nikolai-SE Mar 3, 2023
aec63ef
global executable, first version + unified return code behaviour and …
kgamora Mar 3, 2023
1024ad6
Add wc to constructor.py, fix call of construction of global_executor
Nikolai-SE Mar 3, 2023
e9560a7
Fix application get_executables
Nikolai-SE Mar 3, 2023
10a221f
Add cat command
Nikolai-SE Mar 3, 2023
ee5638e
Поправил wc
RazerFord Mar 4, 2023
019d956
Поправил global_executable
RazerFord Mar 4, 2023
6018708
updated context_manager with method to get current anvironment. added…
kgamora Mar 4, 2023
9273d65
updated global_executable command call with current_environment pass.…
kgamora Mar 4, 2023
d637172
Fix logic with lexing and substitution
Nikolai-SE Mar 4, 2023
e92428c
Add import libs, renaming args
Nikolai-SE Mar 4, 2023
26e3098
tests for wc and pwd built-in commands
kgamora Mar 4, 2023
ae95f96
Merge remote-tracking branch 'origin/dev-part-1' into dev-part-1
kgamora Mar 4, 2023
39d8261
Add docs to parsing
Nikolai-SE Mar 4, 2023
86fff4e
Добавил первый тест
RazerFord Mar 4, 2023
28d67ce
Добавил первый тест
RazerFord Mar 4, 2023
085ead4
Обновил Ci
RazerFord Mar 4, 2023
dbd8656
Обновил test
RazerFord Mar 4, 2023
ed5da50
Обновил CI
RazerFord Mar 4, 2023
00a852e
Обновил CI
RazerFord Mar 4, 2023
bf49976
Обновил CI
RazerFord Mar 4, 2023
53e21ac
Обновил CI
RazerFord Mar 4, 2023
4359417
Обновил requirements
RazerFord Mar 4, 2023
d1df435
Изменил названия папки с тестом
RazerFord Mar 4, 2023
f2e2cf7
Удалил лишние файлы
RazerFord Mar 4, 2023
fed1428
Исправил WC
RazerFord Mar 4, 2023
9031dee
Удалил лишние тесты
RazerFord Mar 4, 2023
6f4c4b1
Add unit-tests for parsing
Nikolai-SE Mar 4, 2023
a826912
Hide substitution
Nikolai-SE Mar 4, 2023
0757cfe
Исправил wc
RazerFord Mar 4, 2023
4804d9a
Add Docs, replace generator to map
Nikolai-SE Mar 4, 2023
8b28b2c
Добавил тесты Cat. Изменил декоратор
RazerFord Mar 4, 2023
b3e4372
Изменил Executable
RazerFord Mar 4, 2023
b57f350
Изменил декоратор в Executable
RazerFord Mar 4, 2023
a5b0686
Исправлен вызов внешних команд, добавлена возможность запуска из READ…
Nikolai-SE Mar 4, 2023
ac52798
Fix naming
Nikolai-SE Mar 4, 2023
56c7dc5
Fix format
Nikolai-SE Mar 4, 2023
8913b11
Поправил тесты
RazerFord Mar 4, 2023
28c2aef
Fix cat, echo
Nikolai-SE Mar 4, 2023
c66cc45
Исправил pwd
RazerFord Mar 4, 2023
7dcf128
Исправил wc
RazerFord Mar 4, 2023
cb1e49b
Fix style
Nikolai-SE Mar 4, 2023
333df1b
Add power_off test with global executor
Nikolai-SE Mar 4, 2023
d73a5c2
Fix test with poweroff
Nikolai-SE Mar 4, 2023
e09acc1
test for echo
kgamora Mar 4, 2023
85aea0b
Merge remote-tracking branch 'origin/dev-part-1' into dev-part-1
kgamora Mar 4, 2023
2c896a7
exit test
kgamora Mar 4, 2023
6893e45
Add test for global executable
Nikolai-SE Mar 4, 2023
694dc59
Fix formatting
Nikolai-SE Mar 4, 2023
2bb1e08
test for assign
kgamora Mar 4, 2023
ec6eaac
Merge remote-tracking branch 'origin/dev-part-1' into dev-part-1
kgamora Mar 4, 2023
322f05a
Update README
Nikolai-SE Mar 5, 2023
a0aa4e8
Merge remote-tracking branch 'origin/dev-part-1' into dev-part-1
Nikolai-SE Mar 5, 2023
ef60809
Add substitution
Nikolai-SE Mar 7, 2023
2acb7b4
Fix formatting
Nikolai-SE Mar 7, 2023
000f73b
Добавил тесты для substituter
RazerFord Mar 7, 2023
5b53976
first version of pipes. added auxiliary split function to split lists…
kgamora Mar 7, 2023
509d6d2
Hot fix substitution
Nikolai-SE Mar 7, 2023
b18bd10
Fix substituter.py and tests
Nikolai-SE Mar 7, 2023
de8f47a
Add clear, remove_key to context_manager.
Nikolai-SE Mar 7, 2023
7859eb0
Remove test_substituter.py
Nikolai-SE Mar 7, 2023
2c39a96
Добавил модульный тест для pipe
RazerFord Mar 7, 2023
bab9709
Fix
Nikolai-SE Mar 7, 2023
d7ad0fd
Исправил модульный тест для pipe
RazerFord Mar 7, 2023
14ae22c
Исправил модульный тест для pipe
RazerFord Mar 7, 2023
3004885
Fix lexing of assign, add tests
Nikolai-SE Mar 7, 2023
911fcfb
Добавил тесты для pipe
RazerFord Mar 7, 2023
b69f936
Добавил тесты для pipe
RazerFord Mar 7, 2023
2eb57ff
Исправил тесты для pipe
RazerFord Mar 7, 2023
bc37f68
Add LexerAction to separate login of lexing from Lexer
Nikolai-SE Mar 7, 2023
401efaf
context manager docstrings
kgamora Mar 11, 2023
a373fa2
added docstrings to lexer methods
kgamora Mar 11, 2023
28e441a
Обновление cli-class_scheme.drawio
Nikolai-SE Mar 18, 2023
1bae9bd
Обновление cli-class_scheme.drawio
Nikolai-SE Mar 18, 2023
627291a
Обновление cli-class_scheme.drawio
Nikolai-SE Mar 18, 2023
b70c36b
Добавлено cli-class_scheme.drawio.png
Nikolai-SE Mar 18, 2023
37c5a7f
Обновление cli-class_scheme.drawio.png
Nikolai-SE Mar 18, 2023
c12a0e1
Обновление cli-class_scheme.drawio.png
Nikolai-SE Mar 18, 2023
0b113f7
Delete cli-class_scheme.drawio.png
Nikolai-SE Mar 18, 2023
3d71a56
Обновление cli-class_scheme.drawio.png
Nikolai-SE Mar 18, 2023
39be225
Delete cli-class_scheme.drawio.png
Nikolai-SE Mar 18, 2023
56d31db
Добавлено cli-class_scheme.drawio.png
Nikolai-SE Mar 18, 2023
8e5e988
Update README.md
Nikolai-SE Mar 18, 2023
e9a87f3
Update README.md
Nikolai-SE Mar 18, 2023
4e0af58
Add types of functions
Nikolai-SE Mar 18, 2023
f4d7d08
Formatting
Nikolai-SE Mar 18, 2023
6d6ea35
construct grep
kgamora Mar 19, 2023
982296d
Добавил парсинг параметров командой строки
RazerFord Mar 19, 2023
abb3bb0
Добавил парсинг параметров командой строки
RazerFord Mar 19, 2023
773d1e0
Исправил парсинг параметров командой строки
RazerFord Mar 19, 2023
53f1220
Сделал чтение из файла
RazerFord Mar 19, 2023
0956bdf
Сделал чтение из файла
RazerFord Mar 19, 2023
44f6d97
find by regex siganture
kgamora Mar 19, 2023
b2f592c
Добавил инициализацию паттерна
RazerFord Mar 19, 2023
c75cb8e
rebased
kgamora Mar 19, 2023
ce3acea
Первая версия Grep
kgamora Mar 19, 2023
0d68ec4
Переписал функцию на generator
RazerFord Mar 20, 2023
8295d85
grep fixed
kgamora Mar 20, 2023
5b52414
Добавил тесты
RazerFord Mar 20, 2023
54eed6d
Удалил символы новостроки из Grep
RazerFord Mar 20, 2023
aa5eaa1
fixed grep executuion
kgamora Mar 20, 2023
bdafa66
Обновлен список аргументов, как паттерн и список файлов. Сделана обра…
Nikolai-SE Mar 20, 2023
eeb8b77
fixed line generator in grep and out formatting
kgamora Mar 20, 2023
3e02c50
merged with os_asked_help
kgamora Mar 20, 2023
1800d89
Добавлен help, обработан разбор -w как флага.
Nikolai-SE Mar 20, 2023
65f4e65
Добавил тесты
RazerFord Mar 20, 2023
ab96c6e
Обновил тесты
RazerFord Mar 20, 2023
42d3dac
Исправил вывод для директории в grep
RazerFord Mar 20, 2023
8b6e1dc
fixed case insensivity and -w modifiers
kgamora Mar 20, 2023
fe4c01e
fixed regex matching logic
kgamora Mar 20, 2023
a7b16c3
fixed lines
kgamora Mar 20, 2023
51cac0d
line number
kgamora Mar 20, 2023
557db96
Добавлен custom_arg_parser.py
Nikolai-SE Mar 20, 2023
48771ff
Исправил тесты
RazerFord Mar 20, 2023
d8035b9
Исправил grep
RazerFord Mar 20, 2023
82ede2f
Исправил grep
RazerFord Mar 20, 2023
16f89e1
Добавлена обработка return_code
Nikolai-SE Mar 20, 2023
0a4a2e4
Добавлена обработка ошибок regex : re.err
Nikolai-SE Mar 20, 2023
0124be4
Refactoring test_grep.py
Nikolai-SE Mar 20, 2023
06578c2
Update README.md
Nikolai-SE Mar 20, 2023
31f77de
Обновил README
RazerFord Mar 20, 2023
e85074f
Merge from architecture
Nikolai-SE Mar 20, 2023
0889108
Добавил примечание
RazerFord Mar 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/ci_pytests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#------------------------------------------------
# GitHub Action Run Tests
#
# Copyleft (c) by Egor Ovchinnikov 2023.
#
name: Ci-Pytests

on: [ push ]

jobs:
run_tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10" ]

steps:
- name: Copy directory from git
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: python -m pytest
39 changes: 39 additions & 0 deletions .github/workflows/ci_test_for_main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Run tests

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
name: Run tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: [ "3.10" ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- name: Set up Git repository
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
pip list

- name: Run tests with pytest
run: python -m pytest

- name: Run tests with unittest
run: python -m unittest discover -f test -v
57 changes: 57 additions & 0 deletions .github/workflows/code_style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This is a basic workflow to help you get started with Actions

name: Check code style

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events
[ push, pull_request ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:

# This workflow contains a single job called "style"
style:

# The type of runner that the job will run on
runs-on: ubuntu-latest

# A strategy creates a build matrix for your jobs
strategy:

# You can define a matrix of different job configurations
matrix:

# Each option you define in the matrix has a key and value
python-version: [ "3.10" ]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Set up Git repository
uses: actions/checkout@v2

# Setup Python with version from matrix
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

# Install requirements
- name: Install requirements

# Runs command-line programs using the operating system's shell
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install -r requirements.txt
python -m pip list

# Install pre-commit from .pre-commit-config.yaml
- name: Install pre-commit
run: |
pre-commit install

# Run pre-commit on all the files in the repo
- name: Run pre-commit
run: |
pre-commit run --all-files --color always --verbose --show-diff-on-failure
225 changes: 225 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
# 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
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

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

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# 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/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

# Local History for Visual Studio Code
.history/

# End of https://mrkandreev.name/snippets/gitignore-generator/#Python,PyCharm,VisualStudioCode
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: requirements-txt-fixer
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# CLI
Реализация `CLI` на языке `Python`.

Работа выполнена студентами `ИТМО ИПКН` групп `M414x`:
Работа выполнена студентами `ИТМО ИПКН` групп `M414x`:

1. Стойко Николай

2. Гамора Константин

3. Овчинников Егор


Запуск приложения и тестов [project/README](./project/README.md) (Часть 1)
Loading