Comments (6)
In GitLab by @RandomDefaultUser on Jan 12, 2021, 23:02
There is no such thing as a HZDR coding standard that I'm aware of. However, I'll use this issue to collect suggestions for improving the code.
from foo import *
is not considered pythonic and can lead to module shadowing and hard-to-find bugs. Instead usefrom foo import bar, Baz
- be pep8 compliant: Even though I don't agree with all formatting implemented in black, I find myself running
black -l79 *.py
more and more these days
By Schmerler, Dr. Steve (FWCC) - 131252 on 2021-01-12T23:02:38 (imported from GitLab)
from mala.
In GitLab by @RandomDefaultUser on Jan 13, 2021, 09:54
Yes the "HZDR" was a misunderstanding on my part. I use pycharm and that checks for pep8 compliance if I am not mistaken, I just haven't gone through the whole code yet. I will do that soon. I will also pythonify the import
statements.
By Fiedler, Lenz (FWU) - 146409 on 2021-01-13T09:54:37 (imported from GitLab)
from mala.
In GitLab by @RandomDefaultUser on Jan 14, 2021, 10:32
Yes, pycharm also checks for unused imports. I will look into those as well.
By Fiedler, Lenz (FWU) - 146409 on 2021-01-14T10:32:42 (imported from GitLab)
from mala.
In GitLab by @RandomDefaultUser on Jan 13, 2021, 18:50
There is also flake8 and similar tools that show pep8 violations and, more useful I think, unused imports etc. I assume IDEs like PyCharm already do that? FWIW, I stumbled upon
ex07_dos_analysis.py:4:1: F401 'scipy.optimize.toms748' imported but unused
By Schmerler, Dr. Steve (FWCC) - 131252 on 2021-01-13T18:50:10 (imported from GitLab)
from mala.
In GitLab by @RandomDefaultUser on Mar 2, 2021, 21:46
Code should be PEP8 compliant with !41.
By Fiedler, Lenz (FWU) - 146409 on 2021-03-02T21:46:54 (imported from GitLab)
from mala.
In GitLab by @RandomDefaultUser on Jan 13, 2021, 00:53
changed title from Enforce {-HZDR -}python coding standards to Enforce python coding standards
By Schmerler, Dr. Steve (FWCC) - 131252 on 2021-01-13T00:53:18 (imported from GitLab)
from mala.
Related Issues (20)
- Use tempfile to handle LAMMPS and QE temporary files
- Align Python versions througout MALA HOT 2
- New containers are added to the registry, which should not actually be different
- Clean up cache entires after successfull merge of PR HOT 2
- Remove potentially obsolete step in CI CPU test workflow HOT 1
- Make OpenPMD consistent HOT 1
- Improve CI with regards to data repo updates HOT 3
- Delete caches after pushes to `develop`, `master` etc.
- Update CI to use BuildKit as docker builder
- Crash when using GPU in descriptor calculation HOT 6
- Document `parameters.descriptor.use_atomic_density_energy_formula`
- Add a Dockerfile linter
- Reavaluate GitHub artifacts versus cache
- Only build docker image when build context changed compared to `develop` branch
- Problem building QE (total energy module) HOT 5
- Shuffling can cause (tiny) information loss
- Update install documentation for test data version control
- API inconsistencies when saving and loading model snapshots
- Make activation applied to the output layer optional HOT 2
- Don't fix Python version in `.pre-commit-config.yaml`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mala.