Skip to content

Commit

Permalink
continue (attempting to) fix setup and github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewkuner committed Nov 2, 2023
1 parent c7ca8e2 commit 90f4556
Show file tree
Hide file tree
Showing 5 changed files with 253 additions and 39 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --quiet -r requirements.txt -r requirements-ci.txt
pip install --quiet -r requirements.txt -r requirements-dev.txt
pip install -e .
- name: pytest
run: |
pytest --cov=pymatgen --cov-report=xml
- uses: codecov/codecov-action@v1
if: matrix.python-version == 3.10
with:
Expand Down
151 changes: 134 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,139 @@
.DS_Store
*.egg-info
*.o
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so
*.pyc
*.swp
*.swo
dist
_build
build
.project
.pydevproject
.settings
.externalToolBuilders
.idea
setuptools*

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
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/

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

# Jupyter Notebook
.ipynb_checkpoints
.tox

pymatgen/\.vscode/
# IPython
profile_default/
ipython_config.py

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

# PyCharm settings
.idea*
.DS_store
.log

docs_build
examples/wip*

.vscode/
127 changes: 108 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,110 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools >= 65.0.0", "versioningit ~= 1.0", "wheel"]

[project]
authors = [
{ name = "Matthew Kuner", email = "[email protected]" },
{ name = "Janosh Riebesell"},
{ name = "Jason Munro"},
{ name = "Aaron Kaplan"},
]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Scientific/Engineering :: Chemistry",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"pymatgen",
"numpy"
]
description = "A comprehensive I/O validator for electronic structure calculations"
dynamic = ["version"]
keywords = ["io", "validation", "dft", "vasp"]
license = { text = "modified BSD" }
name = "pymatgen-io-validation"
readme = "README.rst"
requires-python = '>=3.8'

[project.optional-dependencies]
dev = ["pre-commit>=2.12.1"]
#docs = ["jupyter-book>=0.13.1",]


tests = ["pytest==7.4.2", "pytest-cov==4.1.0"]


[tool.setuptools.dynamic]
readme = { file = ["README.rst"] }

#[project.urls]
#repository = "https://github.com/materialsproject/pymatgen-io-validation"

[tool.setuptools.packages.find]
exclude = ["tests"]
where = ["./"]

[tool.versioningit.vcs]
default-tag = "0.0.1"
method = "git"

[tool.isort]
profile = "black"

[tool.black]
line-length = 120
target-version = ['py38']
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
)
'''

[tool.blacken-docs]
line-length = 120

[tool.flake8]
extend-ignore = "E203, W503, E501, F401, RST21"
max-line-length = 120
max-doc-length = 120
min-python-version = "3.8.0"
rst-roles = "class, func, ref, obj"
select = "C, E, F, W, B, B950"

[tool.mypy]
ignore_missing_imports = true
no_strict_optional = true

[tool.coverage.run]
branch = true
include = ["pymatgen/*"]
parallel = true

[tool.coverage.paths]
source = ["pymatgen/"]

[tool.coverage.report]
show_missing = true
skip_covered = true

[tool.pydocstyle]
convention = 'google'
match = '^pymatgen/(?!_).*\.py'
inherit = false
add-ignore = "D107, "

[tool.autoflake]
in-place = true
remove-unused-variables = true
remove-all-unused-imports = true
expand-star-imports = true
ignore-init-module-imports = true


[tool.setuptools.packages.find]
exclude = ["tests"]
where = ["./"]
File renamed without changes.
10 changes: 9 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
pymatgen==2022.4.19
pymatgen==2023.10.11
emmet-core==0.72.7
pydantic==2.4.2
pydantic-core==2.10.1
pydantic-settings==2.0.3
typing-extensions==4.8.0
monty==2023.9.25
numpy==1.26.1
requests==2.31.0

0 comments on commit 90f4556

Please sign in to comment.