Comments (7)
possibly https://pypi.org/project/Deprecated/
from ganga.
Looks interesting. Maybe add to this some way where the CI testing will start to fail a test if there are old "deprecations" that has not been removed. So maybe the decorator should have a way of marking the deprecation period. In the example below
@deprecated(version='8.6.9', reason="Singularity is the old name, use Apptainer instead", expiry=datetime.date(2024,7,1))
would then if used give the message
WARNING: Deprecated in version 8.6.9. Singularity is the old name, use Apptainer instead. Class will be removed in first release after 2024-07-01.
from ganga.
possibly https://pypi.org/project/Deprecated/
@alexanderrichards I think I am gonna borrow this idea for #2293 :)
from ganga.
The CI testing will then just have a test that starts failing if it finds any line with an expiry date that is before the current date. Should probably be made as a separate section in the testing (that is not required to pass) to avoid messing up the test of some unrelated PR. Or maybe we could do some of the same kind of magic as we have for the PEP8 testing where a PR is automatically created with the deprecated functions marked for removal.
from ganga.
makes sense
from ganga.
Links somewhat in with #2149. The issue here is related to Ganga code that gets deprecated, while the other one is related to python syntax that gets deprecated.
from ganga.
Suggested steps for developing this. @YilinZhao6 Let us know if you start working on this.
- Investigate if Deprecated is the correct thing to base this on, or if there is something better.
- If "yes", extend the package (probably through inheritance) to include the extra features we requested. It seems like it might only be the removal date as the "version" stuff seems already there. The code should go into Decorators.py if it is just a few lines, or else into a file of its own in the same directory.
- Update dependencies of Ganga to include the Deprecated package.
- Write some test cases that demonstrates that it is working. The test cases should go into the directory GangaCore/test/Unit/Utility.
- Apply it to the Singularity class as the first example.
- The continuous integration test should be modified to identify code that we already deprecated and that is now ripe for removal. This should probably be done as part of a separate PR.
from ganga.
Related Issues (20)
- Investigate docker commands that do not currently work with virtualization and make them work HOT 11
- Support SMOG2 in LHCb bookkeping queries HOT 2
- Updating Developer Documentation HOT 2
- Incomplete python3 migration in BatchScriptTemplate.py.template
- Problems with running slc6 based GaudiExec HOT 9
- Wrong default value assigned to DiracFile object HOT 3
- GaudiExec applications not running in container HOT 9
- Make GaudiExec use the regular virtualization options HOT 2
- Ganga crashes when opening
- Option to monitor a slice
- Update default platforms
- Registry slicing does not work
- Parametric submission for Executable jobs and Dirac?
- Speed up Dirac submission
- Ganga crashes when banned sites set to empty list HOT 5
- Job master kill error with failed subjobs HOT 3
- Remove `finaliseOnMaster`
- Make number of retries in BKQuery changeable
- respiting of a subjoin always fails HOT 10
- Exception when starting ganga version 8.7.9 HOT 4
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 ganga.