diff options
| author | adamjanovsky | 2023-10-26 09:41:04 +0200 |
|---|---|---|
| committer | GitHub | 2023-10-26 09:41:04 +0200 |
| commit | 5968e53d9f78d744c1bd151be0d754282e65baee (patch) | |
| tree | 018b91ee65218a70511169bc461a3a5d67978da1 | |
| parent | ed6f324b3fcf85de24d93d293e75309e867b1166 (diff) | |
| parent | d67361d2486279886141f911e5d4b2e0f2cdd0a9 (diff) | |
| download | sec-certs-5968e53d9f78d744c1bd151be0d754282e65baee.tar.gz sec-certs-5968e53d9f78d744c1bd151be0d754282e65baee.tar.zst sec-certs-5968e53d9f78d744c1bd151be0d754282e65baee.zip | |
Merge pull request #369 from crocs-muni/fix/better-log-filename-and-requirements-file
Fix/better log filename and requirements file
| -rw-r--r-- | .github/workflows/docs.yml | 1 | ||||
| -rw-r--r-- | .github/workflows/tests.yml | 2 | ||||
| -rw-r--r-- | CONTRIBUTING.md | 3 | ||||
| -rw-r--r-- | Dockerfile | 9 | ||||
| -rw-r--r-- | requirements/all_requirements.txt | 552 | ||||
| -rwxr-xr-x | requirements/compile.sh | 7 | ||||
| -rw-r--r-- | requirements/dev_requirements.txt | 11 | ||||
| -rw-r--r-- | requirements/requirements.txt | 5 | ||||
| -rw-r--r-- | requirements/test_requirements.txt | 5 | ||||
| -rw-r--r-- | src/sec_certs/configuration.py | 2 |
10 files changed, 575 insertions, 22 deletions
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 66c153b1..f14ef8af 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,7 +18,6 @@ jobs: run: sudo apt-get install build-essential libpoppler-cpp-dev pkg-config python3-dev -y - name: Install sec-certs and deps run: | - pip install -r requirements/requirements.txt pip install -r requirements/dev_requirements.txt pip install -e . - name: Build docs diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 961a1058..d3ce598d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,11 +18,9 @@ jobs: python-version: "3.8" cache: "pip" cache-dependency-path: | - requirements/requirements.txt requirements/test_requirements.txt - name: Install python dependencies run: | - pip install -r requirements/requirements.txt pip install -r requirements/test_requirements.txt - name: Install sec-certs run: | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 32f2f0ab..ff63e253 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,6 +18,7 @@ Requirements are maintained with [pip-tools](https://github.com/jazzband/pip-too - List actual dependencies in [pyproject.toml](https://github.com/crocs-muni/sec-certs/blob/main/pyproject.toml) without pinning them. - Additionally, [compile.sh](https://github.com/crocs-muni/sec-certs/blob/main/requirements/compile.sh) script is used to compile pinned versions of requirements that reside in `.txt` files in the same folder. - Tests, linting and Docker all run against this reproducible environment of pinned requirements. +- To install all requirements, use `pip install -U pip-tools && pip-sync requirements/all_requirements.txt` ## Branches @@ -67,4 +68,4 @@ To ivoke the tools manually, you can, in the repository root, use: Every public method of a module that can be leveraged as an API by user should be documented. The docstrng style should be `sphinx-oneline`. -The documentation is built using `sphinx` with `mnyst` extension that allows for markdown files. Folder `notebooks/examples` is symbolically linked to `/docs` and its contents will be automatically parsed. These notebooks are supposed to be runnable from Binder.
\ No newline at end of file +The documentation is built using `sphinx` with `mnyst` extension that allows for markdown files. Folder `notebooks/examples` is symbolically linked to `/docs` and its contents will be automatically parsed. These notebooks are supposed to be runnable from Binder. @@ -56,9 +56,8 @@ ENV PATH="${VENV_PATH}/bin:$PATH" # Install dependencies, notebook is because of mybinder.org RUN \ - pip3 install -U pip && \ - pip3 install wheel && \ - pip3 install -r requirements/requirements.txt && \ + pip3 install -U pip wheel pip-tools && \ + pip-sync requirements/all_requirements.txt && \ pip3 install --no-cache notebook jupyterlab && \ pip3 install -e . && \ python3 -m spacy download en_core_web_sm @@ -66,5 +65,5 @@ RUN \ # just to be sure that pdftotext is in $PATH ENV PATH /usr/bin/pdftotext:${PATH} -# # Run the application: -# CMD ["python3", "./cc_cli.py"] +# Run the application: +ENTRYPOINT ["sec-certs"] diff --git a/requirements/all_requirements.txt b/requirements/all_requirements.txt new file mode 100644 index 00000000..754a439d --- /dev/null +++ b/requirements/all_requirements.txt @@ -0,0 +1,552 @@ +accessible-pygments==0.0.4 + # via pydata-sphinx-theme +alabaster==0.7.13 + # via sphinx +annotated-types==0.6.0 + # via pydantic +asttokens==2.4.0 + # via stack-data +attrs==23.1.0 + # via + # jsonschema + # jupyter-cache + # referencing +babel==2.13.0 + # via + # pydata-sphinx-theme + # sphinx +backcall==0.2.0 + # via ipython +beautifulsoup4==4.12.2 + # via + # pydata-sphinx-theme + # sec-certs (./../pyproject.toml) +billiard==4.1.0 + # via sec-certs (./../pyproject.toml) +black==23.1.0 + # via sec-certs (./../pyproject.toml) +blis==0.7.11 + # via thinc +build==1.0.3 + # via pip-tools +catalogue==2.0.10 + # via + # spacy + # srsly + # thinc +certifi==2023.7.22 + # via requests +cffi==1.16.0 + # via cryptography +cfgv==3.4.0 + # via pre-commit +charset-normalizer==3.3.0 + # via requests +click==8.1.7 + # via + # black + # jupyter-cache + # pip-tools + # sec-certs (./../pyproject.toml) + # typer +cloudpathlib==0.16.0 + # via weasel +comm==0.1.4 + # via + # ipykernel + # ipywidgets +confection==0.1.3 + # via + # thinc + # weasel +contourpy==1.1.1 + # via matplotlib +coverage[toml]==7.3.2 + # via + # pytest-cov + # sec-certs (./../pyproject.toml) +cryptography==41.0.4 + # via pypdf +cycler==0.12.1 + # via matplotlib +cymem==2.0.8 + # via + # preshed + # spacy + # thinc +debugpy==1.8.0 + # via ipykernel +decorator==5.1.1 + # via ipython +deprecation==2.1.0 + # via pikepdf +distlib==0.3.7 + # via virtualenv +distro==1.8.0 + # via tabula-py +docutils==0.19 + # via + # myst-parser + # pydata-sphinx-theme + # sphinx +exceptiongroup==1.1.3 + # via + # ipython + # pytest +executing==2.0.0 + # via stack-data +fastjsonschema==2.18.1 + # via nbformat +filelock==3.12.4 + # via virtualenv +fonttools==4.43.1 + # via matplotlib +gprof2dot==2022.7.29 + # via pytest-profiling +greenlet==3.0.0 + # via sqlalchemy +html5lib==1.1 + # via sec-certs (./../pyproject.toml) +identify==2.5.30 + # via pre-commit +idna==3.4 + # via requests +imagesize==1.4.1 + # via sphinx +importlib-metadata==6.8.0 + # via + # jupyter-cache + # myst-nb +iniconfig==2.0.0 + # via pytest +ipykernel==6.25.2 + # via + # myst-nb + # sec-certs (./../pyproject.toml) +ipython==8.16.1 + # via + # ipykernel + # ipywidgets + # myst-nb + # sec-certs (./../pyproject.toml) +ipywidgets==8.1.1 + # via sec-certs (./../pyproject.toml) +jedi==0.19.1 + # via ipython +jinja2==3.1.2 + # via + # myst-parser + # spacy + # sphinx +joblib==1.3.2 + # via scikit-learn +jpype1==1.4.1 + # via tabula-py +jsonschema==4.19.1 + # via + # nbformat + # sec-certs (./../pyproject.toml) +jsonschema-specifications==2023.7.1 + # via jsonschema +jupyter-cache==0.6.1 + # via myst-nb +jupyter-client==8.4.0 + # via + # ipykernel + # nbclient +jupyter-core==5.4.0 + # via + # ipykernel + # jupyter-client + # nbclient + # nbformat +jupyterlab-widgets==3.0.9 + # via ipywidgets +kiwisolver==1.4.5 + # via matplotlib +langcodes==3.3.0 + # via spacy +lxml==4.9.3 + # via + # pikepdf + # sec-certs (./../pyproject.toml) +markdown-it-py==2.2.0 + # via + # mdit-py-plugins + # myst-parser +markupsafe==2.1.3 + # via jinja2 +matplotlib==3.8.0 + # via + # pysankeybeta + # seaborn + # sec-certs (./../pyproject.toml) +matplotlib-inline==0.1.6 + # via + # ipykernel + # ipython +mdit-py-plugins==0.3.5 + # via myst-parser +mdurl==0.1.2 + # via markdown-it-py +memory-profiler==0.61.0 + # via pytest-monitor +murmurhash==1.0.10 + # via + # preshed + # spacy + # thinc +mypy==1.0.0 + # via sec-certs (./../pyproject.toml) +mypy-extensions==1.0.0 + # via + # black + # mypy +myst-nb==0.17.2 + # via sec-certs (./../pyproject.toml) +myst-parser==0.18.1 + # via myst-nb +nbclient==0.7.4 + # via + # jupyter-cache + # myst-nb +nbformat==5.9.2 + # via + # jupyter-cache + # myst-nb + # nbclient +nest-asyncio==1.5.8 + # via ipykernel +networkx==3.1 + # via sec-certs (./../pyproject.toml) +nodeenv==1.8.0 + # via pre-commit +numpy==1.26.1 + # via + # blis + # contourpy + # matplotlib + # pandas + # pysankeybeta + # scikit-learn + # scipy + # seaborn + # sec-certs (./../pyproject.toml) + # spacy + # tabula-py + # thinc +packaging==23.2 + # via + # black + # build + # deprecation + # ipykernel + # jpype1 + # matplotlib + # pikepdf + # pydata-sphinx-theme + # pytesseract + # pytest + # setuptools-scm + # spacy + # sphinx + # thinc + # weasel +pandas==2.1.1 + # via + # pysankeybeta + # seaborn + # sec-certs (./../pyproject.toml) + # tabula-py +parso==0.8.3 + # via jedi +pathspec==0.11.2 + # via black +pdftotext==2.2.2 + # via sec-certs (./../pyproject.toml) +pexpect==4.8.0 + # via ipython +pickleshare==0.7.5 + # via ipython +pikepdf==8.5.1 + # via sec-certs (./../pyproject.toml) +pillow==10.1.0 + # via + # matplotlib + # pikepdf + # pytesseract + # sec-certs (./../pyproject.toml) +pip-tools==7.3.0 + # via sec-certs (./../pyproject.toml) +pkgconfig==1.5.5 + # via sec-certs (./../pyproject.toml) +platformdirs==3.11.0 + # via + # black + # jupyter-core + # virtualenv +pluggy==1.3.0 + # via pytest +pre-commit==3.5.0 + # via sec-certs (./../pyproject.toml) +preshed==3.0.9 + # via + # spacy + # thinc +prompt-toolkit==3.0.39 + # via ipython +psutil==5.9.6 + # via + # ipykernel + # memory-profiler + # pytest-monitor + # sec-certs (./../pyproject.toml) +ptyprocess==0.7.0 + # via pexpect +pure-eval==0.2.2 + # via stack-data +pycparser==2.21 + # via cffi +pydantic==2.4.2 + # via + # confection + # sec-certs (./../pyproject.toml) + # spacy + # thinc + # weasel +pydantic-core==2.10.1 + # via pydantic +pydata-sphinx-theme==0.14.1 + # via sphinx-book-theme +pygments==2.16.1 + # via + # accessible-pygments + # ipython + # pydata-sphinx-theme + # sphinx +pyparsing==3.1.1 + # via matplotlib +pypdf[crypto]==3.16.4 + # via + # pypdf + # sec-certs (./../pyproject.toml) +pyproject-hooks==1.0.0 + # via build +pysankeybeta==1.4.0 + # via sec-certs (./../pyproject.toml) +pytesseract==0.3.10 + # via sec-certs (./../pyproject.toml) +pytest==7.4.2 + # via + # pytest-cov + # pytest-monitor + # pytest-profiling + # sec-certs (./../pyproject.toml) +pytest-cov==4.1.0 + # via sec-certs (./../pyproject.toml) +pytest-monitor==1.6.6 + # via sec-certs (./../pyproject.toml) +pytest-profiling==1.7.0 + # via sec-certs (./../pyproject.toml) +python-dateutil==2.8.2 + # via + # jupyter-client + # matplotlib + # pandas + # sec-certs (./../pyproject.toml) +pytz==2023.3.post1 + # via pandas +pyyaml==6.0.1 + # via + # jupyter-cache + # myst-nb + # myst-parser + # pre-commit + # sec-certs (./../pyproject.toml) +pyzmq==25.1.1 + # via + # ipykernel + # jupyter-client +rapidfuzz==3.4.0 + # via sec-certs (./../pyproject.toml) +referencing==0.30.2 + # via + # jsonschema + # jsonschema-specifications +requests==2.31.0 + # via + # pytest-monitor + # sec-certs (./../pyproject.toml) + # spacy + # sphinx + # weasel +rpds-py==0.10.6 + # via + # jsonschema + # referencing +ruff==0.0.239 + # via sec-certs (./../pyproject.toml) +scikit-learn==1.3.1 + # via sec-certs (./../pyproject.toml) +scipy==1.11.3 + # via + # scikit-learn + # sec-certs (./../pyproject.toml) +seaborn==0.13.0 + # via + # pysankeybeta + # sec-certs (./../pyproject.toml) +setuptools-scm==8.0.4 + # via sec-certs (./../pyproject.toml) +six==1.16.0 + # via + # asttokens + # html5lib + # pytest-profiling + # python-dateutil +smart-open==6.4.0 + # via + # spacy + # weasel +snowballstemmer==2.2.0 + # via sphinx +soupsieve==2.5 + # via beautifulsoup4 +spacy==3.7.2 + # via sec-certs (./../pyproject.toml) +spacy-legacy==3.0.12 + # via spacy +spacy-loggers==1.0.5 + # via spacy +sphinx==5.3.0 + # via + # myst-nb + # myst-parser + # pydata-sphinx-theme + # sec-certs (./../pyproject.toml) + # sphinx-book-theme + # sphinx-copybutton + # sphinx-design + # sphinxcontrib-applehelp + # sphinxcontrib-devhelp + # sphinxcontrib-htmlhelp + # sphinxcontrib-qthelp + # sphinxcontrib-serializinghtml +sphinx-book-theme==1.0.1 + # via sec-certs (./../pyproject.toml) +sphinx-copybutton==0.5.2 + # via sec-certs (./../pyproject.toml) +sphinx-design==0.5.0 + # via sec-certs (./../pyproject.toml) +sphinxcontrib-applehelp==1.0.7 + # via sphinx +sphinxcontrib-devhelp==1.0.5 + # via sphinx +sphinxcontrib-htmlhelp==2.0.4 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.6 + # via sphinx +sphinxcontrib-serializinghtml==1.1.9 + # via sphinx +sqlalchemy==2.0.22 + # via jupyter-cache +srsly==2.4.8 + # via + # confection + # spacy + # thinc + # weasel +stack-data==0.6.3 + # via ipython +tabula-py==2.8.2 + # via sec-certs (./../pyproject.toml) +tabulate==0.9.0 + # via jupyter-cache +thinc==8.2.1 + # via spacy +threadpoolctl==3.2.0 + # via scikit-learn +tomli==2.0.1 + # via + # black + # build + # coverage + # mypy + # pip-tools + # pyproject-hooks + # pytest + # setuptools-scm +tornado==6.3.3 + # via + # ipykernel + # jupyter-client +tqdm==4.66.1 + # via + # sec-certs (./../pyproject.toml) + # spacy +traitlets==5.11.2 + # via + # comm + # ipykernel + # ipython + # ipywidgets + # jupyter-client + # jupyter-core + # matplotlib-inline + # nbclient + # nbformat +typer==0.9.0 + # via + # spacy + # weasel +types-python-dateutil==2.8.19.14 + # via sec-certs (./../pyproject.toml) +types-pyyaml==6.0.12.12 + # via sec-certs (./../pyproject.toml) +types-requests==2.31.0.10 + # via sec-certs (./../pyproject.toml) +typing-extensions==4.8.0 + # via + # cloudpathlib + # mypy + # myst-nb + # myst-parser + # pydantic + # pydantic-core + # pydata-sphinx-theme + # setuptools-scm + # sqlalchemy + # typer +tzdata==2023.3 + # via pandas +urllib3==2.0.7 + # via + # requests + # types-requests +virtualenv==20.24.5 + # via pre-commit +wasabi==1.1.2 + # via + # spacy + # thinc + # weasel +wcwidth==0.2.8 + # via prompt-toolkit +weasel==0.3.3 + # via spacy +webencodings==0.5.1 + # via html5lib +wheel==0.41.2 + # via + # pip-tools + # pytest-monitor +widgetsnbextension==4.0.9 + # via ipywidgets +zipp==3.17.0 + # via importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +# pip +# setuptools diff --git a/requirements/compile.sh b/requirements/compile.sh index 70783aee..063582a1 100755 --- a/requirements/compile.sh +++ b/requirements/compile.sh @@ -2,6 +2,7 @@ # See CONTRIBUTING.md for description -pip-compile --no-header --resolver=backtracking --output-file=requirements.txt ./../pyproject.toml -pip-compile --no-header --resolver=backtracking --extra dev -o dev_requirements.txt ./../pyproject.toml -pip-compile --no-header --resolver=backtracking --extra test -o test_requirements.txt ./../pyproject.toml +pip-compile --no-header -o requirements.txt ./../pyproject.toml +pip-compile --no-header --extra dev -o dev_requirements.txt ./../pyproject.toml +pip-compile --no-header --extra test -o test_requirements.txt ./../pyproject.toml +pip-compile --no-header --extra dev --extra test -o all_requirements.txt ./../pyproject.toml diff --git a/requirements/dev_requirements.txt b/requirements/dev_requirements.txt index b556b1fd..20164a1a 100644 --- a/requirements/dev_requirements.txt +++ b/requirements/dev_requirements.txt @@ -48,7 +48,9 @@ confection==0.0.3 contourpy==1.0.6 # via matplotlib coverage[toml]==6.5.0 - # via pytest-cov + # via + # coverage + # pytest-cov cycler==0.11.0 # via matplotlib cymem==2.0.7 @@ -99,7 +101,6 @@ importlib-metadata==5.1.0 # via # jupyter-cache # myst-nb - # sphinx iniconfig==1.1.1 # via pytest ipykernel==6.19.1 @@ -304,7 +305,9 @@ pygments==2.15.0 pyparsing==3.0.9 # via matplotlib pypdf[crypto]==3.2.1 - # via sec-certs (./../pyproject.toml) + # via + # pypdf + # sec-certs (./../pyproject.toml) pyrsistent==0.19.2 # via jsonschema pysankeybeta==1.4.0 @@ -473,12 +476,10 @@ types-urllib3==1.26.25.4 # via types-requests typing-extensions==4.4.0 # via - # black # mypy # myst-nb # myst-parser # pydantic - # pypdf # setuptools-scm urllib3==1.26.18 # via requests diff --git a/requirements/requirements.txt b/requirements/requirements.txt index e02c401d..d2664945 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -186,7 +186,9 @@ pygments==2.15.0 pyparsing==3.0.9 # via matplotlib pypdf[crypto]==3.2.1 - # via sec-certs (./../pyproject.toml) + # via + # pypdf + # sec-certs (./../pyproject.toml) pyrsistent==0.19.2 # via jsonschema pysankeybeta==1.4.0 @@ -279,7 +281,6 @@ typer==0.7.0 typing-extensions==4.4.0 # via # pydantic - # pypdf # setuptools-scm urllib3==1.26.18 # via requests diff --git a/requirements/test_requirements.txt b/requirements/test_requirements.txt index e2295409..9982c65a 100644 --- a/requirements/test_requirements.txt +++ b/requirements/test_requirements.txt @@ -199,7 +199,9 @@ pygments==2.15.0 pyparsing==3.0.9 # via matplotlib pypdf[crypto]==3.2.1 - # via sec-certs (./../pyproject.toml) + # via + # pypdf + # sec-certs (./../pyproject.toml) pyrsistent==0.19.2 # via jsonschema pysankeybeta==1.4.0 @@ -301,7 +303,6 @@ typer==0.7.0 typing-extensions==4.4.0 # via # pydantic - # pypdf # setuptools-scm urllib3==1.26.18 # via requests diff --git a/src/sec_certs/configuration.py b/src/sec_certs/configuration.py index 3e49ecad..d7fb734a 100644 --- a/src/sec_certs/configuration.py +++ b/src/sec_certs/configuration.py @@ -18,7 +18,7 @@ class Configuration(BaseSettings): env_prefix = "seccerts_" log_filepath: Path = Field( - "./cert_processing_log.txt", + "./cert_processing_log.log", description="Path to the file, relative to working directory, where the log will be stored.", ) always_false_positive_fips_cert_id_threshold: int = Field( |
