Skip to content

Commit

Permalink
Better dependency management for dev, standalone, and a Nomad install (
Browse files Browse the repository at this point in the history
…#50)

* Added a pip-compile locked requirements for devs

* Reverted nomad-lab install back

* Fixed missing astroid version

* cleanup + ease on dev reqs

* Added a relaxed requirements.txt for installation with Nomad

* Unrelaxed pyproject.toml dev reqs and reverted xarray to older version

* Allowed python3.7 and fixed dask[array] version

* Merge adapt-nexus-to-metainfo-changes and CI updates

* cleanup

* Brought in requirements.txt

* draft refactoring and reorganizing of nomad-parser-nexus, decide first how tests should finally before structured, then the tests and absolute paths in the ipynbs and code sections should be changed

* renaming tools; adding and fixing unit tests

* fix some linting issues

* addig reference data for testing nexus checker

* fixing linting issues; adding test reference file

* bringing Example  to front

* tested ipynb notebooks, added jupyterlab_h5web to the environment

* improved descriptions, and placed jupyterlab in pyproject toml, tested compiling a dev-requirements locally successfully

* updating readme.md as a result of testing

* Added nexus definitions to the module package

* fixing README files and the ipynb for APM

* use dataconverter alias from command line

* harmonising EM and MPES notebooks

* Updated YAML file

* Updated jupyter notebook for ellipsometry + DAT and YAML file

* Delete ELLIPSOMETRY.NeXus.READER.EXAMPLE.02.ipynb

* Delete test.yaml

* fix data file locations

Co-authored-by: Adam Fekete <[email protected]>
Co-authored-by: Adam Fekete <[email protected]>
Co-authored-by: kuehbachm <[email protected]>
Co-authored-by: sanbrock <[email protected]>
Co-authored-by: sanbrock <[email protected]>
Co-authored-by: Carola Emminger <[email protected]>
Co-authored-by: cmmngr <[email protected]>
  • Loading branch information
8 people authored Oct 7, 2022
1 parent b7eeda5 commit 092537b
Show file tree
Hide file tree
Showing 178 changed files with 12,926 additions and 3,332 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ jobs:
git submodule sync --recursive
git submodule update --init --recursive --jobs=4
python -m pip install --upgrade pip
pip install nomad-lab==1.1.3 --extra-index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install astroid==2.5.1
- name: Install package
run: |
python -m pip install .
python -m pip install --no-deps .
- name: Install dev requirements
run: |
python -m pip install -r dev-requirements.txt
- name: pycodestyle
run: |
python -m pycodestyle --ignore=E501,E701,E731 nexusparser tests --exclude=nexusparser/definitions
python -m pycodestyle --ignore=E501,E701,E731 nexusutils tests --exclude=nexusutils/definitions
- name: pylint
run: |
python -m pylint --load-plugins=pylint_mongoengine,nomad.metainfo.pylint_plugin nexusparser tests
python -m pylint nexusutils tests
- name: mypy
run: |
python -m mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional --exclude='nexusparser/definitions/' tests
python -m mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional nexusutils tests
- name: Test with pytest
if: ${{ always() }}
run: |
Expand Down
197 changes: 197 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,204 @@
# https://github.com/github/gitignore/blob/main/Global/macOS.gitignore
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# https://github.com/github/gitignore/blob/main/Python.gitignore

# 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

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__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/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/


# Custom settings

.mypy_cache/
.pyenv
*.pyc
*.txt
!requirements.txt
!dev-requirements.txt
build/
nexusparser.egg-info/PKG-INFO
.python-version
7 changes: 5 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "nexusparser/definitions"]
path = nexusparser/definitions
[submodule "nexusutils/definitions"]
path = nexusutils/definitions
url = https://github.com/FAIRmat-Experimental/nexus_definitions.git
[submodule "nexusutils/nexus_definitions"]
path = nexusutils/definitions
url = https://github.com/FAIRmat-Experimental/nexus_definitions.git
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"python.linting.enabled": true,
"python.linting.pylintArgs": [
"--load-plugins=nomad.metainfo.pylint_plugin",
"nexusparser",
"nexusutils",
"tests"
],
"python.testing.pytestArgs": [
Expand Down
Loading

0 comments on commit 092537b

Please sign in to comment.